Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge to Base #1

Merged
merged 16 commits into from
Oct 24, 2024
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
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
*.vcxproj text eol=crlf
*.xaml text eol=crlf

# Declare files that are encoded in UTF-16
*.inf text diff working-tree-encoding=UTF-16LE-BOM eol=crlf
*.inx text diff working-tree-encoding=UTF-16LE-BOM eol=crlf

###############################################################################
# Set default behavior for command prompt diff.
#
Expand All @@ -32,4 +36,3 @@
# Note: This is only used by command line
###############################################################################
*.cs diff=csharp

2 changes: 1 addition & 1 deletion .github/scripts/Build-ChangedSamples.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ foreach ($file in $ChangedFiles) {
$filename = Split-Path $file -Leaf

# Files that can affect how every sample is built should trigger a full build
if ($filename -eq "Build-AllSamples.ps1" -or $filename -eq "Build-Sample.ps1" -or $filename -eq "Build-SampleSet.ps1" -or $filename -eq "exclusions.csv") {
if ($filename -eq "Build-AllSamples.ps1" -or $filename -eq "Build-Sample.ps1" -or $filename -eq "Build-SampleSet.ps1" -or $filename -eq "exclusions.csv" -or $filename -eq "Directory.Build.props" -or $filename -eq "packages.config") {
$buildAll = $true
}
if ($dir -like "$root\.github\scripts" -or $dir -like "$root\.github\scripts\*") {
Expand Down
38 changes: 0 additions & 38 deletions .github/scripts/Install-Vsix.ps1

This file was deleted.

14 changes: 8 additions & 6 deletions .github/workflows/Code-Scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ on:
branches:
- main
- develop
paths-ignore:
- '**.md'
- 'LICENSE'
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
- develop
paths-ignore:
- '**.md'
- 'LICENSE'

# Allow manual scheduling
workflow_dispatch:
Expand All @@ -36,19 +42,15 @@ jobs:
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install WDK VSIX
run: .\.github\scripts\Install-Vsix.ps1

- name: Install Nuget Packages
run: nuget restore .\packages.config -PackagesDirectory .\packages\

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
packs: microsoft/windows-drivers

config-file: microsoft/Windows-Driver-Developer-Supplemental-Tools/config/codeql-config.yml@development
packs: +microsoft/[email protected]
- name: Retrieve and build all available solutions
run: .\Build-AllSamples.ps1 -Verbose -ThrottleLimit 1
env:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
with:
submodules: 'recursive'

- name: Install WDK VSIX
run: .\.github\scripts\Install-Vsix.ps1

- name: Install Nuget Packages
run: nuget restore .\packages.config -PackagesDirectory .\packages\

Expand All @@ -44,10 +41,10 @@ jobs:
WDS_ReportFileName: _overview.${{ matrix.configuration }}.${{ matrix.platform }}

- name: Archive build logs and overview build reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: logs
name: logs-${{ matrix.configuration }}-${{ matrix.platform }}
path: _logs

report:
Expand All @@ -60,16 +57,17 @@ jobs:
uses: actions/checkout@v4

- name: Retrieve overview reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: logs
path: _logs
pattern: logs-*
merge-multiple: true

- name: Join and generate global reports
run: .\.github\scripts\Join-CsvReports.ps1

- name: Archive global overview build reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: logs
path: _logs/_overview.all.*
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
with:
submodules: 'recursive'

- name: Install WDK VSIX
run: .\.github\scripts\Install-Vsix.ps1

- name: Install Nuget Packages
run: nuget restore .\packages.config -PackagesDirectory .\packages\

Expand All @@ -36,10 +33,10 @@ jobs:
WDS_ReportFileName: _overview.${{ matrix.configuration }}.${{ matrix.platform }}

- name: Archive build logs and overview build reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: logs
name: logs-${{ matrix.configuration }}-${{ matrix.platform }}
path: _logs

report:
Expand All @@ -52,16 +49,17 @@ jobs:
uses: actions/checkout@v4

- name: Retrieve overview reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: logs
path: _logs
pattern: logs-*
merge-multiple: true

- name: Join and generate global reports
run: .\.github\scripts\Join-CsvReports.ps1

- name: Archive global overview build reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: logs
path: _logs/_overview.all.*
39 changes: 17 additions & 22 deletions Build-SampleSet.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,17 @@ finally {
# Determine build environment: 'GitHub', 'NuGet', 'EWDK', or 'WDK'.
# Determine build number (used for exclusions based on build number). Five digits. Say, '22621'.
# Determine NuGet package version (if applicable).
# Determine WDK vsix version.
#
$build_environment=""
$build_number=0
$nuget_package_version=0
$vsix_version=""
#
# In Github we build using NuGet and get the version from packages and vsix version from env var set from the install vsix step.
# In Github we build using NuGet.
#
if ($env:GITHUB_REPOSITORY) {
$build_environment="GitHub"
$nuget_package_version=([regex]'(?<=x64\.)(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches((Get-Childitem .\packages\*WDK.x64* -Name)).Value
$build_number=$nuget_package_version.split('.')[2]
$vsix_version = $env:SAMPLES_VSIX_VERSION
}
#
# WDK NuGet will require presence of a folder 'packages'. The version is sourced from repo .\Env-Vars.ps1.
Expand Down Expand Up @@ -107,16 +104,12 @@ else {
exit 1
}
#
# Get the vsix version from packages if not set
if (-not $vsix_version) {
$vsix_version = ls "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select -ExpandProperty Name
if ($vsix_version) {
$vsix_version = $vsix_version.split('=')[1]
}
else {
Write-Error "No version of the WDK VSIX could be found. The WDK VSIX is not installed."
exit 1
}
# Get the WDK extension version from installed packages
$wdk_extension_ver = ls "${env:ProgramData}\Microsoft\VisualStudio\Packages\Microsoft.Windows.DriverKit,version=*" | Select -ExpandProperty Name
$wdk_extension_ver = ([regex]'(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches($wdk_extension_ver).Value
if (-not $wdk_extension_ver) {
Write-Error "No version of the WDK Visual Studio Extension could be found. The WDK Extension is not installed."
exit 1
}
#
#
Expand Down Expand Up @@ -180,20 +173,22 @@ $jresult = @{

$SolutionsTotal = $sampleSet.Count * $Configurations.Count * $Platforms.Count

Write-Output ("Build Environment: " + $build_environment)
Write-Output ("Build Number: " + $build_number)
if (($build_environment -eq "GitHub") -or ($build_environment -eq "NuGet")) { Write-Output ("Nuget Package Version: " + $nuget_package_version) }
Write-Output ("WDK VSIX Version: " + $vsix_version)
Write-Output ("Samples: " + $sampleSet.Count)
Write-Output ("Configurations: " + $Configurations.Count + " (" + $Configurations + ")")
Write-Output ("Platforms: " + $Platforms.Count + " (" + $Platforms + ")")
Write-Output "WDK Build Environment: $build_environment"
Write-Output "WDK Build Number: $build_number"
if (($build_environment -eq "GitHub") -or ($build_environment -eq "NuGet")) {
Write-Output "WDK Nuget Version: $nuget_package_version"
}
Write-Output "WDK Extension Version: $wdk_extension_ver"
Write-Output "Samples: $($sampleSet.Count)"
Write-Output "Configurations: $($Configurations.Count) ($Configurations)"
Write-Output "Platforms: $($Platforms.Count) ($Platforms)"
Write-Output "InfVerif_AdditionalOptions: $InfVerif_AdditionalOptions"
Write-Output "Combinations: $SolutionsTotal"
Write-Output "LogicalProcessors: $LogicalProcessors"
Write-Output "ThrottleFactor: $ThrottleFactor"
Write-Output "ThrottleLimit: $ThrottleLimit"
Write-Output "WDS_WipeOutputs: $env:WDS_WipeOutputs"
Write-Output ("Disk Remaining (GB): " + (((Get-Volume ($DriveLetter = (Get-Item ".").PSDrive.Name)).SizeRemaining / 1GB)))
Write-Output "Disk Remaining (GB): $(((Get-Volume ((Get-Item ".").PSDrive.Name)).SizeRemaining) / 1GB)"
Write-Output ""
Write-Output "T: Combinations"
Write-Output "B: Built"
Expand Down
Loading