Skip to content

Commit

Permalink
Merge pull request #1 from microsoft/main
Browse files Browse the repository at this point in the history
Merge to Base
  • Loading branch information
gerritsMSFT authored Oct 24, 2024
2 parents 97f5f64 + 6df20f1 commit efd0d54
Show file tree
Hide file tree
Showing 141 changed files with 201 additions and 730 deletions.
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/windows-drivers@1.2.0-beta
- 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

0 comments on commit efd0d54

Please sign in to comment.