Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions .github/actions/winget-install/action.yml

This file was deleted.

50 changes: 30 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
on:
push:
pull_request:
# Temporarily disable until new wdk-build version is ingested: https://github.com/microsoft/Windows-rust-driver-samples/pull/46
# pull_request:
merge_group:
schedule: # Trigger a job on default branch at 4AM PST everyday
- cron: "0 11 * * *"
Expand All @@ -15,12 +16,12 @@ env:
jobs:
build:
name: Build
runs-on: windows-latest
runs-on: windows-2025
strategy:
fail-fast: false # Allow all matrix variants to complete even if some fail
matrix:
wdk:
- Microsoft.WindowsWDK.10.0.22621 # NI WDK
- 10.0.22621 # NI WDK

llvm:
- 17.0.6
Expand All @@ -44,30 +45,39 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Checkout windows-drivers-rs actions
uses: actions/checkout@v4
with:
repository: microsoft/windows-drivers-rs
ref: main
path: _temp/windows-drivers-rs
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false

- name: Copy actions to workspace
shell: pwsh
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/

- name: Install Winget
uses: ./.github/actions/winget-install
uses: ./.github/actions/install-winget
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Winget PowerShell Module
shell: pwsh
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force

- name: Install LLVM ${{ matrix.llvm }}
run: |
if ((Get-WinGetPackage -Id LLVM -Source winget -MatchOption Equals).InstalledVersion -eq '${{ matrix.llvm }}') {
Write-Host "LLVM ${{ matrix.llvm }} is already installed."
} else {
Write-Host "Installing LLVM ${{ matrix.llvm }}..."
Install-WinGetPackage -Id LLVM.LLVM -Version ${{ matrix.llvm }} -Source winget -MatchOption Equals -Mode Silent -Force
}
clang --version
uses: ./.github/actions/install-llvm
with:
version: ${{ matrix.llvm }}

- name: Install WDK (${{ matrix.wdk }})
run: |
if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
} else {
Write-Host "Installing ${{ matrix.wdk }}..."
Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
}
uses: ./.github/actions/install-wdk
with:
version: ${{ matrix.wdk }}
source: winget

- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
cargo_audit:
name: Cargo Audit
runs-on: windows-latest
runs-on: windows-2025
permissions:
issues: write
checks: write
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/code-formatting-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,26 @@ on:
schedule: # Trigger a job on default branch at 4AM PST everyday
- cron: 0 11 * * *


jobs:
cargo-fmt:
name: .rs Formatting Check
runs-on: windows-latest
runs-on: windows-2025

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust Toolchain (Nightly)
uses: dtolnay/rust-toolchain@nightly
with:
with:
components: rustfmt

- name: Run Cargo Format
run: cargo +nightly fmt --all -- --check

taplo-fmt:
name: .toml Formatting Check
runs-on: windows-latest
runs-on: windows-2025

steps:
- name: Checkout Repository
Expand Down
47 changes: 28 additions & 19 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ env:
jobs:
docs:
name: Docs
runs-on: windows-latest
runs-on: windows-2025
strategy:
matrix:
wdk:
- Microsoft.WindowsWDK.10.0.22621 # NI WDK
- 10.0.22621 # NI WDK

llvm:
- 17.0.6
Expand All @@ -39,30 +39,39 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Checkout windows-drivers-rs actions
uses: actions/checkout@v4
with:
repository: microsoft/windows-drivers-rs
ref: main
path: _temp/windows-drivers-rs
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false

- name: Copy actions to workspace
shell: pwsh
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/

- name: Install Winget
uses: ./.github/actions/winget-install
uses: ./.github/actions/install-winget
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Winget PowerShell Module
shell: pwsh
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force

- name: Install LLVM ${{ matrix.llvm }}
run: |
if ((Get-WinGetPackage -Id LLVM -Source winget -MatchOption Equals).InstalledVersion -eq '${{ matrix.llvm }}') {
Write-Host "LLVM ${{ matrix.llvm }} is already installed."
} else {
Write-Host "Installing LLVM ${{ matrix.llvm }}..."
Install-WinGetPackage -Id LLVM.LLVM -Version ${{ matrix.llvm }} -Source winget -MatchOption Equals -Mode Silent -Force
}
clang --version
uses: ./.github/actions/install-llvm
with:
version: ${{ matrix.llvm }}

- name: Install WDK (${{ matrix.wdk }})
run: |
if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
} else {
Write-Host "Installing ${{ matrix.wdk }}..."
Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
}
uses: ./.github/actions/install-wdk
with:
version: ${{ matrix.wdk }}
source: winget

- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand Down
83 changes: 53 additions & 30 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ name: Lint
jobs:
clippy:
name: Clippy
runs-on: windows-latest
runs-on: windows-2025
permissions:
checks: write
strategy:
matrix:
wdk:
- Microsoft.WindowsWDK.10.0.22621 # NI WDK
- 10.0.22621 # NI WDK

llvm:
- 17.0.6
Expand All @@ -38,30 +38,39 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Checkout windows-drivers-rs actions
uses: actions/checkout@v4
with:
repository: microsoft/windows-drivers-rs
ref: main
path: _temp/windows-drivers-rs
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false

- name: Copy actions to workspace
shell: pwsh
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/

- name: Install Winget
uses: ./.github/actions/winget-install
uses: ./.github/actions/install-winget
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Winget PowerShell Module
shell: pwsh
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force

- name: Install LLVM ${{ matrix.llvm }}
run: |
if ((Get-WinGetPackage -Id LLVM -Source winget -MatchOption Equals).InstalledVersion -eq '${{ matrix.llvm }}') {
Write-Host "LLVM ${{ matrix.llvm }} is already installed."
} else {
Write-Host "Installing LLVM ${{ matrix.llvm }}..."
Install-WinGetPackage -Id LLVM.LLVM -Version ${{ matrix.llvm }} -Source winget -MatchOption Equals -Mode Silent -Force
}
clang --version
uses: ./.github/actions/install-llvm
with:
version: ${{ matrix.llvm }}

- name: Install WDK (${{ matrix.wdk }})
run: |
if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
} else {
Write-Host "Installing ${{ matrix.wdk }}..."
Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
}
uses: ./.github/actions/install-wdk
with:
version: ${{ matrix.wdk }}
source: winget

- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
uses: dtolnay/rust-toolchain@master
Expand All @@ -79,30 +88,44 @@ jobs:

machete:
name: Detect Unused Cargo Dependencies
runs-on: windows-latest
runs-on: windows-2025
strategy:
matrix:
wdk:
- Microsoft.WindowsWDK.10.0.22621 # NI WDK
- 10.0.22621 # NI WDK

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Checkout windows-drivers-rs actions
uses: actions/checkout@v4
with:
repository: microsoft/windows-drivers-rs
ref: main
path: _temp/windows-drivers-rs
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false

- name: Copy actions to workspace
shell: pwsh
run: Copy-Item -Recurse -Force _temp/windows-drivers-rs/.github/actions .github/

- name: Install Winget
uses: ./.github/actions/winget-install
uses: ./.github/actions/install-winget
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Winget PowerShell Module
shell: pwsh
run: Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -Force

- name: Install WDK (${{ matrix.wdk }})
run: |
if ((Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals).Id -eq '${{ matrix.wdk }}') {
Write-Host "${{ matrix.wdk }} is already installed. Attempting to update..."
Update-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
} else {
Write-Host "Installing ${{ matrix.wdk }}..."
Install-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -Mode Silent -Force
}
uses: ./.github/actions/install-wdk
with:
version: ${{ matrix.wdk }}
source: winget

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
Loading
Loading