hercules/.github/workflows/codeql-analysis.yml
Ibrahim Zidan b76190dd9a
Update github actions to work with the new cmake setup
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
2026-06-27 22:21:33 +03:00

56 lines
1.4 KiB
YAML

name: "CodeQL"
on: workflow_call
defaults:
run:
shell: bash
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: 'c'
build-mode: 'manual'
- language: 'python'
build-mode: 'none'
# github.head_ref will stop previous runs in the same PR (if in a PR)
# github.run_id is a fallback when outside a PR (e.g. every merge in master will run, and previous won't stop)
concurrency:
group: codeql-${{ github.head_ref || github.run_id }}_${{ matrix.language }}
cancel-in-progress: true
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# Build hercules
- if: matrix.build-mode == 'manual'
name: Manual Build
run: |
./tools/ci/travis.sh prepareenv
source .venv/bin/activate
./tools/ci/travis.sh build -DCMAKE_BUILD_TYPE=Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4