File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,38 @@ 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
29+ - os : ubuntu-latest
30+ compiler : default
1731
1832 steps :
1933 - uses : actions/checkout@v2
2034
21- - name : Configure cmake
22- run : cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
35+ - name : Configure CMake (Linux – GCC)
36+ if : matrix.os == 'ubuntu-latest' && matrix.compiler == 'gcc'
37+ run : |
38+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
39+
40+ - name : Configure CMake (Linux – Clang)
41+ if : matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang'
42+ run : |
43+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
44+
45+ - name : Configure CMake (Windows / macOS – default)
46+ if : matrix.compiler == 'default'
47+ run : |
48+ cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
2349
2450 - name : Build
2551 run : cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --verbose
You can’t perform that action at this time.
0 commit comments