-
Notifications
You must be signed in to change notification settings - Fork 16
104 lines (83 loc) · 3.07 KB
/
cmake.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Verona Runtime CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-test:
strategy:
matrix:
# Variant is used to specify alternative jobs by specifying somethig other then
# standard
variant: [ "Standard" ]
# platform: [ "ubuntu-latest", "windows-latest", "mac-latest" ]
# Use VS 2019 as currently doesn't compile with latest
# Disable mac-latest, not managing to get machines from the pool.
platform: [ "ubuntu-latest", "windows-2019" ]
build-type: [ "Release", "Debug" ]
include:
- platform: "ubuntu-latest"
cmake-flags: "-G Ninja"
dependencies: "sudo apt install ninja-build lldb"
- variant: "Sanitizer"
platform: "ubuntu-latest"
build-type: "Release"
cmake-flags: "-G Ninja -DSANITIZER=address,undefined -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
dependencies: "sudo apt install ninja-build"
- platform: "windows-2019"
build-type: "Debug"
# Exclude perf tests in Debug on Windows as they take too long.
ctest-flags: "-E perf"
# - platform: "mac-latest"
# cmake-flags: ""
# dependencies: ""
# Don't abort runners if a single one fails
fail-fast: false
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v3
- uses: mjp41/workaround8649@c8550b715ccdc17f89c8d5c28d7a48eeff9c94a8
with:
os: ${{ matrix.platform }}
- name: Install build dependencies
run: ${{ matrix.dependencies }}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DVERONA_CI_BUILD=On ${{matrix.cmake-flags}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build-type}} --parallel 4
- name: Test
working-directory: ${{github.workspace}}/build/
run: ctest -C ${{matrix.build-type}} -j 4 ${{matrix.ctest-flags}} --output-on-failure --timeout 400 --interactive-debug-mode 0
# Job to run clang-format and report errors
format:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Install build dependencies
run: |
sudo apt update
sudo apt install clang-format-15
# We don't need to do the build for this job, but we need to configure it to get the clangformat
# and copyright targets
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
- name: Run clangformat
working-directory: ${{github.workspace}}/build
run: |
set -eo pipefail
make clangformat
git diff --exit-code
- name: Run copyright
working-directory: ${{github.workspace}}/build
run: |
set -eo pipefail
make copyright
git diff --exit-code
all-checks:
needs: [ build-test, format ]
runs-on: "ubuntu-latest"
steps:
- name: Dummy step
run: true