File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -118,4 +118,32 @@ jobs:
118118 - name : Architecture check
119119 run : cross run --features cli --bin arch-check --target ${{ matrix.target }}
120120 - name : Test
121- run : cross test --features cli --target ${{ matrix.target }}
121+ run : cross test --features cli --target ${{ matrix.target }}
122+
123+ miri-test-x86_64 :
124+ name : Miri Test x86_64
125+ needs : test-x86_64
126+ runs-on : ubuntu-24.04
127+ steps :
128+ - uses : actions/checkout@v4
129+ - uses : actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9
130+ with :
131+ toolchain : nightly
132+ components : miri
133+ - name : Detect CPU cores
134+ id : cores
135+ run : |
136+ CORES=$(nproc)
137+ echo "count=$CORES" >> $GITHUB_OUTPUT
138+ echo "use_nextest=$([[ $CORES -ge 2 ]] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
139+ - name : Install nextest
140+ if : steps.cores.outputs.use_nextest == 'true'
141+ run : cargo install cargo-nextest --locked
142+ - name : Setup Miri
143+ run : cargo miri setup
144+ - name : Run Miri tests (parallel)
145+ if : steps.cores.outputs.use_nextest == 'true'
146+ run : cargo miri nextest run --all-features -j${{ steps.cores.outputs.count }}
147+ - name : Run Miri tests (serial)
148+ if : steps.cores.outputs.use_nextest == 'false'
149+ run : cargo miri test --all-features
You can’t perform that action at this time.
0 commit comments