-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (39 loc) · 1.78 KB
/
miri.yml
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
name: Miri
on: [push, pull_request, workflow_dispatch]
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
test-with-miri-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# From Miri documentation: https://github.com/rust-lang/miri#running-miri-on-ci
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- uses: taiki-e/install-action@cargo-hack
# Always skip "derive" since derive macro tests are skipped on Miri
# Also always keep "pedantic-debug-assertions" enabled to reduce build times
# Note: no need to use --workspace here, since there's no unsafe in rust-cc-derive
- name: Run tests
# Keep "std" feature always enabled here to avoid needing the no-std related nightly features
run: cargo hack miri test --feature-powerset --skip nightly,derive --verbose -F std,pedantic-debug-assertions
test-with-miri-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# From Miri documentation: https://github.com/rust-lang/miri#running-miri-on-ci
- name: Install Miri
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- uses: taiki-e/install-action@cargo-hack
# Always skip "derive" since derive macro tests are skipped on Miri
# Also always keep "pedantic-debug-assertions" enabled to reduce build times
# Note: no need to use --workspace here, since there's no unsafe in rust-cc-derive
- name: Run tests (nightly)
run: cargo hack miri test --feature-powerset --skip derive --verbose -F nightly,pedantic-debug-assertions