-
Notifications
You must be signed in to change notification settings - Fork 44
60 lines (56 loc) · 1.7 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on: [ push, pull_request ]
jobs:
gcc:
strategy:
matrix:
version: [9, 10, 11]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install GCC ${{ matrix.version }}
run: sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
- name: Configure, build and run tests
env:
CXX: g++-${{ matrix.version }}
CC: gcc-${{ matrix.version }}
JOBS: 4
run: |
mkdir build && cd build
cmake -G "Unix Makefiles" ..
cmake --build . -- -j${JOBS}
ctest --output-on-failure -j${JOBS} -L unittest
clang:
strategy:
matrix:
version: [11, 12]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Clang ${{ matrix.version }}
run: sudo apt-get install -y clang-${{ matrix.version }}
- name: Configure, build and run tests
env:
CXX: clang++-${{ matrix.version }}
CC: clang-${{ matrix.version }}
JOBS: 4
run: |
mkdir build && cd build
cmake -G "Unix Makefiles" ..
cmake --build . -- -j${JOBS}
ctest --output-on-failure -j${JOBS} -L unittest
msvc:
strategy:
matrix:
os: [windows-2019, windows-2022]
configuration: [Debug, Release]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Configure tests
run: cmake -S . -B build
- name: Build tests
run: cmake --build build --config ${{ matrix.configuration }} -j 4
- name: Run tests
working-directory: build
run: ctest -C ${{ matrix.configuration }} -L unittest -V