Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C-only AWS-LC integration test #654

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/actions/setup-aws-lc/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup AWS-LC
description: Setup AWS-LC

inputs:
dir:
description: Directory to fetch AWS-LC into
default: 'AWS-LC'
repository:
description: Repository to fetch from
default: 'aws/AWS-LC'
commit:
description: Commit to fetch
default: 'HEAD'
gh_token:
description: Github access token to use
required: true

runs:
using: composite
steps:
- name: Fetch AWS-LC
shell: bash
run: |
mkdir ${{ inputs.dir }} && cd ${{ inputs.dir }}
git config --global --add safe.directory $GITHUB_WORKSPACE/${{ inputs.dir }}
git init
git remote add origin $GITHUB_SERVER_URL/${{ inputs.repository }}
git fetch origin --depth 1 ${{ inputs.commit }}
git checkout FETCH_HEAD

# Remember AWS-LC directory
echo AWSLC_DIR="$GITHUB_WORKSPACE/${{ inputs.dir }}" >> $GITHUB_ENV
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,45 @@ jobs:
- name: monolithic_build_multilevel
run: |
make run -C examples/monolithic_build_multilevel
aws_lc_integration:
strategy:
matrix:
system: [Ubuntu-latest]
name: AWS-LC integration test
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup-os
with:
packages: 'cmake'
- uses: ./.github/actions/setup-aws-lc
with:
repository: 'hanno-becker/aws-lc'
commit: 'mlkem_native'
- name: Run importer
run: |
cd $AWSLC_DIR/crypto/fipsmodule/ml_kem
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh
- name: Build AWS-LC (FIPS=1)
run: |
cd $AWSLC_DIR
mkdir build_fips
cd build_fips
cmake -DFIPS=1 ..
cd ..

cmake --build ./build_fips --target all
cmake --build ./build_fips --target run_tests
- name: Build AWS-LC (FIPS=0)
run: |
cd $AWSLC_DIR
mkdir build_no_fips
cd build_no_fips
cmake ..
cd ..

cmake --build ./build_no_fips --target all
cmake --build ./build_no_fips --target run_tests
build_kat:
needs: [quickcheck, quickcheck-windows, quickcheck-c90, quickcheck-lib, examples, lint, lint-markdown-link]
strategy:
Expand Down
Loading