-
Notifications
You must be signed in to change notification settings - Fork 245
87 lines (66 loc) · 1.99 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on: pull_request
jobs:
test:
name: ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
toolchain:
- macos-latest-clang
- macos-12-clang
- ubuntu-latest-clang
- ubuntu-latest-gcc
- windows-2019-msvc
- windows-latest-msvc
- windows-latest-clang
include:
- toolchain: macos-latest-clang
os: macos-latest
c_compiler: clang
cxx_compiler: clang++
- toolchain: macos-12-clang
os: macos-latest
c_compiler: clang
cxx_compiler: clang++
- toolchain: ubuntu-latest-clang
os: ubuntu-latest
c_compiler: clang
cxx_compiler: clang++
- toolchain: ubuntu-latest-gcc
os: ubuntu-latest
c_compiler: cc
cxx_compiler: g++
- toolchain: windows-2019-msvc
os: windows-2019
c_compiler: msvc
cxx_compiler: msvc
- toolchain: windows-latest-msvc
os: windows-latest
c_compiler: msvc
cxx_compiler: msvc
- toolchain: windows-latest-clang
os: windows-latest
c_compiler: clang-cl
cxx_compiler: clang-cl
cmake_opts: -T ClangCL
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Configure
working-directory: test
run: cmake -S . -B build ${{ matrix.cmake_opts }}
env:
CC: ${{ matrix.c_compiler }}
CXX: ${{ matrix.cxx_compiler }}
- name: Build for ${{ matrix.os }} with ${{ matrix.compiler }}
working-directory: test
run: cmake --build build
- name: Test
if: ${{ ! startsWith(matrix.os, 'windows') }}
working-directory: test/build
run: ./tests
- name: Test (Windows)
if: ${{ startsWith(matrix.os, 'windows') }}
working-directory: test/build
run: ./Debug/tests.exe