From 44268ce403c3e5564b84052f726c510de8d30346 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 2 Dec 2022 14:33:49 -0800 Subject: [PATCH] Don't select backends in CI that the current platform can't handle. --- .github/workflows/ci.yml | 13 ++++++++++--- wgpu-core/Cargo.toml | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c287b927c..5820963e17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,11 +159,18 @@ jobs: # check with no features cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-core -p wgpu-info -p player --no-default-features - # check with all features - cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-core -p wgpu-info -p player --tests --all-features + # Check with all features. + # (But watch out for backend-selection features in wgpu-core; some of + # those only build on the right platforms.) + cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-info -p player --tests --all-features + cargo clippy --target ${{ matrix.target }} -p wgpu-core --tests \ + --features="portable_features" # build docs - cargo doc --target ${{ matrix.target }} -p wgpu -p wgpu-core -p wgpu-info -p player --all-features --no-deps + # (Watch out for backend-selection features in wgpu-core; some of + # those only build on the right platforms.) + cargo doc --target ${{ matrix.target }} -p wgpu -p wgpu-info -p player --all-features --no-deps + cargo doc --target ${{ matrix.target }} -p wgpu-core --no-deps --features="portable_features" gpu-test: strategy: diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 62f125ae03..42293b0c1b 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -44,6 +44,9 @@ id32 = [] wgsl = ["naga/wgsl-in"] vulkan-portability = ["hal/vulkan"] +# Features that are intended to work on all platforms. +portable_features = ["gles", "strict_asserts", "trace", "replay", "serial-pass", "id32", "wgsl"] + [dependencies] arrayvec.workspace = true bitflags.workspace = true