diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/Code-Scanning.yml | 70 | ||||
| -rw-r--r-- | .github/workflows/ci-pr.yml | 24 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 28 |
3 files changed, 71 insertions, 51 deletions
diff --git a/.github/workflows/Code-Scanning.yml b/.github/workflows/Code-Scanning.yml index fc1ae7e8..63e155c9 100644 --- a/.github/workflows/Code-Scanning.yml +++ b/.github/workflows/Code-Scanning.yml @@ -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: @@ -29,31 +35,43 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp' ] + include: + - language: c-cpp + build-mode: manual steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: 'recursive' - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - - - name: Add MSBuild to PATH - uses: microsoft/[email protected] - - - 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@v2 - with: - category: "/language:${{matrix.language}}" + - name: Checkout repository + uses: actions/checkout@v4 + 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@v41 + with: + separator: "," + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + config-file: microsoft/Windows-Driver-Developer-Supplemental-Tools/config/codeql-config.yml@development + - if: github.event_name == 'pull_request' + run: | + $changedFiles = "${{ steps.get-changed-files.outputs.all_changed_files }}".Split(',') + .\.github\scripts\Build-ChangedSamples.ps1 -ChangedFiles $changedFiles -Verbose + env: + WDS_Configuration: Debug + WDS_Platform: x64 + WDS_WipeOutputs: ${{ true }} + - if: github.event_name == 'push' + 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 695d4186..0e5825d1 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -18,16 +18,16 @@ jobs: runs-on: windows-2022 steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' - - name: Add MSBuild to PATH - uses: microsoft/[email protected] + - name: Install Nuget Packages + run: nuget restore .\packages.config -PackagesDirectory .\packages\ - name: Get changed files id: get-changed-files - uses: tj-actions/changed-files@v35 + uses: tj-actions/changed-files@v46 with: separator: "," @@ -41,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: @@ -54,20 +54,20 @@ jobs: if: always() steps: - name: Check out repository code - uses: actions/checkout@v3 + 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 + 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.* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4fd1a2a..1f3d7693 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,9 @@ on: paths-ignore: - '**.md' - 'LICENSE' + schedule: + # Runs every Saturday at 00:00 PST (08:00 UTC) + - cron: '0 8 * * 6' jobs: build: name: Build driver samples @@ -18,26 +21,25 @@ jobs: runs-on: windows-2022 steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' - - name: Add MSBuild to PATH - uses: microsoft/[email protected] + - 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 }} 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: @@ -47,20 +49,20 @@ jobs: if: always() steps: - name: Check out repository code - uses: actions/checkout@v3 + 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 + 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.* |
