Skip to content

Commit b48adef

Browse files
committed
update which targets we test Miri on
1 parent 31ffe48 commit b48adef

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ jobs:
377377
- name: x86_64-msvc-ext
378378
env:
379379
SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo && src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
380+
HOST_TARGET: x86_64-pc-windows-msvc
380381
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json"
381382
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
382383
os: windows-2019-8core-32gb

src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ ENV RUST_CONFIGURE_ARGS \
8383
--build=x86_64-unknown-linux-gnu \
8484
--save-toolstates=/tmp/toolstate/toolstates.json
8585

86+
ENV HOST_TARGET x86_64-unknown-linux-gnu
87+
8688
ENV SCRIPT /tmp/checktools.sh ../x.py && \
8789
NODE_PATH=`npm root -g` python3 ../x.py test tests/rustdoc-gui --stage 2 \
8890
--test-args "'--no-sandbox --jobs 1'"

src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh

+26-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
2+
# ignore-tidy-linelength
23

34
set -eu
45

@@ -26,8 +27,30 @@ python3 "$X_PY" test --stage 2 src/tools/clippy
2627
python3 "$X_PY" test --stage 2 src/tools/rustfmt
2728
python3 "$X_PY" test --stage 2 src/tools/miri
2829
# We natively run this script on x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc.
29-
# Also cover some other targets (on both of these hosts) via cross-testing.
30+
# Also cover some other targets via cross-testing, in particular all tier 1 targets.
3031
export BOOTSTRAP_SKIP_TARGET_SANITY=1 # we don't need `cc` for these targets
31-
python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-msvc
32-
python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-apple-darwin
32+
case $HOST_TARGET in
33+
x86_64-unknown-linux-gnu)
34+
# Only this branch runs in PR CI.
35+
# Fully test all main OSes, including a 32bit target.
36+
python3 "$X_PY" test --stage 2 src/tools/miri --target x86_64-apple-darwin
37+
python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-msvc
38+
# Only run "pass" tests for the remaining targets, which is quite a bit faster.
39+
python3 "$X_PY" test --stage 2 src/tools/miri --target x86_64-pc-windows-gnu --test-args pass
40+
python3 "$X_PY" test --stage 2 src/tools/miri --target i686-unknown-linux-gnu --test-args pass
41+
python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-unknown-linux-gnu --test-args pass
42+
python3 "$X_PY" test --stage 2 src/tools/miri --target s390x-unknown-linux-gnu --test-args pass
43+
;;
44+
x86_64-pc-windows-msvc)
45+
# Strangely, Linux targets do not work here. cargo always says
46+
# "error: cannot produce cdylib for ... as the target ... does not support these crate types".
47+
# Only run "pass" tests, which is quite a bit faster.
48+
python3 "$X_PY" test --stage 2 src/tools/miri --target aarch64-apple-darwin --test-args pass
49+
python3 "$X_PY" test --stage 2 src/tools/miri --target i686-pc-windows-gnu --test-args pass
50+
;;
51+
*)
52+
echo "FATAL: unexpected host $HOST_TARGET"
53+
exit 1
54+
;;
55+
esac
3356
unset BOOTSTRAP_SKIP_TARGET_SANITY

src/ci/github-actions/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ jobs:
574574
- name: x86_64-msvc-ext
575575
env:
576576
SCRIPT: python x.py --stage 2 test src/tools/cargotest src/tools/cargo && src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
577+
HOST_TARGET: x86_64-pc-windows-msvc
577578
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-lld --save-toolstates=/tmp/toolstate/toolstates.json
578579
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
579580
<<: *job-windows-8c

0 commit comments

Comments
 (0)