|
17 | 17 | jobs: |
18 | 18 | docs: |
19 | 19 | name: Docs |
20 | | - runs-on: windows-2025 |
21 | 20 | strategy: |
22 | 21 | fail-fast: false # Allow all matrix variants to complete even if some fail |
23 | 22 | matrix: |
| 23 | + runner: |
| 24 | + - name: windows-latest |
| 25 | + arch: amd64 |
| 26 | + - name: windows-11-arm |
| 27 | + arch: arm64 |
| 28 | + |
24 | 29 | 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 |
26 | 34 |
|
27 | 35 | llvm: |
28 | 36 | - 17.0.6 |
|
37 | 45 | - release |
38 | 46 |
|
39 | 47 | 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 }} |
42 | 54 |
|
43 | 55 | steps: |
44 | 56 | - name: Checkout Repository |
@@ -72,33 +84,35 @@ jobs: |
72 | 84 | with: |
73 | 85 | version: ${{ matrix.llvm }} |
74 | 86 |
|
75 | | - - name: Install WDK (${{ matrix.wdk }}) |
| 87 | + - name: Install WDK (${{ matrix.wdk.version }}) |
76 | 88 | uses: ./.github/actions/install-wdk |
77 | 89 | 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 || '' }} |
80 | 94 |
|
81 | 95 | - name: Install Rust Toolchain (${{ matrix.rust_toolchain }}) |
82 | 96 | uses: dtolnay/rust-toolchain@master |
83 | 97 | with: |
84 | 98 | toolchain: ${{ matrix.rust_toolchain }} |
85 | | - targets: ${{ matrix.target_triple }} |
| 99 | + targets: ${{ matrix.target_triple.name }} |
86 | 100 |
|
87 | 101 | - name: Run Cargo Doc |
88 | 102 | # 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 |
91 | 104 | - name: Run Cargo Doc (--features nightly) |
92 | 105 | if: matrix.rust_toolchain == 'nightly' |
93 | 106 | # 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 |
96 | 108 | - 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 |
98 | 111 | # 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 |
99 | 112 | run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} |
100 | 113 |
|
101 | 114 | - 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' }} |
103 | 117 | # 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 |
104 | 118 | run: cargo +${{ matrix.rust_toolchain }} doc --locked --profile ${{ matrix.cargo_profile }} --features nightly |
0 commit comments