diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/Code-Scanning.yml | 8 | ||||
| -rw-r--r-- | .github/workflows/check-sample-issue-template.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/ci-pr.yml | 45 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 45 | ||||
| -rw-r--r-- | .github/workflows/tag-codeowner-on-issue.yml | 4 |
5 files changed, 81 insertions, 25 deletions
diff --git a/.github/workflows/Code-Scanning.yml b/.github/workflows/Code-Scanning.yml index 06346d21..6d8a9849 100644 --- a/.github/workflows/Code-Scanning.yml +++ b/.github/workflows/Code-Scanning.yml @@ -41,18 +41,18 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: submodules: 'recursive' - name: Install Nuget Packages run: nuget restore .\packages.config -PackagesDirectory .\packages\ - name: Get changed files id: get-changed-files - uses: tj-actions/changed-files@v46 + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 with: separator: "," - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -72,6 +72,6 @@ jobs: WDS_Platform: x64 WDS_WipeOutputs: ${{ true }} - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/check-sample-issue-template.yml b/.github/workflows/check-sample-issue-template.yml index 7e17bedd..5e66530e 100644 --- a/.github/workflows/check-sample-issue-template.yml +++ b/.github/workflows/check-sample-issue-template.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.x' diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 6719270e..31e65790 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -8,17 +8,43 @@ 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - 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 - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: submodules: 'recursive' @@ -27,7 +53,7 @@ jobs: - name: Get changed files id: get-changed-files - uses: tj-actions/changed-files@v46 + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 with: separator: "," @@ -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 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: always() with: - name: logs-${{ matrix.configuration }}-${{ matrix.platform }} + name: logs-${{ matrix.nt.tag }}-${{ matrix.configuration }}-${{ matrix.platform }} path: _logs report: @@ -54,10 +81,10 @@ jobs: if: always() steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Retrieve overview reports - uses: actions/download-artifact@v4 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: _logs pattern: logs-* @@ -67,7 +94,7 @@ jobs: run: .\.github\scripts\Join-CsvReports.ps1 - name: Archive global overview build reports - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: logs path: _logs/_overview.all.* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca2696d8..ccfc939d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,7 @@ name: Build all driver samples on: + # Allows the workflow to be triggered manually from the Actions tab ("Run workflow"). + workflow_dispatch: push: branches: - main @@ -11,17 +13,43 @@ on: # Runs every Saturday at 00:00 PST (08:00 UTC) - cron: '0 8 * * 6' 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - 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 - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: submodules: 'recursive' @@ -33,13 +61,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 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 if: always() with: - name: logs-${{ matrix.configuration }}-${{ matrix.platform }} + name: logs-${{ matrix.nt.tag }}-${{ matrix.configuration }}-${{ matrix.platform }} path: _logs report: @@ -49,10 +78,10 @@ jobs: if: always() steps: - name: Check out repository code - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Retrieve overview reports - uses: actions/download-artifact@v4 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: _logs pattern: logs-* @@ -62,7 +91,7 @@ jobs: run: .\.github\scripts\Join-CsvReports.ps1 - name: Archive global overview build reports - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: logs path: _logs/_overview.all.* diff --git a/.github/workflows/tag-codeowner-on-issue.yml b/.github/workflows/tag-codeowner-on-issue.yml index a4fe365d..1529b50c 100644 --- a/.github/workflows/tag-codeowner-on-issue.yml +++ b/.github/workflows/tag-codeowner-on-issue.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: '3.x' |
