This repository tests the artagon-workflows CMake C and C++ CI reusable workflows.
Validates that the cmake_c_ci.yml and cmake_cpp_ci.yml reusable workflows:
- Build CMake projects correctly for C and C++
- Run tests and report results
- Support different language standards (C11/17/23, C++17/20/23)
- Handle custom CMake options
- Upload build artifacts
- Work with various configurations
| Test | Standard | Custom Options | Tests |
|---|---|---|---|
| Default | 17 | - | ✓ |
| C11 | 11 | - | ✓ |
| C17 | 17 | - | ✓ |
| C23 | 23 | - | ✓ |
| Custom | 17 | -DCMAKE_VERBOSE_MAKEFILE=ON |
✓ |
| Test | Standard | Source Dir | Tests |
|---|---|---|---|
| Default | 20 | cpp | ✓ |
| C++17 | 17 | cpp | ✓ |
| C++20 | 20 | cpp | ✓ |
| C++23 | 23 | cpp | ✓ |
This workflow runs on:
- Push to main - Validates changes to this test repo
- Pull requests - Validates PRs before merge
- Daily schedule (2 AM UTC) - Catches breaking changes in artagon-workflows
- Manual dispatch - On-demand testing with custom standards
- Repository dispatch - Triggered by artagon-workflows on releases/updates
.
├── CMakeLists.txt # CMake configuration for C project
├── src/
│ ├── main.c # C main source
│ └── test.c # C test source
├── cpp/ # C++ project
│ ├── CMakeLists.txt # CMake configuration for C++ project
│ └── src/
│ ├── main.cpp # C++ main source
│ └── test.cpp # C++ test source
└── .github/
└── workflows/
└── ci.yml # Workflow testing configuration
- Language: C17
- Build System: CMake 3.20+
- Tests: Simple assertion-based tests
- Language: C++20
- Build System: CMake 3.20+
- Tests: Simple assertion-based tests
# Build and test
mkdir build && cd build
cmake ..
cmake --build .
ctest
# Clean
cd .. && rm -rf build# Build and test
cd cpp
mkdir build && cd build
cmake ..
cmake --build .
ctest
# Clean
cd .. && rm -rf build- artagon-workflows - Main workflow repository
- CMake C CI Workflow - C workflow being tested
- CMake C++ CI Workflow - C++ workflow being tested
- Testing Strategy - Overall testing approach