diff options
| author | 5an7y-Microsoft <[email protected]> | 2026-07-02 13:27:26 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-02 13:27:26 -0700 |
| commit | 2ee527bfeb0aeb6be11f0a8b6dce4011b358ce89 (patch) | |
| tree | 22403b0092c85976352e311322abc835c7eb2f09 /.github/workflows/ci-pr.yml | |
| parent | 1439bff8606882f4c69cf8b21230b5ee7e5e4eee (diff) | |
| parent | d157348f0566d3da5bf00a3f1e414f95443b3a59 (diff) | |
Expose the NT_TARGET_VERSION in the build samples script & workflow update
Diffstat (limited to '.github/workflows/ci-pr.yml')
| -rw-r--r-- | .github/workflows/ci-pr.yml | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 6719270e..8119c94c 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -8,13 +8,39 @@ on: - '**.md' - 'LICENSE' jobs: + # Auto-discover the available _NT_TARGET_VERSION values from the active WDK so the build + # matrix never needs a hand-maintained version list. Change -Newest to build more/fewer. + discover: + name: discover _NT_TARGET_VERSIONs + runs-on: windows-2025-vs2026 + outputs: + versions: ${{ steps.nt.outputs.versions }} + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Install Nuget Packages + run: nuget restore .\packages.config -PackagesDirectory .\packages\ + + - name: Discover the newest _NT_TARGET_VERSION values + id: nt + shell: pwsh + run: | + $json = .\Get-NtTargetVersions.ps1 -Newest 4 -AsMatrixJson + "versions=$json" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 + Write-Host "Discovered _NT_TARGET_VERSION matrix: $json" + build: - name: Build driver samples + name: build ${{ matrix.nt.tag }} ${{ matrix.configuration }} ${{ matrix.platform }} + needs: discover strategy: fail-fast: false matrix: configuration: [Debug, Release] platform: [x64, arm64] + # _NT_TARGET_VERSION values are auto-discovered by the 'discover' job from the active + # WDK, so there is no version list to maintain here. + nt: ${{ fromJSON(needs.discover.outputs.versions) }} runs-on: windows-2025-vs2026 steps: - name: Check out repository code @@ -38,13 +64,14 @@ jobs: env: WDS_Configuration: ${{ matrix.configuration }} WDS_Platform: ${{ matrix.platform }} - WDS_ReportFileName: _overview.${{ matrix.configuration }}.${{ matrix.platform }} + WDS_NtTargetVersion: ${{ matrix.nt.version }} + WDS_ReportFileName: _overview.${{ matrix.nt.tag }}.${{ matrix.configuration }}.${{ matrix.platform }} - name: Archive build logs and overview build reports uses: actions/upload-artifact@v4 if: always() with: - name: logs-${{ matrix.configuration }}-${{ matrix.platform }} + name: logs-${{ matrix.nt.tag }}-${{ matrix.configuration }}-${{ matrix.platform }} path: _logs report: |
