-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c338ca
commit 6aae3c9
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
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@v3 | ||
|
||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
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@v2 | ||
with: | ||
category: "/language:c-cpp" |