mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
Split MSRV in Two Parts (#4204)
* Split MSRV in two parts * Use toml * Fix CI * Update names and cache hits for various jobs * Comment
This commit is contained in:
parent
90a8feab77
commit
93d2e5b4ba
114
.github/workflows/ci.yml
vendored
114
.github/workflows/ci.yml
vendored
@ -12,7 +12,11 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_LOG: info
|
||||
RUST_BACKTRACE: full
|
||||
MSRV: 1.65
|
||||
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
|
||||
REPO_MSRV: "1.70"
|
||||
# This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
|
||||
# to ensure that they can be used with firefox.
|
||||
CORE_MSRV: "1.65"
|
||||
PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work
|
||||
RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings
|
||||
RUSTDOCFLAGS: -Dwarnings
|
||||
@ -32,7 +36,7 @@ env:
|
||||
# It adds overhead to the build and another point of failure.
|
||||
|
||||
jobs:
|
||||
check-msrv:
|
||||
check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -95,10 +99,11 @@ jobs:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install MSRV toolchain
|
||||
- name: Install Repo MSRV toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }}
|
||||
rustup default ${{ env.MSRV }}
|
||||
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }}
|
||||
rustup override set ${{ env.REPO_MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: disable debug
|
||||
shell: bash
|
||||
@ -176,6 +181,64 @@ jobs:
|
||||
# build docs
|
||||
cargo doc --target ${{ matrix.target }} --all-features --no-deps
|
||||
|
||||
# We run minimal checks on the MSRV of the core crates, ensuring that
|
||||
# its dependency tree does not cause issues for firefox.
|
||||
#
|
||||
# We don't test all platforms, just ones with different dependency stacks.
|
||||
check-core-msrv:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Windows
|
||||
- name: Windows x86_64
|
||||
os: windows-2022
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
# MacOS
|
||||
- name: MacOS x86_64
|
||||
os: macos-12
|
||||
target: x86_64-apple-darwin
|
||||
|
||||
# Linux
|
||||
- name: Linux x86_64
|
||||
os: ubuntu-22.04
|
||||
target: x86_64-unknown-linux-gnu
|
||||
|
||||
name: MSRV Check ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
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 --target ${{ matrix.target }}
|
||||
rustup override set ${{ env.CORE_MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: disable debug
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p .cargo
|
||||
echo """
|
||||
[profile.dev]
|
||||
debug = false" >> .cargo/config.toml
|
||||
|
||||
- name: caching
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: msrv-check-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}
|
||||
|
||||
- name: check native
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
|
||||
# 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
|
||||
|
||||
wasm-test:
|
||||
name: Test WebAssembly
|
||||
runs-on: ubuntu-latest
|
||||
@ -183,6 +246,12 @@ jobs:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Repo MSRV toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy --target wasm32-unknown-unknown
|
||||
rustup override set ${{ env.REPO_MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: Install wasm-pack
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
@ -213,7 +282,6 @@ jobs:
|
||||
os: ubuntu-22.04
|
||||
backends: vulkan gl
|
||||
|
||||
|
||||
name: Test ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@ -311,6 +379,12 @@ jobs:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Repo MSRV toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component rustfmt
|
||||
rustup override set ${{ env.REPO_MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: disable debug
|
||||
shell: bash
|
||||
run: |
|
||||
@ -322,7 +396,7 @@ jobs:
|
||||
- name: caching
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: clippy-${{ matrix.target }}-${{ matrix.kind }}-${{ env.CACHE_SUFFIX }}
|
||||
key: doctests-${{ env.CACHE_SUFFIX }}
|
||||
|
||||
- name: run doctests
|
||||
shell: bash
|
||||
@ -338,11 +412,17 @@ jobs:
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Repo MSRV toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component rustfmt
|
||||
rustup override set ${{ env.REPO_MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: run rustfmt
|
||||
run: |
|
||||
cargo fmt -- --check
|
||||
|
||||
check-msrv-cts_runner:
|
||||
check-cts-runner:
|
||||
name: Clippy cts_runner
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -351,8 +431,9 @@ jobs:
|
||||
|
||||
- name: Install MSRV toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy
|
||||
rustup default ${{ env.MSRV }}
|
||||
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy
|
||||
rustup override set ${{ env.REPO_MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: disable debug
|
||||
shell: bash
|
||||
@ -365,14 +446,17 @@ jobs:
|
||||
- name: caching
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: cts_runner-${{ env.CACHE_SUFFIX }}
|
||||
key: cts-runner-${{ env.CACHE_SUFFIX }}
|
||||
|
||||
- name: build Deno
|
||||
run: |
|
||||
cargo clippy --manifest-path cts_runner/Cargo.toml
|
||||
|
||||
# Separate job so that new advisories don't block CI.
|
||||
#
|
||||
# This job is not required to pass for PRs to be merged.
|
||||
cargo-deny-check-advisories:
|
||||
name: "Run `cargo deny check advisories`"
|
||||
name: "cargo-deny advisories"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout repo
|
||||
@ -383,10 +467,10 @@ jobs:
|
||||
with:
|
||||
command: check advisories
|
||||
arguments: --all-features --workspace
|
||||
rust-version: ${{ env.MSRV }}
|
||||
rust-version: ${{ env.REPO_MSRV }}
|
||||
|
||||
cargo-deny-check-rest:
|
||||
name: "Run `cargo deny check`"
|
||||
name: "cargo-deny"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout repo
|
||||
@ -397,4 +481,4 @@ jobs:
|
||||
with:
|
||||
command: check bans licenses sources
|
||||
arguments: --all-features --workspace
|
||||
rust-version: ${{ env.MSRV }}
|
||||
rust-version: ${{ env.REPO_MSRV }}
|
||||
|
7
.github/workflows/cts.yml
vendored
7
.github/workflows/cts.yml
vendored
@ -11,7 +11,7 @@ env:
|
||||
CARGO_INCREMENTAL: false
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: full
|
||||
MSRV: 1.65
|
||||
MSRV: "1.70"
|
||||
|
||||
jobs:
|
||||
cts:
|
||||
@ -49,10 +49,11 @@ jobs:
|
||||
cd cts
|
||||
git checkout $(cat ../wgpu/cts_runner/revision.txt)
|
||||
|
||||
- name: Install MSRV toolchain
|
||||
- name: Install Repo MSRV toolchain
|
||||
run: |
|
||||
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }}
|
||||
rustup default ${{ env.MSRV }}
|
||||
rustup override set ${{ env.MSRV }}
|
||||
cargo -V
|
||||
|
||||
- name: caching
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
@ -26,7 +26,7 @@ default-members = [
|
||||
|
||||
[workspace.package]
|
||||
edition = "2021"
|
||||
rust-version = "1.65"
|
||||
rust-version = "1.70"
|
||||
keywords = ["graphics"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
homepage = "https://wgpu.rs/"
|
||||
|
@ -141,7 +141,7 @@ impl Queries {
|
||||
encoder.resolve_query_set(
|
||||
&self.set,
|
||||
// TODO(https://github.com/gfx-rs/wgpu/issues/3993): Musn't be larger than the number valid queries in the set.
|
||||
0..self.next_unused_query as u32,
|
||||
0..self.next_unused_query,
|
||||
&self.resolve_buffer,
|
||||
0,
|
||||
);
|
||||
|
@ -5,6 +5,6 @@
|
||||
# to the user in the error, instead of "error: invalid channel name '[toolchain]'".
|
||||
|
||||
[toolchain]
|
||||
channel = "1.65"
|
||||
channel = "1.70"
|
||||
components = ["rustfmt", "clippy"]
|
||||
targets = ["wasm32-unknown-unknown"]
|
@ -9,6 +9,12 @@ repository = "https://github.com/gfx-rs/wgpu"
|
||||
keywords = ["graphics"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to
|
||||
# copy the crates it actually uses out of the workspace, so it's meaningful for
|
||||
# them to have less restrictive MSRVs individually than the workspace as a
|
||||
# whole, if their code permits. See `../README.md` for details.
|
||||
rust-version = "1.65"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0"
|
||||
# copy the crates it actually uses out of the workspace, so it's meaningful for
|
||||
# them to have less restrictive MSRVs individually than the workspace as a
|
||||
# whole, if their code permits. See `../README.md` for details.
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.65"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
# Ideally we would enable all the features.
|
||||
|
@ -9,6 +9,12 @@ repository = "https://github.com/gfx-rs/wgpu"
|
||||
keywords = ["graphics"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to
|
||||
# copy the crates it actually uses out of the workspace, so it's meaningful for
|
||||
# them to have less restrictive MSRVs individually than the workspace as a
|
||||
# whole, if their code permits. See `../README.md` for details.
|
||||
rust-version = "1.65"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
Loading…
Reference in New Issue
Block a user