-
Notifications
You must be signed in to change notification settings - Fork 50
185 lines (172 loc) · 5.71 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
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-12, macos-13-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-12, macos-13-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-12, macos-13-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-12, macos-13-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
msrv:
name: Minimum Supported Rust Version
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-12, macos-13-xlarge, windows-latest ]
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
lfs: true
- if: ${{ matrix.os == 'macos-13-xlarge' }}
run: |
brew install llvm
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"'
echo 'export LIBCLANG_PATH=/opt/homebrew/opt/llvm' >> "$GITHUB_ENV"
- if: ${{ matrix.os == 'macos-12' }}
run: |
brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"'
echo 'export LIBCLANG_PATH=/usr/local/opt/llvm' >> "$GITHUB_ENV"
- name: Install NASM on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
- name: Install ninja-build tool
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@v4
- 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