Skip to content

Commit c94569b

Browse files
committed
fixup! ci: consolidate into a single workflow and improve CI
1 parent 132f28d commit c94569b

1 file changed

Lines changed: 12 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,7 @@ jobs:
6666
- run: git rebase --exec 'cargo test --locked' --root
6767
miri:
6868
runs-on: ubuntu-latest
69-
strategy:
70-
fail-fast: false
71-
matrix:
72-
flags: [
73-
"",
74-
"-Zmiri-tree-borrows",
75-
"-Zmiri-strict-provenance",
76-
"-Zmiri-tree-borrows -Zmiri-strict-provenance",
77-
]
78-
name: "miri (${{matrix.flags}})"
69+
name: "miri"
7970
steps:
8071
- uses: actions/checkout@v4
8172
with:
@@ -90,10 +81,16 @@ jobs:
9081
components: miri, rust-src
9182
- run: cargo install cargo-expand
9283
- run: git config user.name "github-runner" && git config user.email "<>"
93-
- name: ${{matrix.flags}} cargo miri test
94-
run: git rebase --exec 'cargo miri test --locked' --root
84+
- run: git rebase --exec 'cargo miri test --locked' --root
85+
- run: git rebase --exec 'cargo miri test --locked' --root
86+
env:
87+
MIRIFLAGS: "-Zmiri-tree-borrows"
88+
- run: git rebase --exec 'cargo miri test --locked' --root
89+
env:
90+
MIRIFLAGS: "-Zmiri-strict-provenance"
91+
- run: git rebase --exec 'cargo miri test --locked' --root
9592
env:
96-
MIRIFLAGS: ${{matrix.flags}}
93+
MIRIFLAGS: "-Zmiri-tree-borrows -Zmiri-strict-provenance"
9794
sanitizers:
9895
runs-on: ubuntu-latest
9996
steps:
@@ -107,12 +104,9 @@ jobs:
107104
- name: enable debug symbols
108105
run: |
109106
sudo apt install llvm
110-
# https://github.com/japaric/rust-san#unrealiable-leaksanitizer
111-
sed -i '/\[features\]/i [profile.dev]' Cargo.toml
112-
sed -i '/profile.dev/a opt-level = 1' Cargo.toml
113-
cat Cargo.toml
114107
- run: git config user.name "github-runner" && git config user.email "<>"
115-
- run: git rebase --exec 'cargo test --lib --tests --target x86_64-unknown-linux-gnu' --root
108+
# sed because of https://github.com/japaric/rust-san#unrealiable-leaksanitizer
109+
- run: git rebase --exec "sed -i '/\[features\]/i [profile.dev]' Cargo.toml && sed -i '/profile.dev/a opt-level = 1' Cargo.toml" --exec 'cargo test --lib --tests --target x86_64-unknown-linux-gnu' --exec 'git restore Cargo.toml' --root
116110
env:
117111
ASAN_OPTIONS: "detect_odr_violation=0:detect_leaks=0"
118112
RUSTFLAGS: "--cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address"

0 commit comments

Comments
 (0)