@@ -17,11 +17,11 @@ begingroup "Building Miri"
17
17
echo " Installing release version of Miri"
18
18
export RUSTFLAGS=" -D warnings"
19
19
export CARGO_INCREMENTAL=0
20
- ./miri install # implicitly locked
20
+ export CARGO_EXTRA_FLAGS=" --locked"
21
+ ./miri install
21
22
22
23
# Prepare debug build for direct `./miri` invocations
23
24
echo " Building debug version of Miri"
24
- export CARGO_EXTRA_FLAGS=" --locked"
25
25
./miri check --no-default-features # make sure this can be built
26
26
./miri check --all-features # and this, too
27
27
./miri build --all-targets # the build that all the `./miri test` below will use
@@ -39,8 +39,11 @@ function run_tests {
39
39
# # ui test suite
40
40
./miri test
41
41
if [ -z " ${MIRI_TEST_TARGET+exists} " ]; then
42
- # Only for host architecture: tests with optimizations (`-O` is what cargo passes, but crank MIR
43
- # optimizations up all the way, too).
42
+ # Host-only tests: running these on all targets is unlikely to catch more problems and would
43
+ # cost a lot of CI time.
44
+
45
+ # Tests with optimizations (`-O` is what cargo passes, but crank MIR optimizations up all the
46
+ # way, too).
44
47
# Optimizations change diagnostics (mostly backtraces), so we don't check
45
48
# them. Also error locations change so we don't run the failing tests.
46
49
# We explicitly enable debug-assertions here, they are disabled by -O but we have tests
@@ -51,6 +54,9 @@ function run_tests {
51
54
for FILE in tests/many-seeds/* .rs; do
52
55
MIRI_SEEDS=64 CARGO_EXTRA_FLAGS=" $CARGO_EXTRA_FLAGS -q" ./miri many-seeds ./miri run " $FILE "
53
56
done
57
+
58
+ # Check that the benchmarks build and run, but without actually benchmarking.
59
+ HYPERFINE=" bash -c" ./miri bench
54
60
fi
55
61
56
62
# # test-cargo-miri
@@ -75,13 +81,6 @@ function run_tests {
75
81
unset RUSTC MIRI
76
82
rm -rf .cargo
77
83
78
- # Ensure that our benchmarks all work, but only on Linux hosts.
79
- if [ -z " ${MIRI_TEST_TARGET+exists} " ] && [ " $HOST_TARGET " = x86_64-unknown-linux-gnu ] ; then
80
- for BENCH in $( ls " bench-cargo-miri" ) ; do
81
- cargo miri run --manifest-path bench-cargo-miri/$BENCH /Cargo.toml
82
- done
83
- fi
84
-
85
84
endgroup
86
85
}
87
86
0 commit comments