Repository navigation
431 lines (374 loc) · 13 KB
/
Copy pathci.yml
File metadata and controls
431 lines (374 loc) · 13 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
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# (C) 2020,2022 Jack Lloyd
# (C) 2022 René Meusel, Rohde & Schwarz Cybersecurity
#
# Botan is released under the Simplified BSD License (see license.txt)
name: ci
permissions:
contents: read
# implicitly all other scopes not listed become none
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# cancel running workflows when new commits are being pushed in pull requests
# but not on the master branch
concurrency:
group: ${{ github.workflow }} @ ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
windows:
name: "Windows"
strategy:
fail-fast: false
matrix:
include:
- target: shared
arch: x86_64
host_os: windows-2022
compiler: msvc
- target: static
arch: x86_64
host_os: windows-2022
compiler: msvc
- target: amalgamation
arch: x86_64
host_os: windows-2022
compiler: msvc
- target: shared
arch: x86
host_os: windows-2022
compiler: msvc
- target: amalgamation
arch: x86
host_os: windows-2022
compiler: msvc
- target: shared
arch: x86_64
host_os: windows-2022
compiler: clangcl
- target: static
arch: x86
host_os: windows-2022
compiler: clangcl
- target: shared
arch: arm64
host_os: windows-11-arm
compiler: msvc
- target: static
arch: arm64
host_os: windows-11-arm
compiler: msvc
- target: amalgamation
arch: arm64
host_os: windows-11-arm
compiler: msvc
- target: shared
arch: arm64
host_os: windows-11-arm
compiler: clangcl
runs-on: ${{ matrix.host_os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read Repository Configuration
uses: ./.github/actions/read-repo-config
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: ${{ matrix.target }}
compiler: msvc
cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.target }}
arch: ${{ matrix.arch }}
- name: Build and Test Botan
run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --ci-image='${{ matrix.host_os }}' --make-tool='ninja' --cpu='${{ matrix.arch }}' --test-results-dir=junit_results ${{ matrix.target }}
linux:
name: "Linux"
strategy:
fail-fast: false
matrix:
include:
# gcc-11 and clang-14 are the minimum supported compilers (see doc/support.rst)
- compiler: gcc-11
target: shared
host_os: ubuntu-24.04
- compiler: gcc
target: amalgamation
host_os: ubuntu-26.04
- compiler: gcc-11
target: static
host_os: ubuntu-24.04
- compiler: clang-14
target: shared
host_os: ubuntu-24.04
runs-on: ${{ matrix.host_os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read Repository Configuration
uses: ./.github/actions/read-repo-config
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: ${{ matrix.target }}
compiler: ${{ matrix.compiler }}
cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }}
- name: Build and Test Botan
run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --ci-image='${{ matrix.host_os }}' --test-results-dir=junit_results ${{ matrix.target }}
macos:
name: "macOS"
strategy:
fail-fast: false
matrix:
include:
- target: shared
compiler: xcode
host_os: macos-15-intel
- target: amalgamation
compiler: xcode
host_os: macos-15-intel
make_tool: ninja
- target: shared
compiler: xcode
host_os: macos-15 # uses Apple Silicon
make_tool: ninja
- target: amalgamation
compiler: xcode
host_os: macos-15 # uses Apple Silicon
runs-on: ${{ matrix.host_os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read Repository Configuration
uses: ./.github/actions/read-repo-config
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: ${{ matrix.target }}
compiler: ${{ matrix.compiler }}
cache-key: macos-${{ matrix.compiler }}-${{ matrix.host_os }}-${{ matrix.target }}
- name: Build and Test Botan
run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --ci-image='${{ matrix.host_os }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }}
acvp:
name: "ACVP"
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read Repository Configuration
uses: ./.github/actions/read-repo-config
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: acvp
compiler: gcc
cache-key: linux-x86_64-acvp
- name: Run ACVP Tests
run: python3 ./src/scripts/ci_build.py --cc=gcc --make-tool=make acvp
clang-tidy:
name: "Clang Tidy"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read Repository Configuration
uses: ./.github/actions/read-repo-config
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: clang-tidy
compiler: clang
cache-key: linux-x86_64-clang-tidy
- name: Configure Build
run: python3 ./configure.py --cc=clang --build-targets=shared,cli,tests,examples,bogo_shim --build-fuzzers=test --with-boost --with-sqlite --with-zlib --with-lzma --with-bzip2 --with-tpm2
- name: Run Clang Tidy
run: |
python3 ./src/scripts/dev_tools/run_clang_tidy.py
- name: Display Clang Tidy Results
if: failure()
run: ./src/scripts/ci/gh_clang_tidy_fixes_in_pr.py clang_tidy_diagnostics
analysis:
name: "Analysis"
strategy:
fail-fast: false
matrix:
include:
- target: sanitizer
compiler: clang
host_os: ubuntu-26.04
- target: valgrind
compiler: clang
host_os: ubuntu-26.04
- target: fuzzers
compiler: gcc
host_os: ubuntu-26.04
- target: lint
compiler: gcc
host_os: ubuntu-26.04
- target: format
compiler: gcc
host_os: ubuntu-24.04 # Still using clang-format-17 for now
- target: limbo
compiler: gcc
host_os: ubuntu-26.04
- target: plzn
compiler: gcc
host_os: ubuntu-26.04
- target: typos
compiler: gcc
host_os: ubuntu-26.04
runs-on: ${{ matrix.host_os }}
steps:
- uses: actions/checkout@v4
with:
path: ./source
persist-credentials: false
- name: Read Repository Configuration
uses: ./source/.github/actions/read-repo-config
- name: Fetch BoringSSL fork for BoGo tests
uses: actions/checkout@v4
with:
persist-credentials: false
repository: ${{ env.BORINGSSL_REPO }}
ref: ${{ env.BORINGSSL_BRANCH }}
path: ./boringssl
if: matrix.target == 'sanitizer'
- name: Fetch plzn for TLS conformance tests
uses: actions/checkout@v4
with:
persist-credentials: false
repository: ${{ env.PLZN_REPO }}
ref: ${{ env.PLZN_GIT_REV }}
path: ./plzn
if: matrix.target == 'plzn'
- name: Setup Build Agent
uses: ./source/.github/actions/setup-build-agent
with:
target: ${{ matrix.target }}
compiler: ${{ matrix.compiler }}
cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }}
- name: Build and Test Botan
run: python3 ./source/src/scripts/ci_build.py --root-dir=${{ github.workspace }}/source --build-dir=${{ github.workspace }}/build --boringssl-dir=${{ github.workspace }}/boringssl --plzn-dir=${{ github.workspace }}/plzn --cc='${{ matrix.compiler }}' --ci-image='${{ matrix.host_os }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }}
specials:
name: "Special"
strategy:
fail-fast: false
matrix:
include:
- target: examples
compiler: gcc
host_os: ubuntu-26.04
- target: minimized
compiler: gcc
host_os: ubuntu-26.04
- target: no_tls12
compiler: gcc
host_os: ubuntu-26.04
- target: no_tls13
compiler: gcc
host_os: ubuntu-26.04
- target: policy-bsi
compiler: gcc
host_os: ubuntu-26.04
- target: policy-fips140
compiler: gcc
host_os: ubuntu-26.04
- target: policy-modern
compiler: gcc
host_os: ubuntu-26.04
- target: docs
compiler: gcc
host_os: ubuntu-26.04
- target: no_pcurves
compiler: gcc
host_os: ubuntu-26.04
- target: optional-rngs
compiler: gcc
host_os: ubuntu-26.04
- target: pkcs11
compiler: gcc
host_os: ubuntu-26.04
runs-on: ${{ matrix.host_os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
path: ./source
- name: Read Repository Configuration
uses: ./source/.github/actions/read-repo-config
- name: Fetch BoringSSL fork for BoGo tests
uses: actions/checkout@v4
with:
persist-credentials: false
repository: ${{ env.BORINGSSL_REPO }}
ref: ${{ env.BORINGSSL_BRANCH }}
path: ./boringssl
if: matrix.target == 'no_tls12' || matrix.target == 'no_tls13'
- name: Setup Build Agent
uses: ./source/.github/actions/setup-build-agent
with:
target: ${{ matrix.target }}
compiler: ${{ matrix.compiler }}
cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-x86_64-${{ matrix.target }}
- name: Build and Test Botan
run: python3 ./source/src/scripts/ci_build.py --root-dir=${{ github.workspace }}/source --build-dir=${{ github.workspace }}/build --boringssl-dir=${{ github.workspace }}/boringssl --cc='${{ matrix.compiler }}' --ci-image='${{ matrix.host_os }}' --test-results-dir=junit_results ${{ matrix.target }}
x-compile:
name: "Cross"
strategy:
fail-fast: false
matrix:
include:
- target: cross-i386
compiler: gcc
host_os: ubuntu-26.04
- target: shared
compiler: gcc
host_os: ubuntu-26.04-arm
- target: amalgamation
compiler: gcc
host_os: ubuntu-26.04-arm
- target: shared
compiler: clang
host_os: ubuntu-26.04-arm
- target: cross-ppc64
compiler: gcc
host_os: ubuntu-26.04
- target: cross-mips64
compiler: gcc
host_os: ubuntu-24.04 # no MIPS cross compiler in 26.04
- target: cross-loongarch64
compiler: gcc
host_os: ubuntu-26.04
- target: cross-android-arm64
compiler: clang
host_os: ubuntu-26.04
- target: static
compiler: gcc
host_os: windows-2022
make_tool: make
- target: cross-ios-arm64
compiler: xcode
host_os: macos-26
- target: cross-arm32-baremetal
compiler: gcc
host_os: ubuntu-26.04
runs-on: ${{ matrix.host_os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Read Repository Configuration
uses: ./.github/actions/read-repo-config
- name: Setup Build Agent
uses: ./.github/actions/setup-build-agent
with:
target: ${{ matrix.target }}
compiler: ${{ matrix.compiler }}
cache-key: ${{ matrix.host_os }}-${{ matrix.compiler }}-xcompile-${{ matrix.target }}
- name: Build and Test Botan
run: python3 ./src/scripts/ci_build.py --cc='${{ matrix.compiler }}' --ci-image='${{ matrix.host_os }}' --make-tool='${{ matrix.make_tool }}' --test-results-dir=junit_results ${{ matrix.target }}