Skip to content

Commit 8723b62

Browse files
committed
CI: Introduce a dedicated workflow for AWS-LC integration
Signed-off-by: Hanno Becker <[email protected]>
1 parent 9cd852d commit 8723b62

File tree

2 files changed

+132
-56
lines changed

2 files changed

+132
-56
lines changed

.github/workflows/aws_lc.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
name: AWS-LC
4+
permissions:
5+
contents: read
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches: ["main"]
10+
pull_request:
11+
branches: ["main"]
12+
types: [ "opened", "synchronize" ]
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
aws_lc_integration_fips:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
system: [ubuntu-latest, pqcp-arm64]
24+
fips: [0,1]
25+
name: AWS-LC FIPS test (${{ matrix.system }}, FIPS=${{ matrix.fips }})
26+
runs-on: ${{ matrix.system }}
27+
steps:
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
- uses: ./.github/actions/setup-os
30+
with:
31+
packages: 'cmake'
32+
- uses: ./.github/actions/setup-aws-lc
33+
with:
34+
repository: 'hanno-becker/aws-lc'
35+
commit: 'mlkem_native'
36+
- name: Run importer
37+
run: |
38+
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
39+
rm -rf mlkem
40+
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
41+
- name: Build+Test AWS-LC (FIPS=${{ matrix.fips }})
42+
run: |
43+
cd $AWSLC_DIR
44+
mkdir build
45+
cd build
46+
cmake -DFIPS=${{ matrix.fips }} ..
47+
cd ..
48+
49+
cmake --build ./build --target all
50+
cmake --build ./build --target run_tests
51+
posix:
52+
# This is a partial parallelization of the run_posix_tests.sh script
53+
strategy:
54+
max-parallel: 8
55+
fail-fast: false
56+
matrix:
57+
system: [ubuntu-latest, pqcp-arm64, macos-latest, macos-13]
58+
test:
59+
- name: Debug mode
60+
flags: -DENABLE_DILITHIUM=ON
61+
- name: Release mode
62+
flags: -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
63+
- name: Dilithium disabled
64+
flags: -DENABLE_DILITHIUM=OFF
65+
- name: Small compilation
66+
flags: -DOPENSSL_SMALL=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
67+
- name: LibSSL off.
68+
flags: -DBUILD_LIBSSL=OFF -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
69+
- name: No-ASM
70+
flags: -DOPENSSL_NO_ASM=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
71+
- name: Shared
72+
flags: -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
73+
- name: Pre-Gen ASM
74+
flags: -DDISABLE_PERL=ON -DENABLE_DILITHIUM=ON
75+
- name: DIT
76+
flags: -DENABLE_DATA_INDEPENDENT_TIMING=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
77+
name: Posix test (${{ matrix.test.name }}, ${{ matrix.system }})
78+
runs-on: ${{ matrix.system }}
79+
steps:
80+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
81+
- uses: ./.github/actions/setup-os
82+
with:
83+
packages: 'cmake golang'
84+
- uses: ./.github/actions/setup-aws-lc
85+
with:
86+
repository: 'hanno-becker/aws-lc'
87+
commit: 'mlkem_native'
88+
- name: Run importer
89+
run: |
90+
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
91+
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
92+
- name: Run test
93+
run: |
94+
cd $AWSLC_DIR
95+
source tests/ci/common_posix_setup.sh
96+
build_and_test ${{ matrix.test.flags }}
97+
prefix:
98+
# This is a parallelization of the run_prefix_tests.sh script
99+
strategy:
100+
max-parallel: 8
101+
fail-fast: false
102+
matrix:
103+
system: [ubuntu-latest, pqcp-arm64, macos-latest, macos-13]
104+
test:
105+
- name: Testing a prefix build of AWS-LC in debug mode.
106+
flags:
107+
- name: Testing a prefix build of AWS-LC in release mode.
108+
flags: -DCMAKE_BUILD_TYPE=Release
109+
- name: Testing a prefix build of AWS-LC small compilation.
110+
flags: -DOPENSSL_SMALL=1 -DCMAKE_BUILD_TYPE=Release
111+
- name: Testing a prefix build of AWS-LC in no asm mode.
112+
flags: -DOPENSSL_NO_ASM=1 -DCMAKE_BUILD_TYPE=Release
113+
name: Prefix test (${{ matrix.test.name }}, ${{ matrix.system }})
114+
runs-on: ${{ matrix.system }}
115+
steps:
116+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
117+
- uses: ./.github/actions/setup-os
118+
with:
119+
packages: 'cmake golang'
120+
- uses: ./.github/actions/setup-aws-lc
121+
with:
122+
repository: 'hanno-becker/aws-lc'
123+
commit: 'mlkem_native'
124+
- name: Run importer
125+
run: |
126+
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
127+
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
128+
- name: Run test
129+
run: |
130+
cd $AWSLC_DIR
131+
source tests/ci/common_posix_setup.sh
132+
build_prefix_and_test ${{ matrix.flags }}

.github/workflows/ci.yml

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -217,62 +217,6 @@ jobs:
217217
./scripts/autogen ${{ matrix.backend.arg }} ${{ matrix.simplify.arg }}
218218
make clean
219219
OPT=1 make quickcheck
220-
aws_lc_integration_fips:
221-
strategy:
222-
fail-fast: false
223-
matrix:
224-
system: [ubuntu-latest, pqcp-arm64]
225-
fips: [0,1]
226-
name: AWS-LC FIPS test (${{ matrix.system }}, FIPS=${{ matrix.fips }})
227-
runs-on: ${{ matrix.system }}
228-
steps:
229-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
230-
- uses: ./.github/actions/setup-os
231-
with:
232-
packages: 'cmake'
233-
- uses: ./.github/actions/setup-aws-lc
234-
with:
235-
repository: 'hanno-becker/aws-lc'
236-
commit: 'mlkem_native'
237-
- name: Run importer
238-
run: |
239-
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
240-
rm -rf mlkem
241-
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
242-
- name: Build+Test AWS-LC (FIPS=${{ matrix.fips }})
243-
run: |
244-
cd $AWSLC_DIR
245-
mkdir build
246-
cd build
247-
cmake -DFIPS=${{ matrix.fips }} ..
248-
cd ..
249-
250-
cmake --build ./build --target all
251-
cmake --build ./build --target run_tests
252-
aws_lc_integration_posix:
253-
strategy:
254-
fail-fast: false
255-
matrix:
256-
system: [ubuntu-latest, pqcp-arm64, macos-latest]
257-
name: AWS-LC Posix test (${{ matrix.system }})
258-
runs-on: ${{ matrix.system }}
259-
steps:
260-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
261-
- uses: ./.github/actions/setup-os
262-
with:
263-
packages: 'cmake golang'
264-
- uses: ./.github/actions/setup-aws-lc
265-
with:
266-
repository: 'hanno-becker/aws-lc'
267-
commit: 'mlkem_native'
268-
- name: Run importer
269-
run: |
270-
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
271-
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
272-
- name: Run POSIX tests
273-
run: |
274-
cd $AWSLC_DIR
275-
./tests/ci/run_posix_tests.sh
276220
build_kat:
277221
needs: [quickcheck, quickcheck-windows, quickcheck-c90, quickcheck-lib, examples, lint, lint-markdown-link]
278222
strategy:

0 commit comments

Comments
 (0)