summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJakobL-MSFT <[email protected]>2024-06-28 09:56:29 -0700
committerGitHub <[email protected]>2024-06-28 09:56:29 -0700
commit263b19b4347fcda2e236c14a9daf41e7d518625d (patch)
tree200236a019eeee7e0b4e08cb0b23839ea0d7e611 /.github
parent41b5bca9edf38ca02d5d034e9dd2afb99777a609 (diff)
RI develop to main (#1189)
* Memory leakage in message "sizeof(SCANNER_MESSAGE) * threadCount * requestCount" bytes long memory is allocated but only "sizeof(SCANNER_MESSAGE) * threadCount" bytes long of it is freed. * Handles malloc function fail case * Refactors comment line * Solves the miscalculation of the message index * simbatt: Fix broken registry read-back The GetSimBattStateFromRegistry function is currently using default settings if GetSimBattStateFromRegistry succeeds, whereas settings from registry are only applied if GetSimBattStateFromRegistry fails. This does not make sense to me. Therefore proposing to remove the `!` negation from `if (!NT_SUCCESS(Status)) {` on the line after `Status = GetSimBattStateFromRegistry(Device, RegState);` so that default settings are loaded when registry read-back fails. * Issue of freeing memory without waiting completion of threads accessing it is fixed * Fixes information leakage warning Fixes the issue of possible information leakage from uninitialized padding bytes * Avoids possible multiplication overflow warning * Avoids possible multiplication overflow warning * CI Pipelines build with WDK Nuget Packages (#1179) Integrate nuget into the workflow pipelines * FI from main to develop (#1188) Fix text and minor issues in Winget configuration files Co-authored-by: Adonais Romero Gonzalez <[email protected]> * Improve version info, vsix installation, and update building locally readme * Fix printing vsix version * Refactored vsix install and cleaned up build sampleset --------- Co-authored-by: İsa Yurdagül <[email protected]> Co-authored-by: Fredrik Orderud <[email protected]> Co-authored-by: Christian Allred <[email protected]> Co-authored-by: tristanb-ntdev <[email protected]> Co-authored-by: Matt <[email protected]> Co-authored-by: Adonais Romero Gonzalez <[email protected]>
Diffstat (limited to '.github')
-rw-r--r--.github/scripts/Install-Vsix.ps138
-rw-r--r--.github/workflows/Code-Scanning.yml50
-rw-r--r--.github/workflows/ci-pr.yml10
-rw-r--r--.github/workflows/ci.yml13
4 files changed, 76 insertions, 35 deletions
diff --git a/.github/scripts/Install-Vsix.ps1 b/.github/scripts/Install-Vsix.ps1
new file mode 100644
index 00000000..50ef088b
--- /dev/null
+++ b/.github/scripts/Install-Vsix.ps1
@@ -0,0 +1,38 @@
+<#
+
+.SYNOPSIS
+Download and install the latest WDK VSIX.
+
+#>
+
+# set uri by resolving amd64 vsix
+$uri = "https://marketplace.visualstudio.com$((Invoke-WebRequest -Uri "https://marketplace.visualstudio.com/items?itemName=DriverDeveloperKits-WDK.WDKVsix").Links | Where-Object outerHTML -like '*(amd64)*' | select -expand href)"
+
+# set download version
+$uri_version = ([regex]'(\d+\.)(\d+\.)(\d+\.)(\d+)').Matches($uri).Value
+
+# set msbuild path
+$msbuild_path = (Resolve-Path "$env:ProgramFiles\Microsoft Visual Studio\2022\*\MSBuild\")
+
+# download vsix, expand, and store the downloaded version extracted from the extension manifest
+"Downloading WDK VSIX version: $uri_version..."
+Invoke-WebRequest -Uri "$uri" -OutFile wdk.zip
+"Expanding WDK VSIX archive..."
+Expand-Archive ".\wdk.zip" .\
+"Extracting version from manifest..."
+$downloaded_version = ([xml](Get-Content .\extension.vsixmanifest)).PackageManifest.Metadata.Identity.Version
+"Downloaded WDK VSIX version: $downloaded_version"
+
+# copy msbuild files, extension manifest, and check installed version from the extension manifest
+"Copying WDK extension files to build path..."
+cp (".\`$MSBuild\*", ".\extension.vsixmanifest") "$msbuild_path" -Recurse -Force
+"Extracting version from copied manifest..."
+$installed_version = ([xml](Get-Content ${msbuild_path}\extension.vsixmanifest)).PackageManifest.Metadata.Identity.Version
+"Installed WDK VSIX Version: $installed_version"
+if (-not ("$downloaded_version" -eq "$installed_version")) {
+ "WDK VSIX installation failed due to version mismatch"
+ exit 1
+}
+
+# set github environment variable for vsix version
+"SAMPLES_VSIX_VERSION=$installed_version" | Out-File -FilePath "$env:GITHUB_ENV" -Append
diff --git a/.github/workflows/Code-Scanning.yml b/.github/workflows/Code-Scanning.yml
index a18bcf95..cd0d8abf 100644
--- a/.github/workflows/Code-Scanning.yml
+++ b/.github/workflows/Code-Scanning.yml
@@ -32,31 +32,31 @@ jobs:
language: [ 'cpp' ]
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- with:
- submodules: 'recursive'
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3
- with:
- languages: ${{ matrix.language }}
- packs: microsoft/windows-drivers
- - name: Add MSBuild to PATH
- uses: microsoft/setup-msbuild@v2
+ - name: Install WDK VSIX
+ run: .\.github\scripts\Install-Vsix.ps1
- - name: Retrieve and build all available solutions
- run: |
- .\Build-AllSamples.ps1 -Verbose -ThrottleLimit 1
- env:
- WDS_Configuration: Debug
- WDS_Platform: x64
- WDS_WipeOutputs: ${{ true }}
+ - name: Install Nuget Packages
+ run: nuget restore .\packages.config -PackagesDirectory .\packages\
- - name: Perform CodeQL analysis
- uses: github/codeql-action/analyze@v3
- with:
- category: "/language:${{matrix.language}}"
-
-
-
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3
+ with:
+ languages: ${{ matrix.language }}
+ packs: microsoft/windows-drivers
+
+ - name: Retrieve and build all available solutions
+ run: .\Build-AllSamples.ps1 -Verbose -ThrottleLimit 1
+ env:
+ WDS_Configuration: Debug
+ WDS_Platform: x64
+ WDS_WipeOutputs: ${{ true }}
+
+ - name: Perform CodeQL analysis
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: "/language:${{matrix.language}}"
diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml
index 7640b966..c04f4adb 100644
--- a/.github/workflows/ci-pr.yml
+++ b/.github/workflows/ci-pr.yml
@@ -22,8 +22,11 @@ jobs:
with:
submodules: 'recursive'
- - name: Add MSBuild to PATH
- uses: microsoft/setup-msbuild@v2
+ - name: Install WDK VSIX
+ run: .\.github\scripts\Install-Vsix.ps1
+
+ - name: Install Nuget Packages
+ run: nuget restore .\packages.config -PackagesDirectory .\packages\
- name: Get changed files
id: get-changed-files
@@ -63,8 +66,7 @@ jobs:
path: _logs
- name: Join and generate global reports
- run: |
- .\.github\scripts\Join-CsvReports.ps1
+ run: .\.github\scripts\Join-CsvReports.ps1
- name: Archive global overview build reports
uses: actions/upload-artifact@v3
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ad92f83b..c35a81ec 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -22,12 +22,14 @@ jobs:
with:
submodules: 'recursive'
- - name: Add MSBuild to PATH
- uses: microsoft/setup-msbuild@v2
+ - name: Install WDK VSIX
+ run: .\.github\scripts\Install-Vsix.ps1
+
+ - name: Install Nuget Packages
+ run: nuget restore .\packages.config -PackagesDirectory .\packages\
- name: Retrieve and build all available solutions
- run: |
- .\Build-AllSamples.ps1 -Verbose
+ run: .\Build-AllSamples.ps1 -Verbose
env:
WDS_Configuration: ${{ matrix.configuration }}
WDS_Platform: ${{ matrix.platform }}
@@ -56,8 +58,7 @@ jobs:
path: _logs
- name: Join and generate global reports
- run: |
- .\.github\scripts\Join-CsvReports.ps1
+ run: .\.github\scripts\Join-CsvReports.ps1
- name: Archive global overview build reports
uses: actions/upload-artifact@v3