Skip to content

Commit 10ee5b5

Browse files
committed
Add basic AWS-LC integration test
This commit extends the CI with an integration test for AWS-LC. The integration test currently works with the `mlkem_native` branch from the fork `hanno-becker/aws-lc`, which - Removes the reference implementation - Provides an importer.sh for importing mlkem-native - Provides the glue code between mlkem-native's own API and the API expected by AWS-LC. - As a temporary change, it disables `-Werror=redundant-decls`, because mlkem-native does not yet support it. The CI checks that mlkem-native successfully integrated to this fork, by building and running basic tests of AWS-LC in FIPS and non-FIPS mode. Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
1 parent b6ad677 commit 10ee5b5

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
name: Setup AWS-LC
4+
description: Setup AWS-LC
5+
6+
inputs:
7+
dir:
8+
description: Directory to fetch AWS-LC into
9+
default: 'AWS-LC'
10+
repository:
11+
description: Repository to fetch from
12+
default: 'aws/AWS-LC'
13+
commit:
14+
description: Commit to fetch
15+
default: 'HEAD'
16+
gh_token:
17+
description: Github access token to use
18+
required: true
19+
20+
runs:
21+
using: composite
22+
steps:
23+
- name: Fetch AWS-LC
24+
shell: bash
25+
run: |
26+
mkdir ${{ inputs.dir }} && cd ${{ inputs.dir }}
27+
git config --global --add safe.directory $GITHUB_WORKSPACE/${{ inputs.dir }}
28+
git init
29+
git remote add origin $GITHUB_SERVER_URL/${{ inputs.repository }}
30+
git fetch origin --depth 1 ${{ inputs.commit }}
31+
git checkout FETCH_HEAD
32+
33+
# Remember AWS-LC directory
34+
echo AWSLC_DIR="$GITHUB_WORKSPACE/${{ inputs.dir }}" >> $GITHUB_ENV

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,45 @@ jobs:
161161
- name: multilevel_build
162162
run: |
163163
make run -C examples/multilevel_build
164+
aws_lc_integration:
165+
strategy:
166+
matrix:
167+
system: [Ubuntu-latest]
168+
name: AWS-LC integration test
169+
runs-on: ${{ matrix.system }}
170+
steps:
171+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
172+
- uses: ./.github/actions/setup-os
173+
with:
174+
packages: 'cmake'
175+
- uses: ./.github/actions/setup-aws-lc
176+
with:
177+
repository: 'hanno-becker/aws-lc'
178+
commit: 'mlkem_native'
179+
- name: Run importer
180+
run: |
181+
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
182+
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
183+
- name: Build AWS-LC (FIPS=1)
184+
run: |
185+
cd $AWSLC_DIR
186+
mkdir build_fips
187+
cd build_fips
188+
cmake -DFIPS=1 ..
189+
cd ..
190+
191+
cmake --build ./build_fips --target all
192+
cmake --build ./build_fips --target run_tests
193+
- name: Build AWS-LC (FIPS=0)
194+
run: |
195+
cd $AWSLC_DIR
196+
mkdir build_no_fips
197+
cd build_no_fips
198+
cmake ..
199+
cd ..
200+
201+
cmake --build ./build_no_fips --target all
202+
cmake --build ./build_no_fips --target run_tests
164203
build_kat:
165204
needs: [quickcheck, quickcheck-windows, quickcheck-c90, quickcheck-lib, examples, lint, lint-markdown-link]
166205
strategy:

0 commit comments

Comments
 (0)