1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
name: "CodeQL"
on:
workflow_dispatch: # Allow manual triggers
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '36 10 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
#strategy:
# fail-fast: false
# matrix:
# language: [ 'c-cpp', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: c-cpp
config: |
#disable-default-queries: true
#queries:
# - uses: security-and-quality
query-filters:
# Specifically hide the results of these queries.
- exclude:
id: cpp/assignment-does-not-return-this
- exclude:
id: cpp/fixme-comment
- exclude:
id: cpp/rule-of-two
- exclude:
id: cpp/use-of-goto
#config-file: ./lgtm.yml
#- name: Autobuild
# uses: github/codeonfigureql-action/autobuild@v2
- name: Create build with CMake
run: |
sudo apt-get -y update
sudo apt-get -y install libpng-dev libjpeg-dev libgif-dev libtiff-dev libogg-dev libvorbis-dev libsndfile-dev zlib1g-dev
cmake -S . -B cmake_build_dir -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir
- name: Build project with CMake
run: cmake --build cmake_build_dir --target all --config Release -- -j4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:c-cpp"
|