-
Notifications
You must be signed in to change notification settings - Fork 53
260 lines (228 loc) · 8.24 KB
/
github_actions_build.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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
name: build
on:
push:
pull_request:
schedule:
- cron: '16 0 * * 3,6' # <https://crontab.guru/#16_0_*_*_3,6> - "At 00:16 on Wednesday and Saturday."
jobs:
clang-format-and-update-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- uses: DoozyX/[email protected]
with:
source: '.'
exclude: './third_party'
inplace: True
clangFormatVersion: 9
- name: Run MarkdownSnippets
run: |
dotnet tool install --global MarkdownSnippets.Tool
./run_markdown_templates.sh
shell: bash
- uses: EndBug/add-and-commit@v9
with:
author_name: Clang GitHub Action
author_email: [email protected]
message: '. rd Reformat with clang-format and/or update snippets'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Commented-out, as it keeps failing with http 429 error - too many requests
# e.g. https://github.com/approvals/ApprovalTests.cpp/runs/541867195
# markdown-link-check:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@v1
# with:
# node-version: '12.x'
# - name: Install markdown-link-check
# run: npm i -g markdown-link-check
# - name: Run markdown-link-check on *.md files
# run: ./scripts/check_links.sh
Linux:
needs: clang-format-and-update-docs
# if: false # Disable this platform temporarily
runs-on: ubuntu-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
include:
- job-name: 'clang10'
os-version: '20.04'
c-compiler: 'clang-10'
cxx-compiler: 'clang++-10'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: 'clang11'
os-version: '20.04'
c-compiler: 'clang-11'
cxx-compiler: 'clang++-11'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: 'clang12'
os-version: '20.04'
c-compiler: 'clang-12'
cxx-compiler: 'clang++-12'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
# Couldn't figure out how to make it find <limit>
# - job-name: 'clang13'
# os-version: '22.04'
# c-compiler: 'clang-13'
# cxx-compiler: 'clang++-13'
# generator: '"Unix Makefiles" "-DCMAKE_CXX_FLAGS=-stdlib=libc++ -std=c++20"'
# relative_build_dir_path: ''
- job-name: 'clang14'
os-version: '22.04'
c-compiler: 'clang-14'
cxx-compiler: 'clang++-14'
generator: '"Unix Makefiles" "-DCMAKE_CXX_FLAGS=-stdlib=libc++ -std=c++20"'
relative_build_dir_path: ''
- job-name: 'clang15'
os-version: '22.04'
c-compiler: 'clang-15'
cxx-compiler: 'clang++-15'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: 'gcc9'
os-version: '20.04'
c-compiler: 'gcc-9'
cxx-compiler: 'g++-9'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: 'gcc10'
os-version: '20.04'
c-compiler: 'gcc-10'
cxx-compiler: 'g++-10'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: 'gcc10 unity'
os-version: '20.04'
c-compiler: 'gcc-10'
cxx-compiler: 'g++-10'
generator: '"Unix Makefiles" -DCMAKE_UNITY_BUILD=yes'
relative_build_dir_path: ''
- job-name: 'gcc10 ninja in-source'
os-version: '20.04'
c-compiler: 'gcc-10'
cxx-compiler: 'g++-10'
generator: '"Ninja"'
relative_build_dir_path: ''
- job-name: 'gcc10 ninja out-of-source'
os-version: '20.04'
c-compiler: 'gcc-10'
cxx-compiler: 'g++-10'
generator: '"Ninja"'
relative_build_dir_path: '../'
- job-name: 'gcc10 ninja-unity'
os-version: '20.04'
c-compiler: 'gcc-10'
cxx-compiler: 'g++-10'
generator: '"Ninja" -DCMAKE_UNITY_BUILD=yes'
relative_build_dir_path: ''
name: Linux ${{ matrix.job-name }}
env:
BUILD_PATH: ${{ github.workspace }}/${{ matrix.relative_build_dir_path }}build_space
CC: ${{ matrix.c-compiler }}
CXX: ${{ matrix.cxx-compiler }}
steps:
- uses: actions/checkout@master
- uses: seanmiddleditch/gha-setup-ninja@v4
if: contains(matrix.generator, 'Ninja')
- name: install boost
run: |
sudo apt-get update -qq
sudo apt-get install -y libboost-all-dev
- uses: ./.github/actions/build-and-test
macOS:
needs: clang-format-and-update-docs
# if: false # Disable this platform temporarily
runs-on: macos-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
include:
- job-name: xcode-15.4
os-version: 'latest'
xcode-version: '15.4'
generator: '"Unix Makefiles"'
relative_build_dir_path: ''
- job-name: 'xcode-15.4-ninja in-source'
xcode-version: '15.4'
os-version: 'latest'
generator: '"Ninja"'
relative_build_dir_path: ''
- job-name: 'xcode-15.4-ninja out-of-source'
xcode-version: '15.4'
os-version: 'latest'
generator: '"Ninja"'
relative_build_dir_path: '../'
name: macOS ${{ matrix.job-name }}
env:
BUILD_PATH: ${{ github.workspace }}/${{ matrix.relative_build_dir_path }}build_space
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer'
steps:
- uses: actions/checkout@master
- uses: seanmiddleditch/gha-setup-ninja@v4
if: contains(matrix.generator, 'Ninja')
- name: install boost
run: |
brew install boost
- uses: ./.github/actions/build-and-test
Windows:
needs: clang-format-and-update-docs
# if: false # Disable this platform temporarily
runs-on: windows-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
include:
- job-name: VS-2019
os-version: '2019'
generator: '"Visual Studio 16 2019"'
- job-name: VS-2019 (clangcl)
os-version: '2019'
generator: '"Visual Studio 16 2019" -T "clangcl"'
- job-name: VS-latest
os-version: 'latest'
generator: '"Visual Studio 17 2022"'
- job-name: VS-latest (clangcl)
os-version: 'latest'
generator: '"Visual Studio 17 2022" -T "clangcl"'
name: Windows ${{ matrix.job-name }}
env:
BUILD_PATH: ${{ github.workspace }}/build_space
steps:
- uses: actions/checkout@master
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: ./.github/actions/setup-conan
- name: install boost
run: |
${boostroot} = "${env:GITHUB_WORKSPACE}\boost_install"
conan install boost/1.72.0@ -o boost:header_only=True -g deploy --install-folder ${boostroot}
echo "BOOST_ROOT=${boostroot}\boost" >> ${env:GITHUB_ENV}
# DOS paths - with backslashes - are not compatible with the github bash
# shell that is invoked in build-and-test/actions.yml - so sadly the code
# in that file is pasted in here
# - uses: ./.github/actions/build-and-test
- name: configure
run: |
mkdir ${{ env.BUILD_PATH }}
cd ${{ env.BUILD_PATH }}
cmake --version
cmake -G ${{ matrix.generator }} ${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug
- name: build
run: |
cd ${{ env.BUILD_PATH }}
cmake --build . --parallel 4
- name: test
run: |
cd ${{ env.BUILD_PATH }}
ctest --verbose --output-on-failure -C Debug