-
Notifications
You must be signed in to change notification settings - Fork 2
158 lines (119 loc) · 3.73 KB
/
ci.yml
File metadata and controls
158 lines (119 loc) · 3.73 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install LCov
run: sudo apt-get update -q
&& sudo apt-get install lcov -q -y
- name: Install vcpkg
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgGitCommitId: 7c55ecac266fc3e554bc315053dc45c11ec811af
- name: Configure
run: cmake --preset=ci-coverage
-D "VCPKG_MANIFEST_FEATURES=test;magic-enum"
- name: Build
run: cmake --build cmake-out -j 2
- name: Test
working-directory: cmake-out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
PS4: "\e[36m+++\e[0m "
run: |
set -x
ctest --output-on-failure -j 2
lcov -c -d .. -o coverage.info --include '${{ github.workspace }}/*'
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) -f coverage.info
sanitize:
name: "sanitize${{ matrix.features && ' (with magic_enum)' }}"
strategy:
fail-fast: false
matrix:
features: [";magic-enum", ""]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install vcpkg
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgGitCommitId: 7c55ecac266fc3e554bc315053dc45c11ec811af
- name: Configure
env: { CXX: clang++-11 }
run: cmake --preset=ci-sanitizer
-D "VCPKG_MANIFEST_FEATURES=test${{ matrix.features }}"
- name: Build
run: cmake --build cmake-out -j 2
- name: Test
env:
ASAN_OPTIONS: "strict_string_checks=1:\
detect_stack_use_after_return=1:\
check_initialization_order=1:\
strict_init_order=1:\
detect_leaks=1"
UBSAN_OPTIONS: print_stacktrace=1
run: ctest --test-dir cmake-out --output-on-failure -j 2
test:
name: "test (${{ matrix.os }}\
${{ matrix.features && ', with magic_enum' || '' }})"
strategy:
fail-fast: false
matrix:
os: [macos, ubuntu, windows]
features: [";magic-enum", ""]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v1
- name: Install static analyzers
if: matrix.os == 'ubuntu'
run: sudo apt-get install clang-tidy cppcheck -y -q
- name: Install vcpkg
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgGitCommitId: 7c55ecac266fc3e554bc315053dc45c11ec811af
- name: Configure
run: cmake --preset=ci-${{ matrix.os }}
-D "VCPKG_MANIFEST_FEATURES=test${{ matrix.features }}"
- name: Build
run: cmake --build cmake-out --config Release -j 2
- name: Install
run: cmake --install cmake-out --config Release --prefix prefix
- name: Test
run: ctest --test-dir cmake-out --output-on-failure -C Release -j 2
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install vcpkg
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgGitCommitId: 7c55ecac266fc3e554bc315053dc45c11ec811af
- uses: actions/setup-python@v2
with: { python-version: "3.6" }
- name: Install m.css dependencies
run: pip3 install jinja2 Pygments
- name: Install Doxygen
run: sudo apt-get update -q
&& sudo apt-get install doxygen -q -y
- name: Configure
run: cmake --preset=ci-ubuntu -D BUILD_DOCUMENTATION=ON -D BUILD_TESTING=OFF
- name: Build
run: cmake --build cmake-out --target docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./cmake-out/docs/html