Skip to content

Commit

Permalink
Run Miri on CI
Browse files Browse the repository at this point in the history
The pin guarantees are guarantees of a library, so Miri does not detect
violations of the pin API. However, if the generated unsafe code causes
UB, Miri may be possible to detect it.
  • Loading branch information
taiki-e committed Oct 4, 2020
1 parent 8188642 commit 5394b09
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust and rustfmt
- name: Install Rust and Rustfmt
run: ci/install-component.sh rustfmt
- name: Install cargo-expand
run: |
Expand All @@ -84,6 +84,18 @@ jobs:
run: |
bash scripts/expandtest.sh
miri:
name: miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust and Miri
run: ci/install-component.sh miri
- name: cargo miri test
run: |
cargo miri setup
cargo miri test
clippy:
name: clippy
runs-on: ubuntu-latest
Expand All @@ -100,7 +112,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust and rustfmt
- name: Install Rust and Rustfmt
run: ci/install-component.sh rustfmt
- name: cargo fmt --check
run: |
Expand Down
1 change: 1 addition & 0 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(not(miri))]
#![warn(rust_2018_idioms, single_use_lifetimes)]

#[rustversion::attr(not(nightly), ignore)]
Expand Down
1 change: 1 addition & 0 deletions tests/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ pub mod clippy_used_underscore_binding {
}
}

#[cfg(not(miri))]
#[allow(box_pointers)]
#[allow(clippy::restriction)]
#[rustversion::attr(not(nightly), ignore)]
Expand Down

0 comments on commit 5394b09

Please sign in to comment.