Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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.

51 changes: 30 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,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 +44,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 @@ -87,9 +96,9 @@ jobs:
- name: Build and Package Sample Drivers
run: cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }}

# Steps to use cargo-wdk to build and package drivers (uses cargo-wdk at specific commit https://github.com/microsoft/windows-drivers-rs/commit/5b9aa0a14e385daf5217c0f5232bcd4d3f4780a6)
# Steps to use cargo-wdk to build and package drivers (uses latest released version)
Comment thread
wmmc88 marked this conversation as resolved.
Outdated
- name: Install cargo-wdk binary
run: cargo +${{ matrix.rust_toolchain }} install --git https://github.com/microsoft/windows-drivers-rs.git cargo-wdk --branch main --rev 5b9aa0a14e385daf5217c0f5232bcd4d3f4780a6 --locked --force
run: cargo +${{ matrix.rust_toolchain }} install cargo-wdk --locked --force

- name: Build and Package Sample Drivers with cargo-wdk
run: cargo +${{ matrix.rust_toolchain }} wdk build --sample --profile ${{ matrix.cargo_profile }} --target-arch ${{ matrix.target_triple.arch }}
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