66 lines
1.4 KiB
YAML
Vendored
66 lines
1.4 KiB
YAML
Vendored
name: CodeQL
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- "**/workflows/codeql-analysis.yml"
|
|
- "**/Source/**"
|
|
- "**/Tests/**"
|
|
- "**/ThirdParty/**"
|
|
- "**/CMakeLists.txt"
|
|
- "**/.gitmodules"
|
|
- "**/.codeql.yml"
|
|
- "!**/*.md"
|
|
- "!**/*.txt"
|
|
|
|
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@v6
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install Ninja
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install ninja-build libreadline-dev
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v3
|
|
with:
|
|
languages: ${{ matrix.language }}
|
|
config-file: ./.codeql.yml
|
|
|
|
- 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 --parallel $(nproc)
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v3
|