-
Notifications
You must be signed in to change notification settings - Fork 52
171 lines (166 loc) · 6.16 KB
/
Copy pathintegration-awslc.yml
File metadata and controls
171 lines (166 loc) · 6.16 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Copyright (c) The mlkem-native project authors
# Copyright (c) The mldsa-native project authors
# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
name: AWS-LC
permissions:
contents: read
on:
workflow_call:
inputs:
commit:
type: string
description: Commit to test against
default: main
repository:
type: string
description: Repository to fetch
default: aws/aws-lc
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.commit }}
cancel-in-progress: true
env:
DEPENDENCIES: 'cmake golang unifdef'
jobs:
aws_lc_integration_fips:
strategy:
fail-fast: false
matrix:
system: [ubuntu-latest, ubuntu-24.04-arm]
fips: [0,1]
name: AWS-LC FIPS test (${{ matrix.system }}, FIPS=${{ matrix.fips }})
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-os
with:
packages: ${{ env.DEPENDENCIES }}
- uses: ./.github/actions/setup-aws-lc
with:
repository: ${{ inputs.repository }}
commit: ${{ inputs.commit }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Apply pre-import patch if present
run: |
cd "$AWSLC_DIR"
if [ -f "$GITHUB_WORKSPACE/integration/aws-lc/pre_import.patch" ]; then
git apply "$GITHUB_WORKSPACE/integration/aws-lc/pre_import.patch"
fi
- name: Run importer
run: |
cd "$AWSLC_DIR/crypto/fipsmodule/ml_dsa"
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh --force
- name: Apply post-import patch if present
run: |
cd "$AWSLC_DIR"
if [ -f "$GITHUB_WORKSPACE/integration/aws-lc/post_import.patch" ]; then
git apply "$GITHUB_WORKSPACE/integration/aws-lc/post_import.patch"
fi
- name: Build+Test AWS-LC (FIPS=${{ matrix.fips }})
run: |
cd "$AWSLC_DIR"
mkdir build
cd build
cmake -DFIPS=${{ matrix.fips }} ..
cd ..
cmake --build ./build --target all
cmake --build ./build --target run_tests
posix:
# This is a partial parallelization of the run_posix_tests.sh script
strategy:
max-parallel: 16
fail-fast: false
matrix:
system: [ubuntu-latest, ubuntu-24.04-arm]
test:
- name: Debug mode
flags: -DENABLE_DILITHIUM=ON
- name: Release mode
flags: -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
- name: Small compilation
flags: -DOPENSSL_SMALL=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
- name: No-ASM
flags: -DOPENSSL_NO_ASM=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
- name: Shared
flags: -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
- name: Pre-Gen ASM
flags: -DDISABLE_PERL=ON -DENABLE_DILITHIUM=ON
- name: DIT
flags: -DENABLE_DATA_INDEPENDENT_TIMING=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_DILITHIUM=ON
name: Posix test (${{ matrix.test.name }}, ${{ matrix.system }})
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-os
with:
packages: ${{ env.DEPENDENCIES }}
- uses: ./.github/actions/setup-aws-lc
with:
repository: ${{ inputs.repository }}
commit: ${{ inputs.commit }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Apply pre-import patch if present
run: |
cd "$AWSLC_DIR"
if [ -f "$GITHUB_WORKSPACE/integration/aws-lc/pre_import.patch" ]; then
git apply "$GITHUB_WORKSPACE/integration/aws-lc/pre_import.patch"
fi
- name: Run importer
run: |
cd "$AWSLC_DIR/crypto/fipsmodule/ml_dsa"
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh --force
- name: Apply post-import patch if present
run: |
cd "$AWSLC_DIR"
if [ -f "$GITHUB_WORKSPACE/integration/aws-lc/post_import.patch" ]; then
git apply "$GITHUB_WORKSPACE/integration/aws-lc/post_import.patch"
fi
- name: Run test
run: |
cd "$AWSLC_DIR"
source tests/ci/common_posix_setup.sh
build_and_test ${{ matrix.test.flags }}
prefix:
# This is a parallelization of the run_prefix_tests.sh script
strategy:
max-parallel: 8
fail-fast: false
matrix:
system: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-15-intel]
test:
- name: Prefix+Debug
flags:
- name: Prefix+Release
flags: -DCMAKE_BUILD_TYPE=Release
name: Prefix test (${{ matrix.test.name }}, ${{ matrix.system }})
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-os
with:
packages: ${{ env.DEPENDENCIES }}
- uses: ./.github/actions/setup-aws-lc
with:
repository: ${{ inputs.repository }}
commit: ${{ inputs.commit }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Apply pre-import patch if present
run: |
cd "$AWSLC_DIR"
if [ -f "$GITHUB_WORKSPACE/integration/aws-lc/pre_import.patch" ]; then
git apply $"GITHUB_WORKSPACE/integration/aws-lc/pre_import.patch"
fi
- name: Run importer
run: |
cd "$AWSLC_DIR/crypto/fipsmodule/ml_dsa"
GITHUB_REPOSITORY=$GITHUB_REPOSITORY GITHUB_SHA=$GITHUB_SHA ./importer.sh --force
- name: Apply post-import patch if present
run: |
cd "$AWSLC_DIR"
if [ -f "$GITHUB_WORKSPACE/integration/aws-lc/post_import.patch" ]; then
git apply "$GITHUB_WORKSPACE/integration/aws-lc/post_import.patch"
fi
- name: Run test
run: |
cd "$AWSLC_DIR"
source tests/ci/common_posix_setup.sh
build_prefix_and_test ${{ matrix.test.flags }}