gh-actions: Update actions #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build driver solution | |
| on: | |
| push: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| configuration: [Debug, Release] | |
| platform: [x64] | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v7 | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build solution | |
| run: | | |
| msbuild crosecbus.sln /t:crosecbus /property:Configuration=${{ env.Configuration }} /property:Platform=${{ env.Platform }} /property:EnableCodeAnalysis=true /property:CodeAnalysisTreatWarningsAsErrors=true | |
| env: | |
| Configuration: ${{ matrix.configuration }} | |
| Platform: ${{ matrix.platform }} | |
| - name: Run InfVerif | |
| run: | | |
| $wdkBin = Get-Item "C:\Program Files (x86)\Windows Kits\10\Tools\*\x64" | Sort-Object Name | Select-Object -Last 1 | |
| & "$wdkBin\infverif.exe" /h /v "${{ env.Platform }}\${{ env.Configuration }}\crosecbus\crosecbus.inf" | |
| env: | |
| Configuration: ${{ matrix.configuration }} | |
| Platform: ${{ matrix.platform }} | |
| - name: Create bundle | |
| run: | | |
| mkdir bundle | |
| cp ${{ env.platform }}\${{ matrix.configuration }}\crosecbus\crosecbus.sys bundle\ | |
| cp ${{ env.platform }}\${{ matrix.configuration }}\crosecbus\crosecbus.inf bundle\ | |
| cp ${{ env.platform }}\${{ matrix.configuration }}\crosecbus\crosecbus.cat bundle\ | |
| cp ${{ env.platform }}\${{ matrix.configuration }}\crosecbus.pdb bundle\ | |
| env: | |
| Configuration: ${{ matrix.configuration }} | |
| Platform: ${{ matrix.platform }} | |
| - name: Upload bundle | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: crosecbus_${{ matrix.configuration }} | |
| path: bundle | |
| codeql: | |
| runs-on: windows-2022 | |
| permissions: | |
| security-events: write | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v7 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: cpp | |
| # Pin CodeQL CLI version for WHCP Windows 11 25H2 certification | |
| # See: https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/static-tools-and-codeql | |
| tools: https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.20.1/codeql-bundle-win64.tar.gz | |
| config-file: .github/codeql/codeql-config.yml | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v2 | |
| - name: Restore dependencies | |
| run: nuget restore crosecbus.sln | |
| - name: Add MSBuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Build solution | |
| run: | | |
| msbuild crosecbus.sln /property:Configuration=Release /property:Platform=x64 | |
| - name: Perform CodeQL analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| output: sarif-results | |
| - name: Upload SARIF file | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: codeql-sarif | |
| path: sarif-results | |
| - name: Generate DVL | |
| shell: cmd | |
| run: | | |
| "C:\Program Files (x86)\Windows Kits\10\Tools\dvl\dvl.exe" /manualCreate crosecbus X64 /sarifPath sarif-results | |
| - name: Upload DVL | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dvl | |
| path: sarif-results/crosecbus.DVL.XML |