File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
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' }}
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') }}
@@ -289,6 +290,10 @@ jobs:
289
290
else
290
291
exit 1
291
292
fi
293
+ if [ "${{ env.WITH_MIRI }}" = "true" ]; then
294
+ eatmydata rustup component add miri
295
+ eatmydata rustup component add rust-src
296
+ fi
292
297
- name : Install necessary Rust packages for code coverage
293
298
if : env.CODE_COVERAGE_SUPPORTED == 'true' && (inputs.builder-host == inputs.builder-target || (env.ENDIANNESS == 'big' && inputs.builder-target != 's390x')) && (github.event_name == 'pull_request' || env.CODECOV_TOKEN_EXISTS == 'true')
294
299
timeout-minutes : 2
@@ -435,6 +440,14 @@ jobs:
435
440
files : ${{ env.SRC_DIR }}/codecov.json
436
441
root_dir : ${{ env.SRC_DIR }}
437
442
fail_ci_if_error : true
443
+ - name : Run tests under Miri
444
+ timeout-minutes : 5
445
+ if : env.WITH_MIRI == 'true'
446
+ run : |
447
+ set -xe
448
+ . "$HOME/.cargo/env"
449
+ cd "$SRC_DIR"
450
+ cargo miri test --target ${{ env.RUST_TARGET }}
438
451
- name : Build docs
439
452
timeout-minutes : 1
440
453
if : inputs.flavor == 'doc'
You can’t perform that action at this time.
0 commit comments