diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 43d9aa5..6a87f8d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,12 +15,20 @@ env: jobs: build: name: Build - runs-on: windows-2025 strategy: fail-fast: false # Allow all matrix variants to complete even if some fail matrix: + runner: + - name: windows-latest + arch: amd64 + - name: windows-11-arm + arch: arm64 + wdk: - - 10.0.22621 # NI WDK + - version: 10.0.22621 # NI WDK + source: winget + - version: 10.0.26100 # GE WDK + source: nuget llvm: - 17.0.6 @@ -40,6 +48,8 @@ jobs: - name: aarch64-pc-windows-msvc arch: arm64 + runs-on: ${{ matrix.runner.name }} + steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -72,11 +82,13 @@ jobs: with: version: ${{ matrix.llvm }} - - name: Install WDK (${{ matrix.wdk }}) + - name: Install WDK (${{ matrix.wdk.version }}) uses: ./.github/actions/install-wdk with: - version: ${{ matrix.wdk }} - source: winget + version: ${{ matrix.wdk.version }} + source: ${{ matrix.wdk.source }} + host: ${{ matrix.wdk.source == 'nuget' && matrix.runner.arch || '' }} + target: ${{ matrix.wdk.source == 'nuget' && matrix.target_triple.arch || '' }} - name: Install Rust Toolchain (${{ matrix.rust_toolchain }}) uses: dtolnay/rust-toolchain@master diff --git a/.github/workflows/cargo-audit.yaml b/.github/workflows/cargo-audit.yaml index f55691b..63e7ff0 100644 --- a/.github/workflows/cargo-audit.yaml +++ b/.github/workflows/cargo-audit.yaml @@ -12,7 +12,7 @@ on: jobs: cargo_audit: name: Cargo Audit - runs-on: windows-2025 + runs-on: windows-latest permissions: issues: write checks: write diff --git a/.github/workflows/code-formatting-check.yaml b/.github/workflows/code-formatting-check.yaml index 2245b68..294dca1 100644 --- a/.github/workflows/code-formatting-check.yaml +++ b/.github/workflows/code-formatting-check.yaml @@ -9,7 +9,7 @@ on: jobs: cargo-fmt: name: .rs Formatting Check - runs-on: windows-2025 + runs-on: windows-latest steps: - name: Checkout Repository @@ -25,7 +25,7 @@ jobs: taplo-fmt: name: .toml Formatting Check - runs-on: windows-2025 + runs-on: windows-latest steps: - name: Checkout Repository diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 4ddfded..8331760 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -13,11 +13,20 @@ env: jobs: docs: name: Docs - runs-on: windows-2025 strategy: + fail-fast: false # Allow all matrix variants to complete even if some fail matrix: + runner: + - name: windows-latest + arch: amd64 + - name: windows-11-arm + arch: arm64 + wdk: - - 10.0.22621 # NI WDK + - version: 10.0.22621 # NI WDK + source: winget + - version: 10.0.26100 # GE WDK + source: nuget llvm: - 17.0.6 @@ -32,8 +41,12 @@ jobs: - release target_triple: - - x86_64-pc-windows-msvc - - aarch64-pc-windows-msvc + - name: x86_64-pc-windows-msvc + arch: amd64 + - name: aarch64-pc-windows-msvc + arch: arm64 + + runs-on: ${{ matrix.runner.name }} steps: - name: Checkout Repository @@ -67,33 +80,35 @@ jobs: with: version: ${{ matrix.llvm }} - - name: Install WDK (${{ matrix.wdk }}) + - name: Install WDK (${{ matrix.wdk.version }}) uses: ./.github/actions/install-wdk with: - version: ${{ matrix.wdk }} - source: winget + version: ${{ matrix.wdk.version }} + source: ${{ matrix.wdk.source }} + host: ${{ matrix.wdk.source == 'nuget' && matrix.runner.arch || '' }} + target: ${{ matrix.wdk.source == 'nuget' && matrix.target_triple.arch || '' }} - name: Install Rust Toolchain (${{ matrix.rust_toolchain }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust_toolchain }} - targets: ${{ matrix.target_triple }} + targets: ${{ matrix.target_triple.name }} - name: Run Cargo Doc # proc-macro crates must be excluded to avoid cargo doc bug: https://github.com/rust-lang/cargo/issues/10368 - run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-macros - + run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace --exclude wdk-macros - name: Run Cargo Doc (--features nightly) if: matrix.rust_toolchain == 'nightly' # proc-macro crates must be excluded to avoid cargo doc bug: https://github.com/rust-lang/cargo/issues/10368 - run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-macros --features nightly - + run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace --exclude wdk-macros --features nightly - name: Run Cargo Doc w/ proc-macro crates - if: matrix.target_triple == 'x86_64-pc-windows-msvc' + # Skip duplicate runs on the same runner + if: matrix.target_triple.arch == matrix.runner.arch # cargo doc can only generate documentation for proc-macro crates when --target is not specified due to a cargo doc bug: https://github.com/rust-lang/cargo/issues/7677 run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} - name: Run Cargo Doc w/ proc-macro crates (--features nightly) - if: ${{ matrix.target_triple == 'x86_64-pc-windows-msvc' && matrix.rust_toolchain == 'nightly' }} + # Skip duplicate runs on the same runner + if: ${{ matrix.target_triple.arch == matrix.runner.arch && matrix.rust_toolchain == 'nightly' }} # cargo doc can only generate documentation for proc-macro crates when --target is not specified due to a cargo doc bug: https://github.com/rust-lang/cargo/issues/7677 run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --features nightly diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index e49d959..c304b4d 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,13 +10,22 @@ name: Lint jobs: clippy: name: Clippy - runs-on: windows-2025 permissions: checks: write strategy: + fail-fast: false # Allow all matrix variants to complete even if some fail matrix: + runner: + - name: windows-latest + arch: amd64 + - name: windows-11-arm + arch: arm64 + wdk: - - 10.0.22621 # NI WDK + - version: 10.0.22621 # NI WDK + source: winget + - version: 10.0.26100 # GE WDK + source: nuget llvm: - 17.0.6 @@ -31,9 +40,12 @@ jobs: - release target_triple: - - x86_64-pc-windows-msvc - - aarch64-pc-windows-msvc + - name: x86_64-pc-windows-msvc + arch: amd64 + - name: aarch64-pc-windows-msvc + arch: arm64 + runs-on: ${{ matrix.runner.name }} steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -66,29 +78,30 @@ jobs: with: version: ${{ matrix.llvm }} - - name: Install WDK (${{ matrix.wdk }}) + - name: Install WDK (${{ matrix.wdk.version }}) uses: ./.github/actions/install-wdk with: - version: ${{ matrix.wdk }} - source: winget + version: ${{ matrix.wdk.version }} + source: ${{ matrix.wdk.source }} + host: ${{ matrix.wdk.source == 'nuget' && matrix.runner.arch || '' }} + target: ${{ matrix.wdk.source == 'nuget' && matrix.target_triple.arch || '' }} - name: Install Rust Toolchain (${{ matrix.rust_toolchain }}) uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust_toolchain }} components: clippy - targets: ${{ matrix.target_triple }} + targets: ${{ matrix.target_triple.name }} - name: Run Cargo Clippy - run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --all-targets -- -D warnings + run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --all-targets -- -D warnings - name: Run Cargo Clippy (--features nightly) if: matrix.rust_toolchain == 'nightly' - run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --all-targets --features nightly -- -D warnings - + run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --all-targets --features nightly -- -D warnings machete: name: Detect Unused Cargo Dependencies - runs-on: windows-2025 + runs-on: windows-latest strategy: matrix: wdk: