99env :
1010 CARGO_NET_RETRY : 10
1111 RUSTUP_MAX_RETRIES : 10
12+ PROPTEST_CASES : 64
1213
1314jobs :
1415 rustfmt :
1516 name : " rustfmt"
1617 runs-on : ubuntu-latest
1718
1819 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
2521 - name : Run rustfmt
2622 run : cargo fmt --all -- --check
2723
3733 - i686-unknown-linux-gnu
3834 - i586-unknown-linux-gnu
3935 - aarch64-unknown-linux-gnu
36+ - arm64ec-pc-windows-msvc
4037 - armv7-unknown-linux-gnueabihf
38+ - loongarch64-unknown-linux-gnu
4139 # non-nightly since https://github.com/rust-lang/rust/pull/113274
4240 # - mips-unknown-linux-gnu
4341 # - mips64-unknown-linux-gnuabi64
4947 - wasm32-unknown-unknown
5048
5149 steps :
52- - uses : actions/checkout@v2
50+ - uses : actions/checkout@v4
5351 - 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 }}
5953 - name : Run Clippy
6054 run : cargo clippy --all-targets --target ${{ matrix.target }}
6155
@@ -65,26 +59,19 @@ jobs:
6559 strategy :
6660 fail-fast : false
6761 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]
6963 # `default` means we use the default target config for the target,
7064 # `native` means we run with `-Ctarget-cpu=native`, and anything else is
7165 # an arg to `-Ctarget-feature`
7266 target_feature : [default, native, +sse3, +ssse3, +sse4.1, +sse4.2, +avx, +avx2]
7367
7468 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 }
8169 # -Ctarget-cpu=native sounds like bad-news if target != host
8270 - { target: i686-pc-windows-msvc, target_feature: native }
8371 - { target: i586-pc-windows-msvc, target_feature: native }
8472
8573 include :
8674 # Populate the `matrix.os` field
87- - { target: x86_64-apple-darwin, os: macos-latest }
8875 - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
8976 - { target: x86_64-pc-windows-msvc, os: windows-latest }
9077 - { target: i686-pc-windows-msvc, os: windows-latest }
9885 # avx512vl, but occasionally doesn't. Maybe one day we can enable it.
9986
10087 steps :
101- - uses : actions/checkout@v2
88+ - uses : actions/checkout@v4
10289 - 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 }}
10791
10892 - name : Configure RUSTFLAGS
10993 shell : bash
@@ -145,6 +129,35 @@ jobs:
145129 run : cargo doc --verbose --target=${{ matrix.target }}
146130 env :
147131 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
148161
149162 wasm-tests :
150163 name : " wasm (firefox, ${{ matrix.name }})"
@@ -155,11 +168,7 @@ jobs:
155168 - { name: default, RUSTFLAGS: "" }
156169 - { name: simd128, RUSTFLAGS: "-C target-feature=+simd128" }
157170 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
163172 - name : Install wasm-pack
164173 run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
165174 - name : Test (debug)
@@ -174,6 +183,8 @@ jobs:
174183 cross-tests :
175184 name : " ${{ matrix.target_feature }} on ${{ matrix.target }} (via cross)"
176185 runs-on : ubuntu-latest
186+ env :
187+ PROPTEST_CASES : 16
177188 strategy :
178189 fail-fast : false
179190
@@ -185,6 +196,7 @@ jobs:
185196 - powerpc-unknown-linux-gnu
186197 - powerpc64le-unknown-linux-gnu # includes altivec by default
187198 - riscv64gc-unknown-linux-gnu
199+ - loongarch64-unknown-linux-gnu
188200 # MIPS uses a nonstandard binary representation for NaNs which makes it worth testing
189201 # non-nightly since https://github.com/rust-lang/rust/pull/113274
190202 # - mips-unknown-linux-gnu
@@ -201,24 +213,14 @@ jobs:
201213 # - { target: riscv64gc-unknown-linux-gnu, target_feature: "+v,+zvl128b" }
202214
203215 steps :
204- - uses : actions/checkout@v2
216+ - uses : actions/checkout@v4
205217 - 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 }}
211219
212220 - 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.
217222 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
222224
223225 - name : Configure Emulated CPUs
224226 run : |
@@ -242,34 +244,11 @@ jobs:
242244 - name : Test (release)
243245 run : cross test --verbose --target=${{ matrix.target }} --release
244246
245- features :
246- name : " Test cargo features (${{ matrix.simd }} × ${{ matrix.features }})"
247+ miri :
247248 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
260251 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