Refactor CI workflow #264
Workflow file for this run
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: Analysis | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'doc/**' | |
| branches: [ main ] | |
| pull_request: | |
| paths-ignore: | |
| - 'doc/**' | |
| branches: [ main ] | |
| env: | |
| build: '${{ github.workspace }}/build' | |
| config: 'Release' | |
| jobs: | |
| build: | |
| name: Microsoft C++ Code Analysis | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Configure CMake | |
| run: cmake -B ${{ env.build }} -DCMAKE_BUILD_TYPE=${{ env.config }} | |
| - name: Run Microsoft Visual C++ Analysis | |
| id: run-analysis | |
| uses: microsoft/msvc-code-analysis-action@v0.1.1 | |
| with: | |
| cmakeBuildDirectory: ${{ env.build }} | |
| buildConfiguration: ${{ env.config }} | |
| ignoredTargetPaths: ${{ github.workspace }}/tests | |
| ruleset: '${{ github.workspace }}/infra/Analysis.ruleset' | |
| - name: Upload SARIF as an Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sarif-file | |
| path: ${{ steps.run-analysis.outputs.sarif }} | |
| if-no-files-found: error | |
| - name: Upload SARIF to GitHub | |
| uses: github/codeql-action/upload-sarif@v1 | |
| with: | |
| sarif_file: ${{ steps.run-analysis.outputs.sarif }} |