-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (50 loc) · 1.37 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:
branches: [main]
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
fail-fast: false
matrix:
toolchain:
[
{
name: "Ubuntu GCC",
cxx: "g++",
cc: "gcc",
packages: "nlohmann-json3-dev libtinyxml2-dev",
os: ubuntu-latest,
},
,
{
name: "Ubuntu Clang",
cxx: "clang++",
cc: "clang",
packages: "nlohmann-json3-dev libtinyxml2-dev",
os: ubuntu-latest,
}
]
continue-on-error: false
runs-on: ${{ matrix.toolchain.os }}
env:
CC: ${{ matrix.toolchain.cc }}
CXX: ${{ matrix.toolchain.cxx }}
name: "${{ matrix.toolchain.name }}"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v2
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install packages (via apt)
if: runner.os == 'Linux'
run: sudo apt install ${{ matrix.toolchain.packages }} -y
- name: Configure
run: cmake -Bbuild -GNinja -DCPPPROPERTIES_BUILD_EXAMPLES=ON -DCPPPROPERTIES_BUILD_TESTS=ON
- name: Build
run: cmake --build build
- name: Run tests
run: ./build/test/tests