From b93b55920a978ef9f013efe8d75cb10e69488629 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Sat, 12 Apr 2025 15:35:38 -0700 Subject: [PATCH] Expand minimal-versions CI job to cover all packages, use `-Zdirect-minimal-versions`, but not deny warnings. --- .github/workflows/ci.yml | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d0927b67..6b1f7c8ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -405,32 +405,29 @@ jobs: # check `wgpu-core` with all features. This will also get `wgpu-hal` and `wgpu-types`. cargo check --target ${{ matrix.target }} --all-features -p wgpu-core - naga-minimal-versions: + # Check that the libraries build — but not that there are no warnings or that tests pass - + # with `-Zdirect-minimal-versions` which lowers all dependencies from the workspace packages + # to non-workspace packages to their minimum allowed version. + check-minimal-versions: # runtime is normally 2 minutes timeout-minutes: 10 - name: MSRV naga Minimal Versions + name: MSRV Minimal Versions runs-on: ubuntu-22.04 + env: + # Override flags to NOT include `-D warnings`, because warnings may be due to harmless problems in deps. + # Also, allow unexpected_cfgs because it is very common and spammy when using old deps. + RUSTFLAGS: -A unexpected_cfgs steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Install core MSRV toolchain - run: | - rustup toolchain install ${{ env.CORE_MSRV }} --no-self-update --profile=minimal --component clippy - rustup override set ${{ env.CORE_MSRV }} - cargo -V - - - name: Install Nightly toolchain + - name: Install toolchain run: | rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal - cargo +${{ env.REPO_MSRV }} -V - - - name: Install `cargo-hack` - uses: taiki-e/install-action@v2 - with: - tool: cargo-hack + rustup override set ${{ env.REPO_MSRV }} + cargo -V - name: Disable debug symbols shell: bash @@ -445,16 +442,16 @@ jobs: run: | set -e - cargo +${{ env.REPO_MSRV }} hack generate-lockfile --remove-dev-deps -Z minimal-versions -p naga -p naga-cli + cargo +${{ env.REPO_MSRV }} update -Zdirect-minimal-versions env: RUSTC_BOOTSTRAP: 1 - - name: Run Clippy + - name: Run cargo check shell: bash run: | set -e - cargo clippy --all-features -p naga -p naga-cli + cargo check --all-targets --all-features wasm-test: # runtime is normally 2 minutes