@@ -3,11 +3,11 @@ name: cross
3
3
on :
4
4
push :
5
5
branches :
6
- - ' * '
7
- - ' !generate/aws-lc-*'
6
+ - " * "
7
+ - " !generate/aws-lc-*"
8
8
pull_request :
9
9
branches :
10
- - ' * '
10
+ - " * "
11
11
concurrency :
12
12
group : ${{ github.workflow }}-${{ github.ref_name }}
13
13
cancel-in-progress : true
21
21
jobs :
22
22
aws-lc-rs-cross-test :
23
23
if : github.repository_owner == 'aws'
24
- name : cross tests ${{ matrix.target }}
24
+ name : cross tests ${{ matrix.target[0] }}
25
25
runs-on : ubuntu-22.04
26
26
strategy :
27
27
fail-fast : false
28
28
matrix :
29
29
target :
30
- - aarch64-linux-android
31
- - aarch64-unknown-linux-gnu
32
- - aarch64-unknown-linux-musl
33
- - arm-linux-androideabi
34
- - arm-unknown-linux-gnueabihf
35
- - armv7-linux-androideabi
36
- - armv7-unknown-linux-gnueabihf
37
- - i686-unknown-linux-gnu
38
- - powerpc-unknown-linux-gnu
39
- - powerpc64-unknown-linux-gnu
40
- - powerpc64le-unknown-linux-gnu
41
- - riscv64gc-unknown-linux-gnu
42
- - s390x-unknown-linux-gnu
43
- - x86_64-pc-windows-gnu
44
- - x86_64-unknown-linux-musl
30
+ - [aarch64-linux-android, 0]
31
+ - [aarch64-unknown-linux-gnu, 1]
32
+ - [aarch64-unknown-linux-musl, 1]
33
+ - [arm-linux-androideabi, 0]
34
+ - [arm-unknown-linux-gnueabihf, 0]
35
+ - [arm-unknown-linux-musleabi, 1]
36
+ - [arm-unknown-linux-musleabihf, 1]
37
+ - [armv7-linux-androideabi, 0]
38
+ - [armv7-unknown-linux-gnueabihf, 0]
39
+ - [i686-unknown-linux-gnu, 0]
40
+ - [powerpc-unknown-linux-gnu, 1]
41
+ - [powerpc64-unknown-linux-gnu, 1]
42
+ - [powerpc64le-unknown-linux-gnu, 1]
43
+ - [riscv64gc-unknown-linux-gnu, 0]
44
+ - [s390x-unknown-linux-gnu, 0]
45
+ - [x86_64-pc-windows-gnu, 0]
46
+ - [x86_64-unknown-linux-musl, 0]
45
47
steps :
46
48
- uses : actions/checkout@v3
47
49
with :
48
- submodules : ' recursive'
50
+ submodules : " recursive"
49
51
- uses : dtolnay/rust-toolchain@master
50
52
with :
51
- toolchain : ' stable'
53
+ toolchain : " stable"
52
54
- name : Install cross
53
55
run : cargo install cross --git https://github.com/cross-rs/cross
54
56
- uses : dtolnay/rust-toolchain@master
55
57
id : toolchain
56
58
with :
57
- toolchain : ' stable'
58
- target : ${{ matrix.target }}
59
+ toolchain : " stable"
60
+ target : ${{ matrix.target[0] }}
59
61
- name : Set Rust toolchain override
60
62
run : rustup override set ${{ steps.toolchain.outputs.name }}
61
63
# The flag below is set to avoid the following error with GCC 11.4.0 on the riscv64 platform:
62
64
# /home/runner/work/aws-lc-rs/aws-lc-rs/aws-lc-sys/aws-lc/crypto/pem/pem_lib.c:707:11: error: 'strncmp' of strings of length 1 and 9 and bound of 9 evaluates to nonzero [-Werror=string-compare]
63
65
# 707 | if (strncmp(buf, "-----END ", 9) == 0) {
64
66
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
- - if : ${{ matrix.target == 'riscv64gc-unknown-linux-gnu' }}
67
+ - if : ${{ matrix.target[0] == 'riscv64gc-unknown-linux-gnu' }}
66
68
run : |
67
69
echo 'AWS_LC_SYS_CFLAGS="-Wno-string-compare"' >> "$GITHUB_ENV"
68
- - name : Cross-compilation (build debug)
69
- run : cross build -p aws-lc-rs --features unstable --target ${{ matrix.target }}
70
+ - if : ${{ !startsWith(matrix.target[0], 'x86_64') }}
71
+ run : |
72
+ echo 'AWS_LC_RS_DISABLE_SLOW_TESTS=1' >> "$GITHUB_ENV"
70
73
- name : Cross-compilation (test release)
71
- run : cross test -p aws-lc-rs --release --features unstable --target ${{ matrix.target }}
72
-
74
+ run : cross test -p aws-lc-rs --release --features unstable --target ${{ matrix.target[0] }}
75
+ - if : ${{ matrix.target[1] == 1 }}
76
+ name : Cross-compilation (test FIPS release)
77
+ run : cross test -p aws-lc-rs --release --no-default-features --features fips --target ${{ matrix.target[0] }}
73
78
74
79
aws-lc-rs-cross-0_2_5-test :
75
80
if : github.repository_owner == 'aws'
76
81
name : cross tests ${{ matrix.target }}
77
82
runs-on : ubuntu-latest
78
83
env :
79
- CROSS_CONFIG : ' ./Cross.toml.x86_64-unknown-linux-gnu'
84
+ CROSS_CONFIG : " ./Cross.toml.x86_64-unknown-linux-gnu"
80
85
strategy :
81
86
fail-fast : false
82
87
matrix :
@@ -85,16 +90,16 @@ jobs:
85
90
steps :
86
91
- uses : actions/checkout@v3
87
92
with :
88
- submodules : ' recursive'
93
+ submodules : " recursive"
89
94
- uses : dtolnay/rust-toolchain@master
90
95
with :
91
- toolchain : ' stable'
96
+ toolchain : " stable"
92
97
- name : Install cross
93
98
run : cargo install cross --locked --version 0.2.5
94
99
- uses : dtolnay/rust-toolchain@master
95
100
id : toolchain
96
101
with :
97
- toolchain : ' stable'
102
+ toolchain : " stable"
98
103
target : ${{ matrix.target }}
99
104
- name : Set Rust toolchain override
100
105
run : rustup override set ${{ steps.toolchain.outputs.name }}
@@ -110,7 +115,7 @@ jobs:
110
115
steps :
111
116
- uses : actions/checkout@v3
112
117
with :
113
- submodules : ' recursive'
118
+ submodules : " recursive"
114
119
- run : |
115
120
brew install llvm
116
121
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"'
@@ -132,7 +137,7 @@ jobs:
132
137
steps :
133
138
- uses : actions/checkout@v3
134
139
with :
135
- submodules : ' recursive'
140
+ submodules : " recursive"
136
141
- run : |
137
142
brew install llvm
138
143
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"'
@@ -147,7 +152,6 @@ jobs:
147
152
- name : Release build for `x86_64-apple-ios`
148
153
run : cargo build -p aws-lc-rs --release --target x86_64-apple-ios --features bindgen
149
154
150
-
151
155
cargo-xwin :
152
156
if : github.repository_owner == 'aws'
153
157
runs-on : ubuntu-latest
@@ -158,7 +162,7 @@ jobs:
158
162
sudo apt-get update && sudo apt-get install --assume-yes nasm clang ninja-build llvm
159
163
- uses : actions/checkout@v3
160
164
with :
161
- submodules : ' recursive'
165
+ submodules : " recursive"
162
166
- uses : dtolnay/rust-toolchain@master
163
167
with :
164
168
toolchain : stable
@@ -182,13 +186,13 @@ jobs:
182
186
fail-fast : false
183
187
matrix :
184
188
target :
185
- - ' x86_64-pc-windows-gnu'
186
- - ' i686-pc-windows-gnu'
189
+ - " x86_64-pc-windows-gnu"
190
+ - " i686-pc-windows-gnu"
187
191
steps :
188
192
- uses : ilammy/setup-nasm@v1
189
193
- uses : actions/checkout@v4
190
194
with :
191
- submodules : ' recursive'
195
+ submodules : " recursive"
192
196
- uses : dtolnay/rust-toolchain@master
193
197
id : toolchain
194
198
with :
@@ -212,19 +216,19 @@ jobs:
212
216
fail-fast : false
213
217
matrix :
214
218
target :
215
- - ' x86_64-pc-windows-msvc'
216
- - ' i686-pc-windows-msvc'
217
- - ' aarch64-pc-windows-msvc'
219
+ - " x86_64-pc-windows-msvc"
220
+ - " i686-pc-windows-msvc"
221
+ - " aarch64-pc-windows-msvc"
218
222
crt_static :
219
- - ' 0 '
220
- - ' 1 '
223
+ - " 0 "
224
+ - " 1 "
221
225
steps :
222
226
- name : Install NASM
223
227
if : ${{ matrix.target == 'x86_64-pc-windows-msvc' || matrix.target == 'i686-pc-windows-msvc' }}
224
228
uses : ilammy/setup-nasm@v1
225
229
- uses : actions/checkout@v4
226
230
with :
227
- submodules : ' recursive'
231
+ submodules : " recursive"
228
232
- uses : dtolnay/rust-toolchain@master
229
233
id : toolchain
230
234
with :
@@ -255,11 +259,11 @@ jobs:
255
259
strategy :
256
260
fail-fast : false
257
261
matrix :
258
- target : [ 13.4, 14.1 ]
262
+ target : [13.4, 14.1]
259
263
steps :
260
264
- uses : actions/checkout@v4
261
265
with :
262
- submodules : ' recursive'
266
+ submodules : " recursive"
263
267
- name : Prepare VM
264
268
uses : vmactions/freebsd-vm@v1
265
269
with :
@@ -280,11 +284,11 @@ jobs:
280
284
steps :
281
285
- uses : actions/checkout@v4
282
286
with :
283
- submodules : ' recursive'
287
+ submodules : " recursive"
284
288
- uses : dtolnay/rust-toolchain@stable
285
289
id : toolchain
286
290
with :
287
- toolchain : ' stable'
291
+ toolchain : " stable"
288
292
target : x86_64-pc-windows-gnu
289
293
- name : Install mingw
290
294
run : sudo apt-get update && sudo apt-get install --assume-yes mingw-w64
0 commit comments