Skip to content

Commit 037cb38

Browse files
committed
Enable Miri
1 parent 1560b06 commit 037cb38

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

.github/workflows/_build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ on:
2626
required: false
2727
type: boolean
2828
default: false
29+
with_miri:
30+
required: false
31+
type: boolean
32+
default: false
2933
pre_build_script:
3034
required: false
3135
type: string
@@ -50,6 +54,10 @@ jobs:
5054
toolchain: ${{ inputs.rust_toolchain }}
5155
components: rustfmt, clippy
5256

57+
- id: install-miri
58+
if: ${{ inputs.with_miri }}
59+
run: rustup component add miri
60+
5361
- id: quickinstall
5462
name: Install cargo-quickinstall
5563
if: ${{ inputs.with_audit }}
@@ -87,6 +95,13 @@ jobs:
8795
name: Compile and run tests
8896
run: cargo test ${{ inputs.rust_features }} --verbose
8997

98+
- id: miri
99+
name: Run tests with Miri
100+
if: ${{ inputs.with_miri }}
101+
run: |
102+
cargo miri test ${{ inputs.rust_features }} --verbose
103+
echo "Miri OK" >> "$GITHUB_STEP_SUMMARY"
104+
90105
- id: doc
91106
name: Doc
92107
if: ${{ inputs.with_doc }}

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ jobs:
2828
uses: ./.github/workflows/_build.yml
2929
with:
3030
rust_toolchain: nightly
31+
with_miri: true
3132

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ watch_clippy:
1717
test *args:
1818
cargo test --all-features {{args}}
1919

20+
miri:
21+
cargo miri test --all-features
22+
2023
check_all:
2124
just stable
2225
cargo clippy --all-features --all-targets -- -D warnings
@@ -30,6 +33,7 @@ check_all:
3033
just nightly
3134
cargo build --all-features
3235
cargo test --all-features
36+
cargo miri test --all-features
3337

3438
just stable
3539

0 commit comments

Comments
 (0)