9
9
env :
10
10
CARGO_NET_RETRY : 10
11
11
RUSTUP_MAX_RETRIES : 10
12
+ PROPTEST_CASES : 64
12
13
13
14
jobs :
14
15
rustfmt :
15
16
name : " rustfmt"
16
17
runs-on : ubuntu-latest
17
18
18
19
steps :
19
- - uses : actions/checkout@v2
20
- - name : Setup Rust
21
- run : |
22
- rustup update nightly --no-self-update
23
- rustup default nightly
24
- rustup component add rustfmt
20
+ - uses : actions/checkout@v4
25
21
- name : Run rustfmt
26
22
run : cargo fmt --all -- --check
27
23
37
33
- i686-unknown-linux-gnu
38
34
- i586-unknown-linux-gnu
39
35
- aarch64-unknown-linux-gnu
36
+ - arm64ec-pc-windows-msvc
40
37
- armv7-unknown-linux-gnueabihf
38
+ - loongarch64-unknown-linux-gnu
41
39
# non-nightly since https://github.com/rust-lang/rust/pull/113274
42
40
# - mips-unknown-linux-gnu
43
41
# - mips64-unknown-linux-gnuabi64
49
47
- wasm32-unknown-unknown
50
48
51
49
steps :
52
- - uses : actions/checkout@v2
50
+ - uses : actions/checkout@v4
53
51
- name : Setup Rust
54
- run : |
55
- rustup update nightly --no-self-update
56
- rustup default nightly
57
- rustup target add ${{ matrix.target }}
58
- rustup component add clippy
52
+ run : rustup target add ${{ matrix.target }}
59
53
- name : Run Clippy
60
54
run : cargo clippy --all-targets --target ${{ matrix.target }}
61
55
@@ -65,26 +59,19 @@ jobs:
65
59
strategy :
66
60
fail-fast : false
67
61
matrix :
68
- target : [x86_64-pc-windows-msvc, i686-pc-windows-msvc, i586-pc-windows-msvc, x86_64-unknown-linux-gnu, x86_64-apple-darwin ]
62
+ target : [x86_64-pc-windows-msvc, i686-pc-windows-msvc, i586-pc-windows-msvc, x86_64-unknown-linux-gnu]
69
63
# `default` means we use the default target config for the target,
70
64
# `native` means we run with `-Ctarget-cpu=native`, and anything else is
71
65
# an arg to `-Ctarget-feature`
72
66
target_feature : [default, native, +sse3, +ssse3, +sse4.1, +sse4.2, +avx, +avx2]
73
67
74
68
exclude :
75
- # The macos runners seem to only reliably support up to `avx`.
76
- - { target: x86_64-apple-darwin, target_feature: +avx2 }
77
- # These features are statically known to be present for all 64 bit
78
- # macs, and thus are covered by the `default` test
79
- - { target: x86_64-apple-darwin, target_feature: +sse3 }
80
- - { target: x86_64-apple-darwin, target_feature: +ssse3 }
81
69
# -Ctarget-cpu=native sounds like bad-news if target != host
82
70
- { target: i686-pc-windows-msvc, target_feature: native }
83
71
- { target: i586-pc-windows-msvc, target_feature: native }
84
72
85
73
include :
86
74
# Populate the `matrix.os` field
87
- - { target: x86_64-apple-darwin, os: macos-latest }
88
75
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
89
76
- { target: x86_64-pc-windows-msvc, os: windows-latest }
90
77
- { target: i686-pc-windows-msvc, os: windows-latest }
98
85
# avx512vl, but occasionally doesn't. Maybe one day we can enable it.
99
86
100
87
steps :
101
- - uses : actions/checkout@v2
88
+ - uses : actions/checkout@v4
102
89
- name : Setup Rust
103
- run : |
104
- rustup update nightly --no-self-update
105
- rustup default nightly
106
- rustup target add ${{ matrix.target }}
90
+ run : rustup target add ${{ matrix.target }}
107
91
108
92
- name : Configure RUSTFLAGS
109
93
shell : bash
@@ -145,6 +129,35 @@ jobs:
145
129
run : cargo doc --verbose --target=${{ matrix.target }}
146
130
env :
147
131
RUSTDOCFLAGS : -Dwarnings
132
+
133
+ macos-tests :
134
+ name : ${{ matrix.target }}
135
+ runs-on : macos-latest
136
+ strategy :
137
+ fail-fast : false
138
+ matrix :
139
+ target :
140
+ - aarch64-apple-darwin
141
+ - x86_64-apple-darwin
142
+ steps :
143
+ - uses : actions/checkout@v4
144
+ - name : Setup Rust
145
+ run : rustup target add ${{ matrix.target }}
146
+
147
+ - name : Configure RUSTFLAGS
148
+ shell : bash
149
+ run : echo "RUSTFLAGS=-Dwarnings" >> $GITHUB_ENV
150
+
151
+ - name : Test (debug)
152
+ run : cargo test --verbose --target=${{ matrix.target }}
153
+
154
+ - name : Test (release)
155
+ run : cargo test --verbose --target=${{ matrix.target }} --release
156
+
157
+ - name : Generate docs
158
+ run : cargo doc --verbose --target=${{ matrix.target }}
159
+ env :
160
+ RUSTDOCFLAGS : -Dwarnings
148
161
149
162
wasm-tests :
150
163
name : " wasm (firefox, ${{ matrix.name }})"
@@ -155,11 +168,7 @@ jobs:
155
168
- { name: default, RUSTFLAGS: "" }
156
169
- { name: simd128, RUSTFLAGS: "-C target-feature=+simd128" }
157
170
steps :
158
- - uses : actions/checkout@v2
159
- - name : Setup Rust
160
- run : |
161
- rustup update nightly --no-self-update
162
- rustup default nightly
171
+ - uses : actions/checkout@v4
163
172
- name : Install wasm-pack
164
173
run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
165
174
- name : Test (debug)
@@ -174,6 +183,8 @@ jobs:
174
183
cross-tests :
175
184
name : " ${{ matrix.target_feature }} on ${{ matrix.target }} (via cross)"
176
185
runs-on : ubuntu-latest
186
+ env :
187
+ PROPTEST_CASES : 16
177
188
strategy :
178
189
fail-fast : false
179
190
@@ -185,6 +196,7 @@ jobs:
185
196
- powerpc-unknown-linux-gnu
186
197
- powerpc64le-unknown-linux-gnu # includes altivec by default
187
198
- riscv64gc-unknown-linux-gnu
199
+ - loongarch64-unknown-linux-gnu
188
200
# MIPS uses a nonstandard binary representation for NaNs which makes it worth testing
189
201
# non-nightly since https://github.com/rust-lang/rust/pull/113274
190
202
# - mips-unknown-linux-gnu
@@ -201,24 +213,14 @@ jobs:
201
213
# - { target: riscv64gc-unknown-linux-gnu, target_feature: "+v,+zvl128b" }
202
214
203
215
steps :
204
- - uses : actions/checkout@v2
216
+ - uses : actions/checkout@v4
205
217
- name : Setup Rust
206
- run : |
207
- rustup update nightly --no-self-update
208
- rustup default nightly
209
- rustup target add ${{ matrix.target }}
210
- rustup component add rust-src
218
+ run : rustup target add ${{ matrix.target }}
211
219
212
220
- name : Install Cross
213
- # Equivalent to `cargo install cross`, but downloading a prebuilt
214
- # binary. Ideally we wouldn't hardcode a version, but the version number
215
- # being part of the tarball means we can't just use the download/latest
216
- # URL :(
221
+ # Install the latest git version for newer targets.
217
222
run : |
218
- CROSS_URL=https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz
219
- mkdir -p "$HOME/.bin"
220
- curl -sfSL --retry-delay 10 --retry 5 "${CROSS_URL}" | tar zxf - -C "$HOME/.bin"
221
- echo "$HOME/.bin" >> $GITHUB_PATH
223
+ cargo install cross --git https://github.com/cross-rs/cross --rev 4090beca3cfffa44371a5bba524de3a578aa46c3
222
224
223
225
- name : Configure Emulated CPUs
224
226
run : |
@@ -242,34 +244,11 @@ jobs:
242
244
- name : Test (release)
243
245
run : cross test --verbose --target=${{ matrix.target }} --release
244
246
245
- features :
246
- name : " Test cargo features (${{ matrix.simd }} × ${{ matrix.features }})"
247
+ miri :
247
248
runs-on : ubuntu-latest
248
- strategy :
249
- fail-fast : false
250
- matrix :
251
- simd :
252
- - " "
253
- - " avx512"
254
- features :
255
- - " "
256
- - " --features std"
257
- - " --features all_lane_counts"
258
- - " --all-features"
259
-
249
+ env :
250
+ PROPTEST_CASES : 16
260
251
steps :
261
- - uses : actions/checkout@v2
262
- - name : Setup Rust
263
- run : |
264
- rustup update nightly --no-self-update
265
- rustup default nightly
266
- - name : Detect AVX512
267
- run : echo "CPU_FEATURE=$(lscpu | grep -o avx512[a-z]* | sed s/avx/+avx/ | tr '\n' ',' )" >> $GITHUB_ENV
268
- - name : Check build
269
- if : ${{ matrix.simd == '' }}
270
- run : RUSTFLAGS="-Dwarnings" cargo test --all-targets --no-default-features ${{ matrix.features }}
271
- - name : Check AVX
272
- if : ${{ matrix.simd == 'avx512' && contains(env.CPU_FEATURE, 'avx512') }}
273
- run : |
274
- echo "Found AVX features: $CPU_FEATURE"
275
- RUSTFLAGS="-Dwarnings -Ctarget-feature=$CPU_FEATURE" cargo test --all-targets --no-default-features ${{ matrix.features }}
252
+ - uses : actions/checkout@v4
253
+ - name : Test (Miri)
254
+ run : cargo miri test
0 commit comments