File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,36 @@ jobs:
1414 strategy :
1515 matrix :
1616 os : [windows-latest, macos-latest, ubuntu-latest]
17+ compiler : [default, gcc, clang]
18+
19+ # Only run "default" on Windows and macOS, but both Clang and GCC on Linux.
20+ exclude :
21+ - os : windows-latest
22+ compiler : gcc
23+ - os : windows-latest
24+ compiler : clang
25+ - os : macos-latest
26+ compiler : gcc
27+ - os : macos-latest
28+ compiler : clang
1729
1830 steps :
1931 - uses : actions/checkout@v2
2032
21- - name : Configure cmake
22- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
33+ - name : Configure CMake (Linux – GCC)
34+ if : matrix.os == 'ubuntu-latest' && matrix.compiler == 'gcc'
35+ run : |
36+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
37+
38+ - name : Configure CMake (Linux – Clang)
39+ if : matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang'
40+ run : |
41+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
42+
43+ - name : Configure CMake (Windows / macOS – default)
44+ if : matrix.compiler == 'default'
45+ run : |
46+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
2347
2448 - name : Build
2549 run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
You can’t perform that action at this time.
0 commit comments