Skip to content

Commit 45c0528

Browse files
committed
[actions] Run both Clang and GCC on Linux
1 parent 8835709 commit 45c0528

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,25 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [windows-latest, macos-latest, ubuntu-latest]
17+
compiler: [default, gcc, clang]
1718

1819
steps:
1920
- uses: actions/checkout@v2
2021

21-
- name: Configure cmake
22-
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
22+
- name: Configure CMake (Linux – GCC)
23+
if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'gcc'
24+
run: |
25+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
26+
27+
- name: Configure CMake (Linux – Clang)
28+
if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang'
29+
run: |
30+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
31+
32+
- name: Configure CMake (Windows / macOS – default)
33+
if: matrix.compiler == 'default'
34+
run: |
35+
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
2336
2437
- name: Build
2538
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose

0 commit comments

Comments
 (0)