2121
2222 - name : Check formatting
2323 run : |
24- git fetch --depth=1 origin main
24+ git fetch --depth=1 origin master
2525 clang-format -style=file -output-replacements-xml $(git ls-files '*.cpp' '*.h' '*.ixx' '*.hpp') | grep "<replacement " && echo "Code is not properly formatted" && exit 1 || echo "All good"
2626
2727 build :
@@ -30,40 +30,48 @@ jobs:
3030 if : github.event_name == 'push' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-ci'))
3131 strategy :
3232 matrix :
33- os : [windows-latest, ubuntu-latest]
34- compiler : [msvc, clang, gcc]
33+ include :
34+ - os : windows-latest
35+ compiler : msvc
36+ - os : windows-latest
37+ compiler : clang
38+ - os : ubuntu-latest
39+ compiler : clang
40+ - os : ubuntu-latest
41+ compiler : gcc
3542
3643 steps :
3744 - uses : actions/checkout@v3
3845
3946 - name : Setup CMake
4047 uses : jwlawson/actions-setup-cmake@v2
48+ with :
49+ cmake-version : ' 3.27.0' # or whatever version you want
4150
42- - name : Setup compiler
51+ - name : Install compiler on Ubuntu
52+ if : matrix.os == 'ubuntu-latest'
4353 run : |
44- if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
45- if [ "${{ matrix.compiler }}" == "clang" ]; then
46- sudo apt-get install -y clang
47- elif [ "${{ matrix.compiler }}" == "gcc" ]; then
48- sudo apt-get install -y g++
49- fi
54+ sudo apt-get update
55+ if [ "${{ matrix.compiler }}" == "clang" ]; then
56+ sudo apt-get install -y clang
57+ elif [ "${{ matrix.compiler }}" == "gcc" ]; then
58+ sudo apt-get install -y g++
5059 fi
5160 shell : bash
5261
5362 - name : Configure CMake
5463 run : |
5564 mkdir build
5665 cd build
66+ GENERATOR="-G Ninja"
5767 if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
5868 if [ "${{ matrix.compiler }}" == "clang" ]; then
59- cmake -DCMAKE_CXX_COMPILER=clang++ ..
69+ cmake $GENERATOR -DCMAKE_CXX_COMPILER=clang++ ..
6070 elif [ "${{ matrix.compiler }}" == "gcc" ]; then
61- cmake -DCMAKE_CXX_COMPILER=g++ ..
62- else
63- cmake ..
71+ cmake $GENERATOR -DCMAKE_CXX_COMPILER=g++ ..
6472 fi
6573 else
66- cmake ..
74+ cmake $GENERATOR ..
6775 fi
6876 shell : bash
6977
0 commit comments