-
Notifications
You must be signed in to change notification settings - Fork 45
333 lines (331 loc) · 11 KB
/
base.yml
File metadata and controls
333 lines (331 loc) · 11 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
# Copyright (c) The mlkem-native project authors
# Copyright (c) The mldsa-native project authors
# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
name: Base
permissions:
contents: read
on:
workflow_call:
workflow_dispatch:
jobs:
lint:
strategy:
fail-fast: false
matrix:
system: [ubuntu-latest, ubuntu-24.04-arm]
name: Linting
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/lint
with:
nix-shell: linter
gh_token: ${{ secrets.GITHUB_TOKEN }}
cross-prefix: "aarch64-unknown-linux-gnu-"
quickcheck:
strategy:
fail-fast: false
matrix:
external:
- ${{ github.repository_owner != 'pq-code-package' }}
target:
- runner: ubuntu-24.04-arm
name: 'aarch64'
- runner: ubuntu-latest
name: 'x86_64'
# via https://riseproject-dev.github.io/riscv-runner/
- runner: ubuntu-24.04-riscv
name: 'riscv'
- runner: macos-latest
name: 'macos (aarch64)'
- runner: macos-15-intel
name: 'macos (x86_64)'
exclude:
- {external: true,
target: {
runner: ubuntu-24.04-arm,
name: 'aarch64'
}}
name: Quickcheck (${{ matrix.target.name }})
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: make quickcheck
run: |
OPT=0 make quickcheck
make clean >/dev/null
OPT=1 make quickcheck
- uses: ./.github/actions/setup-os
- name: tests func
run: |
./scripts/tests func --check-namespace
quickcheck-acvp:
strategy:
fail-fast: false
matrix:
external:
- ${{ github.repository_owner != 'pq-code-package' }}
target:
- runner: ubuntu-24.04-arm
name: 'aarch64'
- runner: ubuntu-latest
name: 'x86_64'
# via https://riseproject-dev.github.io/riscv-runner/
- runner: ubuntu-24.04-riscv
name: 'riscv'
acvp-version: [v1.1.0.40, v1.1.0.41, v1.1.0.42]
exclude:
- {external: true,
target: {
runner: ubuntu-24.04-arm,
name: 'aarch64'
}}
name: Quickcheck ACVP (${{ matrix.target.name }}, ${{ matrix.acvp-version }})
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run ACVP test
run: |
./scripts/tests acvp --version ${{ matrix.acvp-version }}
quickcheck_bench:
strategy:
fail-fast: false
matrix:
external:
- ${{ github.repository_owner != 'pq-code-package' }}
target:
- runner: ubuntu-24.04-arm
name: 'aarch64'
- runner: ubuntu-latest
name: 'x86_64'
- runner: macos-latest
name: 'macos (aarch64)'
- runner: macos-15-intel
name: 'macos (x86_64)'
exclude:
- {external: true,
target: {
runner: ubuntu-24.04-arm,
name: 'aarch64'
}}
name: Quickcheck bench (${{ matrix.target.name }})
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "tests bench (cycles: NO)"
run: |
./scripts/tests bench -c NO
- name: "tests bench (build only, cycles: PMU)"
if: ${{ matrix.target.name != 'macos (aarch64)' && matrix.target.name != 'macos (x86_64)' }}
run: |
make clean
./scripts/tests bench -c PMU --no-run
- name: "tests bench (build only, cycles: PERF)"
if: ${{ matrix.target.name != 'macos (aarch64)' && matrix.target.name != 'macos (x86_64)' }}
run: |
make clean
./scripts/tests bench -c PERF --no-run
- name: "tests bench (build only, cycles: MAC)"
if: ${{ matrix.target.name == 'macos (aarch64)' || matrix.target.name == 'macos (x86_64)' }}
run: |
make clean
./scripts/tests bench -c MAC --no-run
- name: tests bench components
run: |
make clean
./scripts/tests bench --components -c NO
quickcheck-c90:
strategy:
fail-fast: false
matrix:
external:
- ${{ github.repository_owner != 'pq-code-package' }}
target:
- runner: ubuntu-24.04-arm
name: 'aarch64'
- runner: ubuntu-latest
name: 'x86_64'
exclude:
- {external: true,
target: {
runner: ubuntu-24.04-arm,
name: 'aarch64'
}}
name: Quickcheck C90 (${{ matrix.target.name }})
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: make quickcheck
run: |
OPT=0 CFLAGS=-std=c90 make quickcheck
make clean >/dev/null
OPT=1 CFLAGS=-std=c90 make quickcheck
- uses: ./.github/actions/setup-apt
- name: tests func
run: |
./scripts/tests func --cflags="-std=c90" --check-namespace
- name: tests bench
run: |
./scripts/tests bench -c NO --cflags="-std=c90"
- name: tests bench components
run: |
./scripts/tests bench --components -c NO --cflags="-std=c90"
quickcheck-windows:
strategy:
fail-fast: false
matrix:
system: [windows-2025, windows-2022]
name: Quickcheck ${{ matrix.system }}
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Build test
shell: powershell
run: |
# print compiler version
cl
nmake /f ./Makefile.Microsoft_nmake quickcheck
quickcheck-windows-mingw-w64:
strategy:
fail-fast: false
matrix:
# Oldest available + 3 latest; intermediate versions run in legacy-compilers.
mingw-version: [5.4.0, 13.2.0, 14.2.0, 15.2.0]
name: Quickcheck (Mingw-w64 ${{ matrix.mingw-version }})
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install MinGW-w64
run: choco install mingw --version=${{ matrix.mingw-version }} -y
shell: cmd
- name: make quickcheck
shell: bash
run: |
CC=gcc OPT=0 make quickcheck
CC=gcc make clean >/dev/null
CC=gcc OPT=1 make quickcheck
quickcheck-lib:
name: Quickcheck lib
strategy:
matrix:
system: [macos-latest, macos-15-intel, ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: make lib
run: |
make lib
examples:
name: Examples
strategy:
matrix:
system: [macos-latest, macos-15-intel, ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: basic
run: |
CFLAGS="-O0" make run -C examples/basic
- name: basic_deterministic
run: |
CFLAGS="-O0" make run -C examples/basic_deterministic
- name: basic_lowram
run: |
CFLAGS="-O0" make run -C examples/basic_lowram
- name: bring_your_own_fips202
run: |
CFLAGS="-O0" make run -C examples/bring_your_own_fips202
- name: bring_your_own_fips202_static
run: |
CFLAGS="-O0" make run -C examples/bring_your_own_fips202_static
- name: custom_backend
run: |
CFLAGS="-O0" make run -C examples/custom_backend
- name: monolithic_build
run: |
CFLAGS="-O0" make run -C examples/monolithic_build
- name: monolithic_build_native
run: |
CFLAGS="-O0" make run -C examples/monolithic_build_native
- name: monolithic_build_multilevel
run: |
CFLAGS="-O0" make run -C examples/monolithic_build_multilevel
- name: monolithic_build_multilevel_native
run: |
CFLAGS="-O0" make run -C examples/monolithic_build_multilevel_native
- name: multilevel_build
run: |
CFLAGS="-O0" make run -C examples/multilevel_build
- name: multilevel_build_native
run: |
CFLAGS="-O0" make run -C examples/multilevel_build_native
simpasm:
strategy:
fail-fast: false
matrix:
backend:
- arg: '--aarch64-clean'
name: Clean
- arg: ''
name: Optimized
simplify:
- arg: ''
name: Simplified
- arg: '--no-simplify'
name: Unmodified
runs-on: ubuntu-24.04-arm
name: AArch64 dev backend (${{ matrix.backend.name }}, ${{ matrix.simplify.name }})
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Reinstate and test backend
uses: ./.github/actions/setup-shell
with:
nix-shell: 'ci'
gh_token: ${{ secrets.GITHUB_TOKEN }}
script: |
./scripts/autogen ${{ matrix.backend.arg }} ${{ matrix.simplify.arg }}
make clean
OPT=1 make quickcheck
x86_64_intel_syntax:
name: x86_64 Intel syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Generate with Intel syntax and test
uses: ./.github/actions/setup-shell
with:
nix-shell: 'ci'
gh_token: ${{ secrets.GITHUB_TOKEN }}
script: |
./scripts/autogen --x86-64-syntax intel
make clean
./scripts/tests all
scan-build:
strategy:
fail-fast: false
matrix:
external:
- ${{ github.repository_owner != 'pq-code-package' }}
target:
- runner: ubuntu-24.04-arm
name: 'aarch64'
- runner: ubuntu-latest
name: 'x86_64'
name: scan-build (${{ matrix.target.name }})
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: ./.github/actions/setup-apt
with:
packages: clang-tools clang
- name: make quickcheck
run: |
scan-build --status-bugs make quickcheck OPT=0
make clean >/dev/null
scan-build --status-bugs make quickcheck OPT=1
symlink-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: donatj/symlink-check-action@b3c737d0fd4e52752f0b8c71a03f3f775fa015cb