forked from pq-code-package/mlkem-c-embedded
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (68 loc) · 1.79 KB
/
build.yaml
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
# SPDX-License-Identifier: Apache-2.0
name: Build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ "main" ]
jobs:
build_test:
runs-on: ubuntu-latest
defaults:
run:
shell: nix develop .#ci -c bash -e {0}
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
with:
devShell: ci
script: |
astyle --version
arm-none-eabi-gcc --version
qemu-system-arm --version
- name: Lint
run: |
lint
- name: Build targets
run: |
make_platform() {
echo "::group::make platform $1"
make PLATFORM="$1"
code1=$?
echo "::endgroup::"
echo "::group::make platform $1 nistkat"
make PLATFORM="$1" RNG=NISTKAT nistkat
code2=$?
echo "::endgroup::"
return $(( code1 || code2 ))
}
export -f make_platform
tests --list-platforms | grep -v "mps2" | xargs -I {} bash -c 'make_platform "$@" || exit 1' _ {}
- name: Functional test
id: func_test
run: |
tests-qemu func
- name: Speed test
id: speed_test
if: |
success()
|| steps.func_test.conclusion == 'failure'
run: |
tests-qemu speed
- name: Stack test
id: stack_test
if: |
success()
|| steps.func_test.conclusion == 'failure'
|| steps.speed_test.conclusion == 'failure'
run: |
tests-qemu stack
- name: Nistkat test
if: |
success()
|| steps.func_test.conclusion == 'failure'
|| steps.speed_test.conclusion == 'failure'
|| steps.stack_test.conclusion == 'failure'
run: |
tests-qemu nistkat