23
23
strategy :
24
24
matrix :
25
25
rust :
26
- - 1.49 .0 # MSRV
26
+ - 1.56 .0 # MSRV
27
27
- stable
28
28
target :
29
29
- thumbv7em-none-eabi
@@ -36,13 +36,25 @@ jobs:
36
36
target : ${{ matrix.target }}
37
37
profile : minimal
38
38
override : true
39
- - run : cargo check --features compact,ctr,force-soft
40
- - run : cargo build --release --target ${{ matrix.target }}
41
- - run : cargo build --release --target ${{ matrix.target }} --features compact
42
- - run : cargo build --release --target ${{ matrix.target }} --features ctr
43
- - run : cargo build --release --target ${{ matrix.target }} --features force-soft
44
- - run : cargo build --release --target ${{ matrix.target }} --features hazmat
45
- - run : cargo build --release --target ${{ matrix.target }} --features compact,ctr,force-soft
39
+ - run : cargo check
40
+ - run : |
41
+ cargo build --target ${{ matrix.target }}
42
+ cargo build --target ${{ matrix.target }} --features hazmat
43
+ - env :
44
+ RUSTFLAGS : " -Dwarnings --cfg aes_force_soft"
45
+ run : |
46
+ cargo build --target ${{ matrix.target }}
47
+ cargo build --target ${{ matrix.target }} --features hazmat
48
+ - env :
49
+ RUSTFLAGS : " -Dwarnings --cfg aes_compact"
50
+ run : |
51
+ cargo build --target ${{ matrix.target }}
52
+ cargo build --target ${{ matrix.target }} --features hazmat
53
+ - env :
54
+ RUSTFLAGS : " -Dwarnings --cfg aes_force_soft --cfg aes_compact"
55
+ run : |
56
+ cargo build --target ${{ matrix.target }}
57
+ cargo build --target ${{ matrix.target }} --features hazmat
46
58
47
59
# Tests for the AES-NI backend
48
60
aesni :
@@ -56,15 +68,15 @@ jobs:
56
68
include :
57
69
# 32-bit Linux
58
70
- target : i686-unknown-linux-gnu
59
- rust : 1.49 .0 # MSRV
71
+ rust : 1.56 .0 # MSRV
60
72
deps : sudo apt update && sudo apt install gcc-multilib
61
73
- target : i686-unknown-linux-gnu
62
74
rust : stable
63
75
deps : sudo apt update && sudo apt install gcc-multilib
64
76
65
77
# 64-bit Linux
66
78
- target : x86_64-unknown-linux-gnu
67
- rust : 1.49 .0 # MSRV
79
+ rust : 1.56 .0 # MSRV
68
80
- target : x86_64-unknown-linux-gnu
69
81
rust : stable
70
82
steps :
76
88
profile : minimal
77
89
override : true
78
90
- run : ${{ matrix.deps }}
79
- - run : cargo test --release --target ${{ matrix.target }}
80
- - run : cargo test --release --target ${{ matrix.target }} --features compact
81
- - run : cargo test --release --target ${{ matrix.target }} --features ctr
82
- - run : cargo test --release --target ${{ matrix.target }} --features force-soft
83
- - run : cargo test --release --target ${{ matrix.target }} --features hazmat
84
- - run : cargo test --release --target ${{ matrix.target }} --all-features
91
+ - run : cargo test --target ${{ matrix.target }}
92
+ - run : cargo test --target ${{ matrix.target }} --features hazmat
93
+ - run : cargo test --target ${{ matrix.target }} --all-features
85
94
86
95
# Tests for CPU feature autodetection with fallback to portable software implementation
87
96
autodetect :
@@ -91,15 +100,15 @@ jobs:
91
100
include :
92
101
# 32-bit Linux
93
102
- target : i686-unknown-linux-gnu
94
- rust : 1.49 .0 # MSRV
103
+ rust : 1.56 .0 # MSRV
95
104
deps : sudo apt update && sudo apt install gcc-multilib
96
105
- target : i686-unknown-linux-gnu
97
106
rust : stable
98
107
deps : sudo apt update && sudo apt install gcc-multilib
99
108
100
109
# 64-bit Linux
101
110
- target : x86_64-unknown-linux-gnu
102
- rust : 1.49 .0 # MSRV
111
+ rust : 1.56 .0 # MSRV
103
112
- target : x86_64-unknown-linux-gnu
104
113
rust : stable
105
114
steps :
@@ -111,29 +120,29 @@ jobs:
111
120
profile : minimal
112
121
override : true
113
122
- run : ${{ matrix.deps }}
114
- - run : cargo test --release --target ${{ matrix.target }}
115
- - run : cargo test --release --target ${{ matrix.target }} --features compact
116
- - run : cargo test --release --target ${{ matrix.target }} --features ctr
117
- - run : cargo test --release --target ${{ matrix.target }} --features hazmat
118
- - run : cargo test --release --target ${{ matrix.target }} --all-features
123
+ - run : cargo test --target ${{ matrix.target }}
124
+ - run : cargo test --target ${{ matrix.target }} --features hazmat
125
+ - run : cargo test --target ${{ matrix.target }} --all-features
119
126
120
- # Tests for the portable software backend (i.e. `force-soft `-only)
127
+ # Tests for the portable software backend (i.e. `aes_force_soft `-only)
121
128
soft :
122
129
runs-on : ubuntu-latest
130
+ env :
131
+ RUSTFLAGS : " -Dwarnings --cfg aes_force_soft"
123
132
strategy :
124
133
matrix :
125
134
include :
126
135
# 32-bit Linux
127
136
- target : i686-unknown-linux-gnu
128
- rust : 1.41 .0 # MSRV (temporarily lower than with CPU feature auto-detection)
137
+ rust : 1.56 .0 # MSRV
129
138
deps : sudo apt update && sudo apt install gcc-multilib
130
139
- target : i686-unknown-linux-gnu
131
140
rust : stable
132
141
deps : sudo apt update && sudo apt install gcc-multilib
133
142
134
143
# 64-bit Linux
135
144
- target : x86_64-unknown-linux-gnu
136
- rust : 1.41 .0 # MSRV (temporarily lower than with CPU feature auto-detection)
145
+ rust : 1.56 .0 # MSRV
137
146
- target : x86_64-unknown-linux-gnu
138
147
rust : stable
139
148
steps :
@@ -145,10 +154,9 @@ jobs:
145
154
profile : minimal
146
155
override : true
147
156
- run : ${{ matrix.deps }}
148
- - run : cargo test --release --target ${{ matrix.target }} --features force-soft
149
- - run : cargo test --release --target ${{ matrix.target }} --features force-soft,compact
150
- - run : cargo test --release --target ${{ matrix.target }} --features force-soft,ctr
151
- - run : cargo test --release --target ${{ matrix.target }} --features force-soft,compact,ctr
157
+ - run : cargo test --target ${{ matrix.target }}
158
+ - run : cargo test --target ${{ matrix.target }} --all-features
159
+
152
160
153
161
# Cross-compiled tests
154
162
cross :
@@ -157,16 +165,20 @@ jobs:
157
165
include :
158
166
# ARM64
159
167
- target : aarch64-unknown-linux-gnu
160
- rust : 1.49 .0 # MSRV
168
+ rust : 1.56 .0 # MSRV
161
169
- target : aarch64-unknown-linux-gnu
162
170
rust : stable
163
171
164
172
# PPC32
165
173
- target : powerpc-unknown-linux-gnu
166
- rust : 1.49 .0 # MSRV
174
+ rust : 1.56 .0 # MSRV
167
175
- target : powerpc-unknown-linux-gnu
168
176
rust : stable
169
177
runs-on : ubuntu-latest
178
+ # Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
179
+ defaults :
180
+ run :
181
+ working-directory : .
170
182
steps :
171
183
- uses : actions/checkout@v1
172
184
- run : ${{ matrix.deps }}
@@ -176,22 +188,45 @@ jobs:
176
188
target : ${{ matrix.target }}
177
189
profile : minimal
178
190
override : true
179
- - run : cargo install cross
180
- - run : cross test --release --target ${{ matrix.target }}
181
- - run : cross test --release --target ${{ matrix.target }} --features compact
182
- - run : cross test --release --target ${{ matrix.target }} --features ctr
183
- - run : cross test --release --target ${{ matrix.target }} --features force-soft
184
- - run : cross test --release --target ${{ matrix.target }} --features hazmat
185
- - run : cross test --release --target ${{ matrix.target }} --features compact,ctr,force-soft,hazmat
191
+ - name : Install pre-compiled cross
192
+ run : |
193
+ export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
194
+ wget -O /tmp/binaries.tar.gz $URL
195
+ tar -C /tmp -xzf /tmp/binaries.tar.gz
196
+ mv /tmp/cross ~/.cargo/bin
197
+ - run : |
198
+ cross test --package aes --target ${{ matrix.target }}
199
+ cross test --package aes --target ${{ matrix.target }} --features hazmat
200
+ - env :
201
+ RUSTFLAGS : " -Dwarnings --cfg aes_force_soft"
202
+ run : |
203
+ cross test --package aes --target ${{ matrix.target }}
204
+ cross test --package aes --target ${{ matrix.target }} --features hazmat
205
+ - env :
206
+ RUSTFLAGS : " -Dwarnings --cfg aes_compact"
207
+ run : |
208
+ cross test --package aes --target ${{ matrix.target }}
209
+ cross test --package aes --target ${{ matrix.target }} --features hazmat
210
+ - env :
211
+ RUSTFLAGS : " -Dwarnings --cfg aes_force_soft --cfg aes_compact"
212
+ run : |
213
+ cross test --package aes --target ${{ matrix.target }}
214
+ cross test --package aes --target ${{ matrix.target }} --features hazmat
186
215
187
216
# ARMv8 cross-compiled tests for AES intrinsics (nightly-only)
188
217
armv8 :
218
+ env :
219
+ RUSTFLAGS : " -Dwarnings --cfg aes_armv8"
189
220
strategy :
190
221
matrix :
191
222
include :
192
223
- target : aarch64-unknown-linux-gnu
193
224
rust : nightly
194
225
runs-on : ubuntu-latest
226
+ # Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
227
+ defaults :
228
+ run :
229
+ working-directory : .
195
230
steps :
196
231
- uses : actions/checkout@v1
197
232
- run : ${{ matrix.deps }}
@@ -201,22 +236,26 @@ jobs:
201
236
target : ${{ matrix.target }}
202
237
profile : minimal
203
238
override : true
204
- - run : cargo install cross
205
- - run : cross test --release --target ${{ matrix.target }} --features armv8
206
- - run : cross test --release --target ${{ matrix.target }} --features armv8,compact
207
- - run : cross test --release --target ${{ matrix.target }} --features armv8,ctr
208
- - run : cross test --release --target ${{ matrix.target }} --features armv8,force-soft
209
- - run : cross test --release --target ${{ matrix.target }} --features armv8,hazmat
210
- - run : cross test --release --target ${{ matrix.target }} --all-features
239
+ - name : Install pre-compiled cross
240
+ run : |
241
+ export URL=$(curl -s https://api.github.com/repos/cross-rs/cross/releases/latest | jq -r '.assets[] | select(.name | contains("x86_64-unknown-linux-gnu.tar.gz")) | .browser_download_url')
242
+ wget -O /tmp/binaries.tar.gz $URL
243
+ tar -C /tmp -xzf /tmp/binaries.tar.gz
244
+ mv /tmp/cross ~/.cargo/bin
245
+ - run : cross test --package aes --target ${{ matrix.target }}
246
+ - run : cross test --package aes --target ${{ matrix.target }} --features hazmat
247
+ - run : cross test --package aes --target ${{ matrix.target }} --all-features
211
248
212
249
clippy :
250
+ env :
251
+ RUSTFLAGS : " -Dwarnings --cfg aes_compact"
213
252
runs-on : ubuntu-latest
214
253
steps :
215
254
- uses : actions/checkout@v1
216
255
- uses : actions-rs/toolchain@v1
217
256
with :
218
- toolchain : 1.49 .0 # MSRV
257
+ toolchain : 1.56 .0 # MSRV
219
258
components : clippy
220
259
override : true
221
260
profile : minimal
222
- - run : cargo clippy --features compact,ctr, hazmat -- -D warnings
261
+ - run : cargo clippy --features hazmat -- -D warnings
0 commit comments