-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 907 Bytes
/
Copy pathub-detection.yml
File metadata and controls
34 lines (28 loc) · 907 Bytes
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
name: UB (undefined behavior) detection
on:
schedule:
# Runs every day at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
# Make sure CI fails on all warnings, including Clippy lints
RUSTFLAGS: "-Dwarnings"
jobs:
ub-detection:
name: Check for undefined behaviour (UB)
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install and set up Miri
run: |
# Correct way to install the Miri component
rustup component add miri
cargo miri setup
- name: Run Miri to detect UB
run: |
# The -Zmiri-strict-provenance flag is excellent for catching more bugs
# The --workspace flag ensures all your crates and tests are checked
MIRIFLAGS="-Zmiri-strict-provenance" cargo miri test --workspace