-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (39 loc) · 1.2 KB
/
full-linux-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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