Add CodeQL workflow for my branch

This commit is contained in:
Hinko Kocevar
2025-04-06 12:11:24 +02:00
committed by Andrew Johnson
parent 5813dcd639
commit 4a81f5c518

64
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: "CodeQL"
on:
push:
branches: 7.0
tags: 'R7.0.*'
pull_request:
branches: 7.0
paths-ignore:
- '.appveyor/*'
- '.tools/*'
- 'documentation/*'
- 'startup/*'
- '**/*.md'
- '**/*.html'
jobs:
analyze:
name: Analyze
runs-on:
- ubuntu-latest
# - windows-latest
# Supported by CodeQL which would check the Windows
# port, but needs more work here to set it up
permissions:
# Required for all workflows:
security-events: write
strategy:
fail-fast: false
matrix:
language: [ cpp ]
steps:
- name: Checkout Repositories
uses: actions/checkout@v4
with:
submodules: false
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install --yes libreadline-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/config.yml
- name: Build C/C++
run: |
echo '*** Building with these versions >>>'
g++ --version
make --version
perl --version
echo '<<<'
make -sj2 || echo '*** Ignoring build failure for CodeQL ***'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"