Merge branch 'main' into restore_msan #307
This file contains 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: Windows CMake | |
on: [push, workflow_dispatch] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/build | |
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Run MSVC Code Analysis | |
uses: microsoft/msvc-code-analysis-action@v0.1.1 | |
# Provide a unique ID to access the sarif output path | |
id: run-analysis | |
with: | |
cmakeBuildDirectory: ${{github.workspace}}/build | |
buildConfiguration: Release | |
# Ruleset file that will determine what checks will be run | |
ruleset: NativeRecommendedRules.ruleset | |
# Paths to ignore analysis of CMake targets and includes | |
ignoredTargetPaths: ${{ github.workspace }}\catch2; ${{ github.workspace }}\fakeit | |
ignoredIncludePaths: ${{ github.workspace }}\catch2; ${{ github.workspace }}\fakeit | |
# Upload SARIF file to GitHub Code Scanning Alerts | |
- name: Upload SARIF to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: ${{ steps.run-analysis.outputs.sarif }} | |
# Upload SARIF file as an Artifact to download and view | |
- name: Upload SARIF as an Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sarif-file | |
path: ${{ steps.run-analysis.outputs.sarif }} | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Run | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: $BUILD_TYPE/SampleLibApp.exe | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ctest -C $BUILD_TYPE |