-
Notifications
You must be signed in to change notification settings - Fork 124
97 lines (79 loc) · 3 KB
/
docs.yaml
File metadata and controls
97 lines (79 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Docs
on:
push:
branches-ignore:
- 'gh-readonly-queue/**'
pull_request:
merge_group:
schedule: # Trigger a job on default branch at 4AM PST everyday
- cron: 0 11 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
RUSTDOCFLAGS: -D warnings
jobs:
docs:
name: Docs
strategy:
fail-fast: false # Allow all matrix variants to complete even if some fail
matrix:
runner:
- name: windows-2025
arch: amd64
- name: windows-11-arm
arch: arm64
wdk:
- version: 10.0.22621 # NI WDK
source: winget
- version: 10.0.26100 # GE WDK
source: nuget
llvm:
- 17.0.6
rust_toolchain:
- stable
- beta
- nightly
cargo_profile:
- dev
- release
target_triple:
- 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@v5
- name: Install Winget PowerShell Module
shell: pwsh
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force
- name: Install Winget
if: matrix.runner.name == 'windows-11-arm'
shell: pwsh
run: |
Repair-WinGetPackageManager -Latest -Force
Write-Output "Winget Version: $(winget --version)"
- name: Install LLVM ${{ matrix.llvm }}
uses: ./.github/actions/install-llvm
with:
version: ${{ matrix.llvm }}
- name: Install WDK (${{ matrix.wdk.version }})
uses: ./.github/actions/install-wdk
with:
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.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.name }} --workspace --exclude wdk-macros --all-features
- name: Run Cargo Doc w/ proc-macro crates
# 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 }} --all-features