Skip to content

Commit c0a8ba6

Browse files
kpreidcwfitzgerald
authored andcommitted
[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.
1 parent da6ccd5 commit c0a8ba6

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ jobs:
313313
# Check with all features.
314314
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features
315315
316+
# Check with all features and profiling macro code.
317+
# If we don't check this then errors inside `profiling::scope!()` will not be caught.
318+
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features --features test-build-with-profiling
319+
316320
# build docs
317321
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --all-features --no-deps
318322

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pollster = "0.4"
162162
portable-atomic = "1.8"
163163
portable-atomic-util = "0.2.4"
164164
pp-rs = "0.2.1"
165-
profiling = { version = "1", default-features = false }
165+
profiling = { version = "1.0.1", default-features = false }
166166
quote = "1.0.38"
167167
raw-window-handle = { version = "0.6.2", default-features = false }
168168
rwh_05 = { version = "0.5.2", package = "raw-window-handle" } # temporary compatibility for glutin-winit

tests/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ harness = true
2929

3030
[features]
3131
webgl = ["wgpu/webgl"]
32+
# This feature is not actually used by this package, but it being present somewhere in the workspace
33+
# allows us to force the build to have profiling code enabled so we can test that configuration.
34+
test-build-with-profiling = ["profiling/type-check"]
3235

3336
[dependencies]
3437
wgpu = { workspace = true, features = ["noop"] }

0 commit comments

Comments
 (0)