Repository navigation
46 lines (40 loc) · 1.65 KB
/
Copy pathmiri.yml
File metadata and controls
46 lines (40 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Miri
permissions: {}
on:
push:
branches:
- main
jobs:
miri:
name: Miri
runs-on: namespace-profile-linux-x64-default
timeout-minutes: 10
env:
RUSTUP_TOOLCHAIN: nightly-2026-10-04
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: namespacelabs/nscloud-cache-action@1124a6f3ce44e5cf84cc22111530961f4d2a15f9 # v1.7.0
with:
path: |
/home/runner/.rustup
/home/runner/.cache/miri
cache: rust
- name: Install Miri
run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --component miri,rust-src
- name: Arena safety
env:
# Thread arenas intentionally retain their chunks until process exit.
MIRIFLAGS: -Zmiri-ignore-leaks
run: |
cargo miri setup
# Miri cannot model the compressed pointers' PROT_NONE reservation.
cargo miri test --locked -p tsrs_core --features plain-ptrs --test integration arena_test::
# Require the known protected-borrow violation, not just any command failure.
if cargo miri test --locked -p tsrs_core --features plain-ptrs --test integration \
arena_test::miri_rejects_freeing_a_reference_parameter -- --exact --ignored > "$RUNNER_TEMP/miri-negative.log" 2>&1; then
cat "$RUNNER_TEMP/miri-negative.log"
echo "::error::Miri accepted a free of a protected reference parameter"
exit 1
fi
cat "$RUNNER_TEMP/miri-negative.log"
grep -q 'error: Undefined Behavior:.*strongly protected' "$RUNNER_TEMP/miri-negative.log"