Skip to content

Commit 238cd7e

Browse files
ci: update workflows to support multiple Windows runners (amd64 and arm64)
1 parent f8a5baa commit 238cd7e

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,15 @@ env:
1515
jobs:
1616
build:
1717
name: Build
18-
runs-on: windows-2025
1918
strategy:
2019
fail-fast: false # Allow all matrix variants to complete even if some fail
2120
matrix:
21+
runner:
22+
- name: windows-latest
23+
arch: amd64
24+
- name: windows-11-arm
25+
arch: arm64
26+
2227
wdk:
2328
- 10.0.22621 # NI WDK
2429

@@ -40,6 +45,8 @@ jobs:
4045
- name: aarch64-pc-windows-msvc
4146
arch: arm64
4247

48+
runs-on: ${{ matrix.runner.name }}
49+
4350
steps:
4451
- name: Checkout Repository
4552
uses: actions/checkout@v4

.github/workflows/docs.yaml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ env:
1313
jobs:
1414
docs:
1515
name: Docs
16-
runs-on: windows-2025
1716
strategy:
17+
fail-fast: false # Allow all matrix variants to complete even if some fail
1818
matrix:
19+
runner:
20+
- name: windows-2025
21+
arch: amd64
22+
- name: windows-11-arm
23+
arch: arm64
24+
1925
wdk:
2026
- 10.0.22621 # NI WDK
2127

@@ -32,8 +38,12 @@ jobs:
3238
- release
3339

3440
target_triple:
35-
- x86_64-pc-windows-msvc
36-
- aarch64-pc-windows-msvc
41+
- name: x86_64-pc-windows-msvc
42+
arch: amd64
43+
- name: aarch64-pc-windows-msvc
44+
arch: arm64
45+
46+
runs-on: ${{ matrix.runner.name }}
3747

3848
steps:
3949
- name: Checkout Repository
@@ -77,23 +87,23 @@ jobs:
7787
uses: dtolnay/rust-toolchain@master
7888
with:
7989
toolchain: ${{ matrix.rust_toolchain }}
80-
targets: ${{ matrix.target_triple }}
90+
targets: ${{ matrix.target_triple.name }}
8191

8292
- name: Run Cargo Doc
8393
# proc-macro crates must be excluded to avoid cargo doc bug: https://github.com/rust-lang/cargo/issues/10368
84-
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple }} --workspace --exclude wdk-macros
85-
94+
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace --exclude wdk-macros
8695
- name: Run Cargo Doc (--features nightly)
8796
if: matrix.rust_toolchain == 'nightly'
8897
# 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 --features nightly
90-
98+
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }} --workspace --exclude wdk-macros --features nightly
9199
- name: Run Cargo Doc w/ proc-macro crates
92-
if: matrix.target_triple == 'x86_64-pc-windows-msvc'
100+
# Skip duplicate runs on the same runner
101+
if: matrix.target_triple.arch == matrix.runner.arch
93102
# 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
94103
run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }}
95104

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

.github/workflows/lint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ jobs:
1414
permissions:
1515
checks: write
1616
strategy:
17+
fail-fast: false # Allow all matrix variants to complete even if some fail
1718
matrix:
19+
runner:
20+
- name: windows-2025
21+
arch: amd64
22+
- name: windows-11-arm
23+
arch: arm64
24+
1825
wdk:
1926
- 10.0.22621 # NI WDK
2027

@@ -34,6 +41,7 @@ jobs:
3441
- x86_64-pc-windows-msvc
3542
- aarch64-pc-windows-msvc
3643

44+
runs-on: ${{ matrix.runner.name }}
3745
steps:
3846
- name: Checkout Repository
3947
uses: actions/checkout@v4

0 commit comments

Comments
 (0)