-
Notifications
You must be signed in to change notification settings - Fork 469
122 lines (116 loc) · 4.02 KB
/
basic.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
name: Basic checks
permissions:
contents: read
on: [ push, pull_request, workflow_dispatch ]
jobs:
stylecheck:
name: Check code formatting
container: openquantumsafe/ci-ubuntu-focal-x86_64:latest
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Ensure code conventions are upheld
run: python3 -m pytest --verbose tests/test_code_conventions.py
- name: Check that doxygen can parse the documentation
run: mkdir build && ./scripts/run_doxygen.sh $(which doxygen) ./docs/.Doxyfile ./build
- name: Validate CBOM
run: scripts/validate_cbom.sh
upstreamcheck:
name: Check upstream code is properly integrated
strategy:
fail-fast: false
matrix:
copy-mode:
- copy
- libjade
container: openquantumsafe/ci-ubuntu-focal-x86_64:latest
runs-on: ubuntu-latest
steps:
- name: Setup nix
uses: cachix/install-nix-action@v26
- name: Setup jasmin-compiler
run: |
nix-channel --add https://nixos.org/channels/nixos-23.11 nixpkgs && \
nix-channel --update && nix-env -iA nixpkgs.jasmin-compiler
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Verify copy_from_upstream state after "${{ matrix.copy-mode}}"
run: |
git config --global user.name "ciuser" && \
git config --global user.email "[email protected]" && \
export LIBOQS_DIR=`pwd` && \
git config --global --add safe.directory $LIBOQS_DIR && \
cd scripts/copy_from_upstream && \
! pip3 install --require-hashes -r requirements.txt 2>&1 | grep -i ERROR && \
python3 copy_from_upstream.py ${{ matrix.copy-mode }} && \
! git status | grep modified
buildcheck_linux:
name: Basic Linux build # Check that code passes a basic build before starting heavier tests
needs: [ stylecheck, upstreamcheck ]
strategy:
matrix:
runner:
- ubuntu-latest
#- oqs-arm64
container:
- openquantumsafe/ci-ubuntu-focal-x86_64:latest
#- openquantumsafe/ci-ubuntu-jammy:latest
#- openquantumsafe/ci-ubuntu-noble:latest
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
env:
KEM_NAME: kyber_768
SIG_NAME: dilithium_3
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Configure
run: |
mkdir build && \
cd build && \
cmake .. --warn-uninitialized \
-GNinja \
-DOQS_MINIMAL_BUILD="KEM_$KEM_NAME;SIG_$SIG_NAME" \
> config.log 2>&1 && \
cat config.log && \
cmake -LA -N .. && \
! (grep "uninitialized variable" config.log)
- name: Build code
run: ninja
working-directory: build
- name: Build documentation
run: ninja gen_docs
working-directory: build
buildcheck_macos:
name: Basic macOS build
needs: [ stylecheck, upstreamcheck ]
strategy:
matrix:
runner:
- macos-12
- macos-13
- macos-14
env:
KEM_NAME: kyber_768
SIG_NAME: dilithium_3
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- name: Configure
run: |
mkdir build && \
cd build && \
cmake .. --warn-uninitialized \
-GNinja \
-DOQS_MINIMAL_BUILD="KEM_$KEM_NAME;SIG_$SIG_NAME" \
> config.log 2>&1 && \
cat config.log && \
cmake -LA -N .. && \
! (grep "uninitialized variable" config.log)
- name: Build code
run: ninja
working-directory: build
- name: Build documentation
run: ninja gen_docs
working-directory: build