Debian Codegraph @

others/mbedtls/tf-psa-crypto/drivers/pqcp/mldsa-native/.github/actions/multi-functest/action.yml

raw symbols SCIP
1 # Copyright (c) The mlkem-native project authors
2 # Copyright (c) The mldsa-native project authors
3 # SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
4
5 name: Multiple Functional tests
6 description: Run functional tests
7
8 inputs:
9 nix-shell:
10 description: Run in the specified Nix environment if exists
11 default: "ci"
12 custom_shell:
13 description: The shell to use. Only relevant if no nix-shell specified
14 default: "bash"
15 nix-cache:
16 description: Determine whether to enable nix cache
17 default: 'false'
18 nix-verbose:
19 description: Determine wether to suppress nix log or not
20 default: 'false'
21 gh_token:
22 description: Github access token to use
23 required: true
24 cflags:
25 description: CFLAGS to pass to compilation
26 default: ""
27 ldflags:
28 description: LDFLAGS to pass to linking
29 default: ""
30 compile_mode:
31 description: all | native | cross-x86_64 | cross-aarch64 | cross-riscv64 | cross-riscv32
32 default: "native"
33 opt:
34 description: all | opt | no_opt
35 default: "all"
36 func:
37 description: Determine whether to run functional test or not
38 default: "true"
39 kat:
40 description: Determine whether to run kat test or not
41 default: "true"
42 acvp:
43 description: Determine whether to run acvp test or not
44 default: "true"
45 examples:
46 description: Determine whether to run examples or not
47 default: "true"
48 unit:
49 description: Determine whether to run unit tests or not
50 default: "true"
51 check_namespace:
52 description: Determine whether to check namespacing or not
53 default: "true"
54 stack:
55 description: Determine whether to run stack analysis or not
56 default: "false"
57 alloc:
58 description: Determine whether to run alloc tests or not
59 default: "true"
60 rng_fail:
61 description: Determine whether to run rng fail tests or not
62 default: "true"
63 extra_args:
64 description: Additional arguments to pass to the tests script
65 default: ""
66 extra_env:
67 description: Additional environment variables to set when calling the tests script
68 default: ""
69 runs:
70 using: composite
71 steps:
72 - name: Native Tests
73 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'native') }}
74 uses: ./.github/actions/functest
75 with:
76 nix-shell: ${{ inputs.nix-shell }}
77 nix-cache: ${{ inputs.nix-cache }}
78 nix-verbose: ${{ inputs.nix-verbose }}
79 gh_token: ${{ inputs.gh_token }}
80 custom_shell: ${{ inputs.custom_shell }}
81 cflags: ${{ inputs.cflags }}
82 ldflags: ${{ inputs.ldflags }}
83 opt: ${{ inputs.opt }}
84 func: ${{ inputs.func }}
85 kat: ${{ inputs.kat }}
86 unit: ${{ inputs.unit }}
87 acvp: ${{ inputs.acvp }}
88 examples: ${{ inputs.examples }}
89 check_namespace: ${{ inputs.check_namespace }}
90 stack: ${{ inputs.stack }}
91 alloc: ${{ inputs.alloc }}
92 rng_fail: ${{ inputs.rng_fail }}
93 extra_args: ${{ inputs.extra_args }}
94 extra_env: ${{ inputs.extra_env }}
95 - name: Cross x86_64 Tests
96 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-x86_64') && (success() || failure()) }}
97 uses: ./.github/actions/functest
98 with:
99 nix-shell: ${{ inputs.nix-shell }}
100 nix-cache: ${{ inputs.nix-cache }}
101 nix-verbose: ${{ inputs.nix-verbose }}
102 gh_token: ${{ inputs.gh_token }}
103 custom_shell: ${{ inputs.custom_shell }}
104 cflags: "${{ inputs.cflags }} -DMLD_FORCE_X86_64"
105 ldflags: ${{ inputs.ldflags }}
106 cross_prefix: x86_64-unknown-linux-gnu-
107 exec_wrapper: qemu-x86_64
108 opt: ${{ inputs.opt }}
109 func: ${{ inputs.func }}
110 kat: ${{ inputs.kat }}
111 unit: ${{ inputs.unit }}
112 acvp: ${{ inputs.acvp }}
113 examples: ${{ inputs.examples }}
114 check_namespace: ${{ inputs.check_namespace }}
115 stack: ${{ inputs.stack }}
116 alloc: ${{ inputs.alloc }}
117 rng_fail: ${{ inputs.rng_fail }}
118 extra_args: ${{ inputs.extra_args }}
119 extra_env: ${{ inputs.extra_env }}
120 - name: Cross aarch64 Tests
121 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-aarch64') && (success() || failure()) }}
122 uses: ./.github/actions/functest
123 with:
124 nix-shell: ${{ inputs.nix-shell }}
125 nix-cache: ${{ inputs.nix-cache }}
126 nix-verbose: ${{ inputs.nix-verbose }}
127 gh_token: ${{ inputs.gh_token }}
128 custom_shell: ${{ inputs.custom_shell }}
129 cflags: "${{ inputs.cflags }} -DMLD_FORCE_AARCH64"
130 ldflags: ${{ inputs.ldflags }}
131 cross_prefix: aarch64-unknown-linux-gnu-
132 exec_wrapper: qemu-aarch64
133 opt: ${{ inputs.opt }}
134 func: ${{ inputs.func }}
135 kat: ${{ inputs.kat }}
136 unit: ${{ inputs.unit }}
137 acvp: ${{ inputs.acvp }}
138 examples: ${{ inputs.examples }}
139 check_namespace: ${{ inputs.check_namespace }}
140 stack: ${{ inputs.stack }}
141 alloc: ${{ inputs.alloc }}
142 rng_fail: ${{ inputs.rng_fail }}
143 extra_args: ${{ inputs.extra_args }}
144 extra_env: ${{ inputs.extra_env }}
145 - name: Cross ppc64le Tests
146 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-ppc64le') && (success() || failure()) }}
147 uses: ./.github/actions/functest
148 with:
149 nix-shell: ${{ inputs.nix-shell }}
150 nix-cache: ${{ inputs.nix-cache }}
151 nix-verbose: ${{ inputs.nix-verbose }}
152 gh_token: ${{ inputs.gh_token }}
153 custom_shell: ${{ inputs.custom_shell }}
154 cflags: "${{ inputs.cflags }} -DMLD_FORCE_PPC64LE"
155 ldflags: ${{ inputs.ldflags }}
156 cross_prefix: powerpc64le-unknown-linux-gnu-
157 exec_wrapper: qemu-ppc64le
158 opt: ${{ inputs.opt }}
159 func: ${{ inputs.func }}
160 kat: ${{ inputs.kat }}
161 unit: ${{ inputs.unit }}
162 acvp: ${{ inputs.acvp }}
163 examples: ${{ inputs.examples }}
164 check_namespace: ${{ inputs.check_namespace }}
165 stack: ${{ inputs.stack }}
166 alloc: ${{ inputs.alloc }}
167 rng_fail: ${{ inputs.rng_fail }}
168 extra_args: ${{ inputs.extra_args }}
169 extra_env: ${{ inputs.extra_env }}
170 - name: Cross aarch64_be Tests
171 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-aarch64_be') && (success() || failure()) }}
172 uses: ./.github/actions/functest
173 with:
174 nix-shell: ${{ inputs.nix-shell }}
175 nix-cache: ${{ inputs.nix-cache }}
176 nix-verbose: ${{ inputs.nix-verbose }}
177 gh_token: ${{ inputs.gh_token }}
178 custom_shell: ${{ inputs.custom_shell }}
179 cflags: "${{ inputs.cflags }} -DMLD_FORCE_AARCH64_EB"
180 ldflags: "${{ inputs.ldflags }} -static"
181 cross_prefix: aarch64_be-none-linux-gnu-
182 exec_wrapper: qemu-aarch64_be
183 opt: ${{ inputs.opt }}
184 func: ${{ inputs.func }}
185 kat: ${{ inputs.kat }}
186 unit: ${{ inputs.unit }}
187 acvp: ${{ inputs.acvp }}
188 examples: ${{ inputs.examples }}
189 check_namespace: ${{ inputs.check_namespace }}
190 stack: ${{ inputs.stack }}
191 alloc: ${{ inputs.alloc }}
192 rng_fail: ${{ inputs.rng_fail }}
193 extra_args: ${{ inputs.extra_args }}
194 extra_env: ${{ inputs.extra_env }}
195 - name: Cross riscv64 Tests (RVV, VLEN=128)
196 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-riscv64') && (success() || failure()) }}
197 uses: ./.github/actions/functest
198 with:
199 nix-shell: ${{ inputs.nix-shell }}
200 nix-cache: ${{ inputs.nix-cache }}
201 nix-verbose: ${{ inputs.nix-verbose }}
202 gh_token: ${{ inputs.gh_token }}
203 custom_shell: ${{ inputs.custom_shell }}
204 cflags: "${{ inputs.cflags }} -DMLD_FORCE_RISCV64"
205 ldflags: ${{ inputs.ldflags }}
206 cross_prefix: riscv64-unknown-linux-gnu-
207 exec_wrapper: "qemu-riscv64 -cpu rv64,v=true,vlen=128"
208 opt: ${{ inputs.opt }}
209 func: ${{ inputs.func }}
210 kat: ${{ inputs.kat }}
211 unit: ${{ inputs.unit }}
212 acvp: ${{ inputs.acvp }}
213 examples: ${{ inputs.examples }}
214 check_namespace: ${{ inputs.check_namespace }}
215 stack: ${{ inputs.stack }}
216 alloc: ${{ inputs.alloc }}
217 rng_fail: ${{ inputs.rng_fail }}
218 extra_args: ${{ inputs.extra_args }}
219 extra_env: ${{ inputs.extra_env }}
220 - name: Cross riscv64 Tests (RVV, VLEN=256)
221 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-riscv64') && (success() || failure()) }}
222 uses: ./.github/actions/functest
223 with:
224 nix-shell: ${{ inputs.nix-shell }}
225 nix-cache: ${{ inputs.nix-cache }}
226 nix-verbose: ${{ inputs.nix-verbose }}
227 gh_token: ${{ inputs.gh_token }}
228 custom_shell: ${{ inputs.custom_shell }}
229 cflags: "${{ inputs.cflags }} -DMLD_FORCE_RISCV64"
230 cross_prefix: riscv64-unknown-linux-gnu-
231 exec_wrapper: "qemu-riscv64 -cpu rv64,v=true,vlen=256"
232 opt: ${{ inputs.opt }}
233 func: ${{ inputs.func }}
234 kat: ${{ inputs.kat }}
235 unit: ${{ inputs.unit }}
236 acvp: ${{ inputs.acvp }}
237 examples: ${{ inputs.examples }}
238 check_namespace: ${{ inputs.check_namespace }}
239 stack: ${{ inputs.stack }}
240 alloc: ${{ inputs.alloc }}
241 rng_fail: ${{ inputs.rng_fail }}
242 extra_args: ${{ inputs.extra_args }}
243 extra_env: ${{ inputs.extra_env }}
244 - name: Cross riscv64 Tests (RVV, VLEN=512)
245 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-riscv64') && (success() || failure()) }}
246 uses: ./.github/actions/functest
247 with:
248 nix-shell: ${{ inputs.nix-shell }}
249 nix-cache: ${{ inputs.nix-cache }}
250 nix-verbose: ${{ inputs.nix-verbose }}
251 gh_token: ${{ inputs.gh_token }}
252 custom_shell: ${{ inputs.custom_shell }}
253 cflags: "${{ inputs.cflags }} -DMLD_FORCE_RISCV64"
254 cross_prefix: riscv64-unknown-linux-gnu-
255 exec_wrapper: "qemu-riscv64 -cpu rv64,v=true,vlen=512"
256 opt: ${{ inputs.opt }}
257 func: ${{ inputs.func }}
258 kat: ${{ inputs.kat }}
259 unit: ${{ inputs.unit }}
260 acvp: ${{ inputs.acvp }}
261 examples: ${{ inputs.examples }}
262 check_namespace: ${{ inputs.check_namespace }}
263 stack: ${{ inputs.stack }}
264 alloc: ${{ inputs.alloc }}
265 rng_fail: ${{ inputs.rng_fail }}
266 extra_args: ${{ inputs.extra_args }}
267 extra_env: ${{ inputs.extra_env }}
268 - name: Cross riscv64 Tests (RVV, VLEN=1024)
269 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-riscv64') && (success() || failure()) }}
270 uses: ./.github/actions/functest
271 with:
272 nix-shell: ${{ inputs.nix-shell }}
273 nix-cache: ${{ inputs.nix-cache }}
274 nix-verbose: ${{ inputs.nix-verbose }}
275 gh_token: ${{ inputs.gh_token }}
276 custom_shell: ${{ inputs.custom_shell }}
277 cflags: "${{ inputs.cflags }} -DMLD_FORCE_RISCV64"
278 cross_prefix: riscv64-unknown-linux-gnu-
279 exec_wrapper: "qemu-riscv64 -cpu rv64,v=true,vlen=1024"
280 opt: ${{ inputs.opt }}
281 func: ${{ inputs.func }}
282 kat: ${{ inputs.kat }}
283 unit: ${{ inputs.unit }}
284 acvp: ${{ inputs.acvp }}
285 examples: ${{ inputs.examples }}
286 check_namespace: ${{ inputs.check_namespace }}
287 stack: ${{ inputs.stack }}
288 alloc: ${{ inputs.alloc }}
289 rng_fail: ${{ inputs.rng_fail }}
290 extra_args: ${{ inputs.extra_args }}
291 extra_env: ${{ inputs.extra_env }}
292 - name: Cross riscv32 Tests
293 if: ${{ (inputs.compile_mode == 'all' || inputs.compile_mode == 'cross-riscv32') && (success() || failure()) }}
294 uses: ./.github/actions/functest
295 with:
296 nix-shell: ${{ inputs.nix-shell }}
297 nix-cache: ${{ inputs.nix-cache }}
298 nix-verbose: ${{ inputs.nix-verbose }}
299 gh_token: ${{ inputs.gh_token }}
300 custom_shell: ${{ inputs.custom_shell }}
301 cflags: "${{ inputs.cflags }} -DMLD_FORCE_RISCV32"
302 ldflags: ${{ inputs.ldflags }}
303 cross_prefix: riscv32-unknown-linux-gnu-
304 exec_wrapper: qemu-riscv32
305 opt: ${{ inputs.opt }}
306 func: ${{ inputs.func }}
307 kat: ${{ inputs.kat }}
308 unit: ${{ inputs.unit }}
309 acvp: ${{ inputs.acvp }}
310 examples: ${{ inputs.examples }}
311 check_namespace: ${{ inputs.check_namespace }}
312 stack: ${{ inputs.stack }}
313 alloc: ${{ inputs.alloc }}
314 rng_fail: ${{ inputs.rng_fail }}
315 extra_args: ${{ inputs.extra_args }}
316 extra_env: ${{ inputs.extra_env }}
317