Update full-linux-build.yml #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Full Linux CI Build and Test | |
on: | |
push: | |
branches: [] | |
pull_request: | |
branches: [] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Clang | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: latest | |
# Check versions of g++ and clang++ | |
- name: Check Compiler Versions | |
run: | | |
echo "Checking g++ version:" | |
g++ --version | |
echo "Checking clang++ version:" | |
clang++ --version | |
# Define a matrix for build configurations | |
- name: Build and Test Matrix | |
run: | | |
for build_type in Release Debug; do | |
for compiler in g++ clang++; do | |
for standard in 17 20; do | |
echo "Building with $compiler, $build_type, C++$standard..." | |
cmake -S . -B build -G "Unix Makefiles" \ | |
-DCMAKE_BUILD_TYPE=$build_type \ | |
-DCMAKE_CXX_COMPILER=$compiler \ | |
-DCMAKE_CXX_STANDARD=$standard | |
cmake --build build --target all --config $build_type -- -j4 | |
echo "Testing with $compiler, $build_type, C++$standard..." | |
ctest --test-dir build | |
done | |
done | |
done |