From c0a8ba69b001488339d632f0d38f5774f7871d98 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Thu, 10 Jul 2025 09:46:37 -0700 Subject: [PATCH] [ci] Check with profiling enabled. Minimum version of `profiling` increases from ^1.0.0 to ^1.0.1 because the `type-check` feature was added in 1.0.1. --- .github/workflows/ci.yml | 4 ++++ Cargo.toml | 2 +- tests/Cargo.toml | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaea55ec0..1dea4069e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -313,6 +313,10 @@ jobs: # Check with all features. cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features + # Check with all features and profiling macro code. + # If we don't check this then errors inside `profiling::scope!()` will not be caught. + cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features --features test-build-with-profiling + # build docs cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --all-features --no-deps diff --git a/Cargo.toml b/Cargo.toml index bab8e7350..7083e33a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -162,7 +162,7 @@ pollster = "0.4" portable-atomic = "1.8" portable-atomic-util = "0.2.4" pp-rs = "0.2.1" -profiling = { version = "1", default-features = false } +profiling = { version = "1.0.1", default-features = false } quote = "1.0.38" raw-window-handle = { version = "0.6.2", default-features = false } rwh_05 = { version = "0.5.2", package = "raw-window-handle" } # temporary compatibility for glutin-winit diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 17c131a02..d93f73389 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -29,6 +29,9 @@ harness = true [features] webgl = ["wgpu/webgl"] +# This feature is not actually used by this package, but it being present somewhere in the workspace +# allows us to force the build to have profiling code enabled so we can test that configuration. +test-build-with-profiling = ["profiling/type-check"] [dependencies] wgpu = { workspace = true, features = ["noop"] }