Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
35 changes: 29 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,35 @@ jobs:

- 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
# Delete the latest WDK (10.0.26100) Include and Lib folders if present on the system.
# Older WDK (10.0.22621) will be the latest available Kit on the system once installed.
# FIXME: Remove once issues with using latest WDK are resolved.
$latestWdkPaths = @(
"C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0",
"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0"
)
foreach ($path in $latestWdkPaths) {
if (Test-Path $path) {
Write-Host "Deleting folder: $path"
Remove-Item -Path $path -Recurse -Force -ErrorAction SilentlyContinue
} else {
Write-Host "WDK folder not found, skipping deletion: $path"
}
}

# Install or update the target WDK
try {
$targetWdk = Get-WinGetPackage -Id ${{ matrix.wdk }} -Source winget -MatchOption Equals -ErrorAction SilentlyContinue
if ($targetWdk) {
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
}
} catch {
Write-Host "Error installing ${{ matrix.wdk }}: $($_.Exception.Message)"
exit 1
}

- name: Install Rust Toolchain (${{ matrix.rust_toolchain }})
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/wdk-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ windows = { workspace = true, features = [
rustversion.workspace = true

[dev-dependencies]
assert_fs.workspace = true
windows = { workspace = true, features = ["Win32_UI_Shell"] }

# Cannot inherit workspace lints since overriding them is not supported yet: https://github.com/rust-lang/cargo/issues/13157
Expand Down
2 changes: 1 addition & 1 deletion crates/wdk-build/rust-driver-makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ for (key, value) in &serialized_wdk_metadata_map {
wdk_build::cargo_make::forward_printed_env_vars(
serialized_wdk_metadata_map
.into_iter()
.map(|(key, _)| (key)),
.map(|(key, _)| key),
);
'''

Expand Down
Loading
Loading