File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 43
43
env :
44
44
DEBIAN_FRONTEND : noninteractive
45
45
RUSTFLAGS : " -Dwarnings"
46
+ WITH_MIRI : ${{ inputs.rust-toolchain-name == 'nightly' && inputs.flavor == 'dev' && inputs.builder-target != 'riscv64' }}
46
47
SRC_DIR : ${{ github.workspace }}/rawspeed.rs
47
48
CODECOV_TOKEN_EXISTS : ${{ secrets.CODECOV_TOKEN != '' }}
48
49
CODE_COVERAGE_SUPPORTED : ${{ inputs.flavor != 'RustFmt' && inputs.flavor != 'doc' && (inputs.target-os != 'windows' || inputs.rust-toolchain-abi == 'msvc') }}
@@ -274,7 +275,7 @@ jobs:
274
275
eatmydata apt clean
275
276
rm -rf /var/lib/apt/lists/*
276
277
- name : Install Rust toolchain and targets and crates
277
- timeout-minutes : 3
278
+ timeout-minutes : 4
278
279
run : |
279
280
set -xe
280
281
RUST_COMPONENTS=""
@@ -305,6 +306,15 @@ jobs:
305
306
cargo-llvm-cov \
306
307
"
307
308
fi
309
+ if [ "${{ env.WITH_MIRI }}" = "true" ]; then
310
+ RUST_COMPONENTS="${RUST_COMPONENTS} \
311
+ rust-src \
312
+ miri \
313
+ "
314
+ RUST_CRATES="${RUST_CRATES} \
315
+ cargo-nextest \
316
+ "
317
+ fi
308
318
eatmydata rustup component add ${RUST_COMPONENTS}
309
319
if [ "${RUST_CRATES}" != "" ]; then
310
320
eatmydata cargo install ${RUST_CRATES}
@@ -447,6 +457,14 @@ jobs:
447
457
files : ${{ env.SRC_DIR }}/codecov.json
448
458
root_dir : ${{ env.SRC_DIR }}
449
459
fail_ci_if_error : true
460
+ - name : Run tests under Miri
461
+ timeout-minutes : 10
462
+ if : env.WITH_MIRI == 'true'
463
+ run : |
464
+ set -xe
465
+ . "$HOME/.cargo/env"
466
+ cd "$SRC_DIR"
467
+ cargo miri nextest run --target ${{ env.RUST_TARGET }}
450
468
- name : Build docs
451
469
timeout-minutes : 1
452
470
if : inputs.flavor == 'doc'
Original file line number Diff line number Diff line change 30
30
31
31
env :
32
32
RUSTFLAGS : " -Dwarnings"
33
+ WITH_MIRI : ${{ inputs.rust-toolchain-name == 'nightly' && inputs.flavor == 'dev' }}
33
34
SRC_DIR : ${{ github.workspace }}/rawspeed.rs
34
35
CODECOV_TOKEN_EXISTS : ${{ secrets.CODECOV_TOKEN != '' }}
35
36
60
61
brew autoremove --quiet
61
62
brew cleanup --quiet --prune=all
62
63
- name : Install Rust
63
- timeout-minutes : 4
64
+ timeout-minutes : 7
64
65
run : |
65
66
set -xe
66
67
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
@@ -156,3 +157,11 @@ jobs:
156
157
files : ${{ env.SRC_DIR }}/codecov.json
157
158
root_dir : ${{ env.SRC_DIR }}
158
159
fail_ci_if_error : true
160
+ - name : Run tests under Miri
161
+ timeout-minutes : 10
162
+ if : env.WITH_MIRI == 'true'
163
+ run : |
164
+ set -xe
165
+ . "$HOME/.cargo/env"
166
+ cd "$SRC_DIR"
167
+ cargo miri nextest run
You can’t perform that action at this time.
0 commit comments