Skip to content

Commit ba6ed83

Browse files
authored
ci: adopt Nuget and Arm64 changes from WDR (#44)
2 parents e9a44e4 + d0128c4 commit ba6ed83

5 files changed

Lines changed: 72 additions & 34 deletions

File tree

.github/workflows/build.yaml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ env:
1919
jobs:
2020
build:
2121
name: Build
22-
runs-on: windows-2025
2322
strategy:
2423
fail-fast: false # Allow all matrix variants to complete even if some fail
2524
matrix:
25+
runner:
26+
- name: windows-latest
27+
arch: amd64
28+
- name: windows-11-arm
29+
arch: arm64
30+
2631
wdk:
27-
- 10.0.22621 # NI WDK
32+
- version: 10.0.22621 # NI WDK
33+
source: winget
34+
- version: 10.0.26100 # GE WDK
35+
source: nuget
2836

2937
llvm:
3038
- 17.0.6
@@ -44,6 +52,8 @@ jobs:
4452
- name: aarch64-pc-windows-msvc
4553
arch: arm64
4654

55+
runs-on: ${{ matrix.runner.name }}
56+
4757
steps:
4858
- name: Checkout Repository
4959
uses: actions/checkout@v4
@@ -76,11 +86,13 @@ jobs:
7686
with:
7787
version: ${{ matrix.llvm }}
7888

79-
- name: Install WDK (${{ matrix.wdk }})
89+
- name: Install WDK (${{ matrix.wdk.version }})
8090
uses: ./.github/actions/install-wdk
8191
with:
82-
version: ${{ matrix.wdk }}
83-
source: winget
92+
version: ${{ matrix.wdk.version }}
93+
source: ${{ matrix.wdk.source }}
94+
host: ${{ matrix.wdk.source == 'nuget' && matrix.runner.arch || '' }}
95+
target: ${{ matrix.wdk.source == 'nuget' && matrix.target_triple.arch || '' }}
8496

8597
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
8698
uses: dtolnay/rust-toolchain@master

.github/workflows/cargo-audit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
cargo_audit:
1919
name: Cargo Audit
20-
runs-on: windows-2025
20+
runs-on: windows-latest
2121
permissions:
2222
issues: write
2323
checks: write

.github/workflows/code-formatting-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
jobs:
1515
cargo-fmt:
1616
name: .rs Formatting Check
17-
runs-on: windows-2025
17+
runs-on: windows-latest
1818

1919
steps:
2020
- name: Checkout Repository
@@ -30,7 +30,7 @@ jobs:
3030

3131
taplo-fmt:
3232
name: .toml Formatting Check
33-
runs-on: windows-2025
33+
runs-on: windows-latest
3434

3535
steps:
3636
- name: Checkout Repository

.github/workflows/docs.yaml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@ env:
1717
jobs:
1818
docs:
1919
name: Docs
20-
runs-on: windows-2025
2120
strategy:
2221
fail-fast: false # Allow all matrix variants to complete even if some fail
2322
matrix:
23+
runner:
24+
- name: windows-latest
25+
arch: amd64
26+
- name: windows-11-arm
27+
arch: arm64
28+
2429
wdk:
25-
- 10.0.22621 # NI WDK
30+
- version: 10.0.22621 # NI WDK
31+
source: winget
32+
- version: 10.0.26100 # GE WDK
33+
source: nuget
2634

2735
llvm:
2836
- 17.0.6
@@ -37,8 +45,12 @@ jobs:
3745
- release
3846

3947
target_triple:
40-
- x86_64-pc-windows-msvc
41-
- aarch64-pc-windows-msvc
48+
- name: x86_64-pc-windows-msvc
49+
arch: amd64
50+
- name: aarch64-pc-windows-msvc
51+
arch: arm64
52+
53+
runs-on: ${{ matrix.runner.name }}
4254

4355
steps:
4456
- name: Checkout Repository
@@ -72,33 +84,35 @@ jobs:
7284
with:
7385
version: ${{ matrix.llvm }}
7486

75-
- name: Install WDK (${{ matrix.wdk }})
87+
- name: Install WDK (${{ matrix.wdk.version }})
7688
uses: ./.github/actions/install-wdk
7789
with:
78-
version: ${{ matrix.wdk }}
79-
source: winget
90+
version: ${{ matrix.wdk.version }}
91+
source: ${{ matrix.wdk.source }}
92+
host: ${{ matrix.wdk.source == 'nuget' && matrix.runner.arch || '' }}
93+
target: ${{ matrix.wdk.source == 'nuget' && matrix.target_triple.arch || '' }}
8094

8195
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
8296
uses: dtolnay/rust-toolchain@master
8397
with:
8498
toolchain: ${{ matrix.rust_toolchain }}
85-
targets: ${{ matrix.target_triple }}
99+
targets: ${{ matrix.target_triple.name }}
86100

87101
- name: Run Cargo Doc
88102
# proc-macro crates must be excluded to avoid cargo doc bug: https://github.com/rust-lang/cargo/issues/10368
89-
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-macros
90-
103+
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace --exclude wdk-macros
91104
- name: Run Cargo Doc (--features nightly)
92105
if: matrix.rust_toolchain == 'nightly'
93106
# proc-macro crates must be excluded to avoid cargo doc bug: https://github.com/rust-lang/cargo/issues/10368
94-
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-macros --features nightly
95-
107+
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace --exclude wdk-macros --features nightly
96108
- name: Run Cargo Doc w/ proc-macro crates
97-
if: matrix.target_triple == 'x86_64-pc-windows-msvc'
109+
# Skip duplicate runs on the same runner
110+
if: matrix.target_triple.arch == matrix.runner.arch
98111
# 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
99112
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }}
100113

101114
- name: Run Cargo Doc w/ proc-macro crates (--features nightly)
102-
if: ${{ matrix.target_triple == 'x86_64-pc-windows-msvc' && matrix.rust_toolchain == 'nightly' }}
115+
# Skip duplicate runs on the same runner
116+
if: ${{ matrix.target_triple.arch == matrix.runner.arch && matrix.rust_toolchain == 'nightly' }}
103117
# 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
104118
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --features nightly

.github/workflows/lint.yaml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,22 @@ concurrency:
1414
jobs:
1515
clippy:
1616
name: Clippy
17-
runs-on: windows-2025
1817
permissions:
1918
checks: write
2019
strategy:
2120
fail-fast: false # Allow all matrix variants to complete even if some fail
2221
matrix:
22+
runner:
23+
- name: windows-latest
24+
arch: amd64
25+
- name: windows-11-arm
26+
arch: arm64
27+
2328
wdk:
24-
- 10.0.22621 # NI WDK
29+
- version: 10.0.22621 # NI WDK
30+
source: winget
31+
- version: 10.0.26100 # GE WDK
32+
source: nuget
2533

2634
llvm:
2735
- 17.0.6
@@ -36,9 +44,12 @@ jobs:
3644
- release
3745

3846
target_triple:
39-
- x86_64-pc-windows-msvc
40-
- aarch64-pc-windows-msvc
47+
- name: x86_64-pc-windows-msvc
48+
arch: amd64
49+
- name: aarch64-pc-windows-msvc
50+
arch: arm64
4151

52+
runs-on: ${{ matrix.runner.name }}
4253
steps:
4354
- name: Checkout Repository
4455
uses: actions/checkout@v4
@@ -71,29 +82,30 @@ jobs:
7182
with:
7283
version: ${{ matrix.llvm }}
7384

74-
- name: Install WDK (${{ matrix.wdk }})
85+
- name: Install WDK (${{ matrix.wdk.version }})
7586
uses: ./.github/actions/install-wdk
7687
with:
77-
version: ${{ matrix.wdk }}
78-
source: winget
88+
version: ${{ matrix.wdk.version }}
89+
source: ${{ matrix.wdk.source }}
90+
host: ${{ matrix.wdk.source == 'nuget' && matrix.runner.arch || '' }}
91+
target: ${{ matrix.wdk.source == 'nuget' && matrix.target_triple.arch || '' }}
7992

8093
- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
8194
uses: dtolnay/rust-toolchain@master
8295
with:
8396
toolchain: ${{ matrix.rust_toolchain }}
8497
components: clippy
85-
targets: ${{ matrix.target_triple }}
98+
targets: ${{ matrix.target_triple.name }}
8699

87100
- name: Run Cargo Clippy
88-
run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --all-targets -- -D warnings
101+
run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --all-targets -- -D warnings
89102

90103
- name: Run Cargo Clippy (--features nightly)
91104
if: matrix.rust_toolchain == 'nightly'
92-
run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --all-targets --features nightly -- -D warnings
93-
105+
run: cargo +${{ matrix.rust_toolchain }} clippy --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --all-targets --features nightly -- -D warnings
94106
machete:
95107
name: Detect Unused Cargo Dependencies
96-
runs-on: windows-2025
108+
runs-on: windows-latest
97109
strategy:
98110
matrix:
99111
wdk:

0 commit comments

Comments
 (0)