Update GitHub Actions (#190) #447
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: "CodeQL" | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- "**/workflows/codeql-analysis.yml" | |
- "**/Source/**" | |
- "**/Tests/**" | |
- "**/ThirdParty/**" | |
- "**/CMakeLists.txt" | |
- "**/.gitmodules" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'cpp' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Ninja | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install ninja-build | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |