Skip to content

CI: add cargo hack check #7034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ jobs:
#
# currently high due to documentation time problems on mac.
# https://github.com/rust-lang/rust/issues/114891
timeout-minutes: 30
# XXX TBD ??? - increased further to avoid interrupting cargo hack
timeout-minutes: 90

strategy:
fail-fast: false
Expand Down Expand Up @@ -175,6 +176,12 @@ jobs:
tier: 2
kind: no_std

- name: hack check - Linux x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
tier: 1
kind: hack

name: Clippy ${{ matrix.name }}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -288,6 +295,21 @@ jobs:
# Check with all features except "std".
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features --features strict_asserts,fragile-send-sync-non-atomic-wasm,serde,counters

- name: hack check
if: matrix.kind == 'hack'
shell: bash
run: |
set -e

# install cargo-hack
cargo install cargo-hack

# hack check each feature
cargo hack --workspace --feature-powerset --depth 1 clippy
env:
# XXX TBD ???
RUSTFLAGS: ""

# Building for native platforms with standard tests.
- name: check native
if: matrix.kind == 'native'
Expand Down
2 changes: 2 additions & 0 deletions wgpu-core/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::sync::Arc;

use hashbrown::HashMap;

// XXX TODO MORE FOCUSED allow directive
#[allow(unused_imports)]
use crate::{
api_log, api_log_debug,
device::{queue::Queue, resource::Device, DeviceDescriptor, DeviceError},
Expand Down
1 change: 1 addition & 0 deletions wgpu-core/src/lock/rank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ define_lock_ranks! {
rank REGISTRY_STORAGE "Registry::storage" followed by { }
rank RESOURCE_POOL_INNER "ResourcePool::inner" followed by { }
rank SHARED_TRACKER_INDEX_ALLOCATOR_INNER "SharedTrackerIndexAllocator::inner" followed by { }
#[allow(dead_code)]
rank SURFACE_PRESENTATION "Surface::presentation" followed by { }
rank TEXTURE_BIND_GROUPS "Texture::bind_groups" followed by { }
rank TEXTURE_INITIALIZATION_STATUS "Texture::initialization_status" followed by { }
Expand Down