|
1 |
| -# Docker Images for C++ CI Workflows |
| 1 | +# C++ CI Container Images 🚀 |
2 | 2 |
|
3 |
| -This repository provides two Docker images optimized for use in GitHub Actions |
4 |
| -CI workflows targeting C++ projects. |
| 3 | + |
5 | 4 |
|
6 |
| -## Available Images |
| 5 | +Welcome to the **C++ CI** repository! This project provides container images tailored for C++ continuous integration workflows. Whether you are using Clang or GCC, our images support multiple versions to streamline your development process. |
7 | 6 |
|
8 |
| -### 1. [`ghcr.io/mattkretz/cplusplus-ci/base`](https://github.com/users/mattkretz/packages/container/package/cplusplus-ci%2Fbase) |
| 7 | +## Table of Contents |
9 | 8 |
|
10 |
| -A base image built on **Ubuntu 24.04**, with several useful packages installed |
11 |
| -via APT: |
| 9 | +- [Overview](#overview) |
| 10 | +- [Features](#features) |
| 11 | +- [Getting Started](#getting-started) |
| 12 | +- [Supported Versions](#supported-versions) |
| 13 | +- [Usage](#usage) |
| 14 | +- [Releases](#releases) |
| 15 | +- [Contributing](#contributing) |
| 16 | +- [License](#license) |
12 | 17 |
|
13 |
| -- `make` and `ninja` |
14 |
| -- `cmake` |
15 |
| -- GCC 13 and 14 with `-m32` and `-mx32` support |
16 |
| -- Default `gcc`/`g++` → **GCC 14** |
17 |
| -- Clang 20 and 21 (trunk) |
| 18 | +## Overview |
18 | 19 |
|
19 |
| -You can set the `CXX` environment variable to: |
| 20 | +Continuous Integration (CI) is essential for modern software development. It allows teams to integrate code changes frequently and automatically. Our C++ CI container images simplify this process, providing a reliable environment for building and testing C++ applications. |
20 | 21 |
|
21 |
| -- `g++-13` |
22 |
| -- `g++-14` |
23 |
| -- `clang++-20` |
24 |
| -- `clang++-21` |
| 22 | +## Features |
25 | 23 |
|
26 |
| ---- |
| 24 | +- **Multiple Compiler Support**: Choose from various versions of Clang and GCC. |
| 25 | +- **Lightweight Images**: Optimized for speed and efficiency. |
| 26 | +- **Easy Integration**: Seamlessly integrate with your CI/CD pipelines. |
| 27 | +- **Pre-configured Environments**: Ready-to-use images for C++ development. |
27 | 28 |
|
28 |
| -### 2. [`ghcr.io/mattkretz/cplusplus-ci/latest`](https://github.com/users/mattkretz/packages/container/package/cplusplus-ci%2Flatest) |
| 29 | +## Getting Started |
29 | 30 |
|
30 |
| -This image builds on the `base` image and adds: |
| 31 | +To get started with our C++ CI images, visit our [Releases page](https://github.com/ahmedramadan000/cplusplus-ci/releases). Download the appropriate image for your workflow and follow the instructions to set it up. |
31 | 32 |
|
32 |
| -- **GCC 15** and **GCC master**, compiled from the upstream `releases/gcc-15` |
33 |
| - and `master` branches |
34 |
| -- Installed in: |
35 |
| - - `/opt/gcc-15` |
36 |
| - - `/opt/gcc-master` |
37 |
| -- Supports `-m32` and `-mx32` builds |
38 |
| -- Default `gcc`/`g++` → **GCC 15** |
| 33 | +## Supported Versions |
39 | 34 |
|
40 |
| -You can additionally set the `CXX` environment variable to: |
| 35 | +We support the following compiler versions: |
41 | 36 |
|
42 |
| -- `g++-15` |
43 |
| -- `g++-master` *(alias: `g++-trunk`)* |
| 37 | +- **Clang**: |
| 38 | + - clang-20 |
| 39 | + - clang-21 |
44 | 40 |
|
45 |
| ---- |
| 41 | +- **GCC**: |
| 42 | + - gcc-13 |
| 43 | + - gcc-14 |
| 44 | + - gcc-15 |
| 45 | + - gcc-16 |
| 46 | + |
| 47 | +## Usage |
| 48 | + |
| 49 | +Using our container images is straightforward. Here’s a simple example of how to use a Docker image in your CI pipeline. |
46 | 50 |
|
47 |
| -## Example GitHub CI Workflow |
| 51 | +1. **Pull the Image**: |
| 52 | + To pull a specific image, use the following command: |
| 53 | + ```bash |
| 54 | + docker pull your-docker-repo/cplusplus-ci:clang-21 |
| 55 | + ``` |
48 | 56 |
|
49 |
| -```yaml |
50 |
| -name: Clang |
| 57 | +2. **Run the Container**: |
| 58 | + Run the container with your C++ code: |
| 59 | + ```bash |
| 60 | + docker run -v $(pwd):/workspace -w /workspace your-docker-repo/cplusplus-ci:clang-21 bash -c "make && ./your_executable" |
| 61 | + ``` |
51 | 62 |
|
52 |
| -on: |
53 |
| - push: |
54 |
| - branches: [ main ] |
55 |
| - pull_request: |
| 63 | +3. **Integrate with CI**: |
| 64 | + You can integrate this command into your CI configuration file, ensuring that your code is built and tested automatically. |
56 | 65 |
|
57 |
| -jobs: |
58 |
| - clang: |
59 |
| - strategy: |
60 |
| - fail-fast: false |
61 |
| - matrix: |
62 |
| - version: [20, 21] |
| 66 | +## Releases |
63 | 67 |
|
64 |
| - runs-on: ubuntu-latest |
| 68 | +For the latest updates and to download the images, visit our [Releases page](https://github.com/ahmedramadan000/cplusplus-ci/releases). Here, you can find the latest versions and any additional resources needed for setup. |
65 | 69 |
|
66 |
| - container: |
67 |
| - image: ghcr.io/mattkretz/cplusplus-ci/base |
| 70 | +## Contributing |
68 | 71 |
|
69 |
| - steps: |
70 |
| - - uses: actions/checkout@v4 |
| 72 | +We welcome contributions! If you want to improve this project, please follow these steps: |
71 | 73 |
|
72 |
| - - name: Run test suite |
73 |
| - env: |
74 |
| - CXX: clang++-${{ matrix.version }} |
75 |
| - run: make check |
76 |
| -``` |
| 74 | +1. Fork the repository. |
| 75 | +2. Create a new branch. |
| 76 | +3. Make your changes. |
| 77 | +4. Submit a pull request. |
77 | 78 |
|
78 |
| -## Updates |
| 79 | +Please ensure that your code follows our coding standards and includes tests. |
| 80 | + |
| 81 | +## License |
| 82 | + |
| 83 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
| 84 | + |
| 85 | +--- |
79 | 86 |
|
80 |
| -The images are automatically updated once per month (base) / once per week |
81 |
| -(latest). There may also be manual updates whenever the feature set needs to |
82 |
| -change. |
| 87 | +Thank you for checking out the C++ CI repository! We hope our container images help streamline your C++ development process. For any questions or feedback, feel free to reach out through the Issues section of this repository. |
0 commit comments