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