-
Notifications
You must be signed in to change notification settings - Fork 51
208 lines (197 loc) · 6.35 KB
/
integration.yml
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: integration
on:
push:
branches:
- '*'
- '!generate/aws-lc-*'
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
# We can pin the version if nightly is too unstable.
# Otherwise, we test against the latest version.
RUST_NIGHTLY_TOOLCHAIN: nightly
jobs:
s2n-quic-integration:
if: github.repository_owner == 'aws'
name: s2n-quic-integration
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-14-xlarge ]
env:
GIT_CLONE_PROTECTION_ACTIVE: false
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Run s2n-quic integration
working-directory: ./aws-lc-rs
run: |
./scripts/run-s2n-quic-integration.sh
rustls-integration:
if: github.repository_owner == 'aws'
name: rustls-integration
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-14-xlarge ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install cargo-download
run: cargo install cargo-download
- name: Run rustls integration
working-directory: ./aws-lc-rs
run: |
./scripts/run-rustls-integration.sh
links-crate-tests:
if: github.repository_owner == 'aws'
name: sys crate tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-14-xlarge, windows-latest ]
features: [ aws-lc-rs, aws-lc-rs-fips, aws-lc-sys, aws-lc-fips-sys ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Install NASM on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
- name: Setup Go >=v1.18
uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v4
- name: Run cargo test
working-directory: ./links-testing
run: cargo test --features ${{ matrix.features }} --no-default-features
- name: Run cargo run
working-directory: ./links-testing
run: cargo run --features ${{ matrix.features }} --no-default-features
publish-dry-run:
if: github.repository_owner == 'aws'
name: publish dry-run
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [ stable ]
os: [ windows-latest, ubuntu-latest, macos-13, macos-14-xlarge ]
crate: [ aws-lc-sys, aws-lc-rs, aws-lc-fips-sys ]
args:
- publish --dry-run
steps:
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- run: go version
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/setup-nasm@v1
- name: Install ninja-build tool
if: ${{ matrix.os == 'windows-latest' }}
uses: seanmiddleditch/gha-setup-ninja@v4
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: ${{ matrix.crate }}
working-directory: ./${{ matrix.crate }}
run: cargo ${{ matrix.args }}
- name: Clean
run: cargo clean
- name: Force Linux shared build
working-directory: ./${{ matrix.crate }}
if: ${{ matrix.os == 'ubuntu-latest' }}
# Doc-tests fail to link with dynamic build
# See: https://github.com/rust-lang/cargo/issues/8531
run: AWS_LC_SYS_STATIC=0 AWS_LC_FIPS_SYS_STATIC=0 cargo publish --dry-run
## Verify that prebuilt-nasm objects were published properly
publish-dry-run-prebuild-nasm:
if: github.repository_owner == 'aws'
name: publish dry-run prebuilt-nasm
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
crate: [ aws-lc-sys, aws-lc-rs ]
args:
- publish --dry-run
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: stable
- name: Set Rust toolchain override
run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Verify NASM not available
shell: bash
run: |
if nasm --version; then
exit 1
else
exit 0;
fi
- name: ${{ matrix.crate }}
working-directory: ./${{ matrix.crate }}
shell: bash
run: AWS_LC_SYS_PREBUILT_NASM=1 cargo publish --dry-run
msrv:
name: Minimum Supported Rust Version
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-13, macos-14-xlarge, windows-latest ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
lfs: true
- if: ${{ startsWith(matrix.os, 'macos-') }}
run: |
brew install llvm
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"'
echo 'export LIBCLANG_PATH=/opt/homebrew/opt/llvm' >> "$GITHUB_ENV"
- name: Install NASM on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
- name: Install MSRV Rust version
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.63.0 # TODO: dynamically identify MSRV
- name: Verify msrv
working-directory: ./aws-lc-rs
run: cargo +1.63.0 check --features bindgen