|
24 | 24 | # These Mesa version definition is duplicated in the install-mesa action.
|
25 | 25 | MESA_VERSION: "24.3.4"
|
26 | 26 |
|
| 27 | + # This is the toolchain used for miri tests. |
| 28 | + MIRI_TOOLCHAIN: "nightly-2025-07-09" |
27 | 29 | # This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
|
28 | 30 | REPO_MSRV: "1.84"
|
29 | 31 | # This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
|
@@ -508,7 +510,7 @@ jobs:
|
508 | 510 |
|
509 | 511 | - name: Install repo MSRV toolchain
|
510 | 512 | run: |
|
511 |
| - rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal -c llvm-tools |
| 513 | + rustup toolchain install ${{ env.MIRI_TOOLCHAIN }} --no-self-update --profile=minimal -c llvm-tools |
512 | 514 | cargo -V
|
513 | 515 |
|
514 | 516 | - name: Install `cargo-nextest` and `cargo-llvm-cov`
|
@@ -659,6 +661,52 @@ jobs:
|
659 | 661 | files: lcov.info
|
660 | 662 | token: ${{ secrets.CODECOV_TOKEN }}
|
661 | 663 |
|
| 664 | + miri-test: |
| 665 | + # runtime is normally 10 minutes |
| 666 | + timeout-minutes: 30 |
| 667 | + |
| 668 | + name: Miri Test |
| 669 | + runs-on: ubuntu-latest |
| 670 | + |
| 671 | + steps: |
| 672 | + - name: Checkout repo |
| 673 | + uses: actions/checkout@v4 |
| 674 | + |
| 675 | + - name: Install repo MSRV toolchain |
| 676 | + run: | |
| 677 | + rustup toolchain install ${{ env.MIRI_TOOLCHAIN }} --no-self-update --profile=minimal --component miri --target x86_64-unknown-linux-gnu |
| 678 | + rustup override set ${{ env.MIRI_TOOLCHAIN }} |
| 679 | + cargo -V |
| 680 | +
|
| 681 | + - name: Install `cargo-nextest` |
| 682 | + uses: taiki-e/install-action@v2 |
| 683 | + with: |
| 684 | + tool: cargo-nextest |
| 685 | + |
| 686 | + - name: Debug symbols to line-tables-only |
| 687 | + shell: bash |
| 688 | + run: | |
| 689 | + mkdir -p .cargo |
| 690 | +
|
| 691 | + cat <<EOF >> .cargo/config.toml |
| 692 | + [profile.dev] |
| 693 | + debug = "line-tables-only" |
| 694 | + EOF |
| 695 | +
|
| 696 | + - name: Caching |
| 697 | + uses: Swatinem/rust-cache@v2 |
| 698 | + with: |
| 699 | + key: miri-${{ env.CACHE_SUFFIX }} |
| 700 | + workspaces: | |
| 701 | + . -> target |
| 702 | +
|
| 703 | + - name: Run tests |
| 704 | + shell: bash |
| 705 | + run: | |
| 706 | + set -e |
| 707 | +
|
| 708 | + cargo xtask miri --toolchain ${{ env.MIRI_TOOLCHAIN }} |
| 709 | +
|
662 | 710 | doctest:
|
663 | 711 | # runtime is normally 2 minutes
|
664 | 712 | timeout-minutes: 10
|
|
0 commit comments