Skip to content

Commit 8be5adf

Browse files
authored
[ci] Partition miri tests (#2197)
1 parent a8911fb commit 8be5adf

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.github/workflows/slow.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ env:
2020

2121
jobs:
2222
Tests:
23-
name: "Tests (os: ${{ matrix.os }}, flags: \"${{ matrix.flags }}\") (partition: ${{ matrix.partition }}/6)"
23+
name: "Tests (os: ${{ matrix.os }}, flags: \"${{ matrix.flags }}\") (partition: ${{ matrix.partition }}/8)"
2424
runs-on: ${{ matrix.os }}
2525
timeout-minutes: 180
2626
strategy:
2727
matrix:
2828
os: [ubuntu-latest, windows-latest, macos-latest]
29-
partition: [1, 2, 3, 4, 5, 6]
29+
partition: [1, 2, 3, 4, 5, 6, 7, 8]
3030
flags:
3131
- "--features commonware-runtime/iouring-storage"
3232
- "--features commonware-runtime/iouring-network"
@@ -57,7 +57,7 @@ jobs:
5757
with:
5858
5959
- name: Run ignored tests
60-
run: just test ${{ matrix.flags }} --partition hash:${{matrix.partition}}/6 --verbose -- --ignored
60+
run: just test ${{ matrix.flags }} --partition hash:${{matrix.partition}}/8 --verbose -- --ignored
6161

6262
Tests-Gate:
6363
name: "Slow-Tests"
@@ -135,8 +135,12 @@ jobs:
135135
run: just fuzz ${{ matrix.fuzz_dir }} 60 +${{ env.NIGHTLY_VERSION }}
136136

137137
Unsafe:
138+
name: "Miri Tests (partition: ${{ matrix.partition }}/8)"
138139
runs-on: ubuntu-latest
139140
timeout-minutes: 120
141+
strategy:
142+
matrix:
143+
partition: [1, 2, 3, 4, 5, 6, 7, 8]
140144
steps:
141145
- name: Checkout repository
142146
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
@@ -147,11 +151,25 @@ jobs:
147151
rustup toolchain install ${{ env.NIGHTLY_VERSION }} --component miri
148152
rustup override set ${{ env.NIGHTLY_VERSION }}
149153
cargo miri setup
150-
- name: Install just
154+
- name: Install just & nextest
151155
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
152156
with:
153-
157+
154158
- name: Run miri tests for storage::index
155159
run: |
156160
cd storage
157-
just miri index::
161+
just miri index:: --partition hash:${{matrix.partition}}/8
162+
163+
Unsafe-Tests-Gate:
164+
name: "Unsafe-Tests"
165+
runs-on: ubuntu-latest
166+
needs: Unsafe
167+
if: always()
168+
steps:
169+
- name: Check test results
170+
run: |
171+
if [ "${{ needs.Unsafe.result }}" != "success" ]; then
172+
echo "Tests failed or were cancelled"
173+
exit 1
174+
fi
175+
echo "All tests passed successfully!"

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ udeps nightly_version='+nightly':
6464
cargo {{ nightly_version }} udeps --all-targets
6565

6666
# Run miri tests on a given module
67-
miri module:
68-
MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test --lib {{ module }}
67+
miri module *args='':
68+
MIRIFLAGS="-Zmiri-disable-isolation" cargo miri nextest run --lib {{ module }} {{ args }}

0 commit comments

Comments
 (0)