https://github.com/code-vedas/cpp-runner-image
CPP Runner Image, comes in hand when used in CI/CD
https://github.com/code-vedas/cpp-runner-image
Last synced: about 1 month ago
JSON representation
CPP Runner Image, comes in hand when used in CI/CD
- Host: GitHub
- URL: https://github.com/code-vedas/cpp-runner-image
- Owner: Code-Vedas
- License: mit
- Created: 2024-12-14T15:10:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T19:33:21.000Z (about 1 year ago)
- Last Synced: 2025-02-10T21:49:03.156Z (about 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# C++ Runner image for CI/CD
This image is based on the [C++ Docker image](https://hub.docker.com/_/gcc) and adds the following tools:
- [CMake](https://cmake.org/)
- [Catch2](https://github.com/catchorg/Catch2)
- [gcovr](https://gcovr.com/en/stable/)
The image is intended to be used in CI/CD pipelines for C++ projects.
## Usage
The image is available on ghcr.io and can be used in GitHub Actions workflows like this:
```yaml
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/code-vedas/cpp-runner:latest
steps:
```
## Development
To build the image locally, run the following command:
```bash
docker build -t cpp-runner .
```
### Building with specific versions
The image automatically uses the latest releases of CMake and Catch2 when built through GitHub Actions. For local builds, you can specify versions using build arguments:
```bash
# Build with specific versions
docker build --build-arg CMAKE_VERSION=v3.29.0 --build-arg CATCH2_VERSION=v3.7.1 -t cpp-runner .
# Build with default versions (same as just docker build -t cpp-runner .)
docker build --build-arg CMAKE_VERSION=v4.0.3 --build-arg CATCH2_VERSION=v3.8.1 -t cpp-runner .
```
The GitHub Actions workflow automatically fetches and uses the latest released versions of both dependencies.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.