ddnet/.github/workflows/codeql-analysis.yaml

63 lines
2.1 KiB
YAML
Raw Normal View History

2020-10-01 07:48:11 +00:00
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 13 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp', 'python']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
- name: Prepare Linux
if: matrix.language == 'cpp'
run: |
sudo apt-get update -y
2021-12-07 17:16:38 +00:00
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libmariadbclient-dev libwebsockets-dev -y
2020-10-01 07:48:11 +00:00
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Build in release mode
if: matrix.language == 'cpp'
run: |
mkdir release
cd release
2021-08-16 09:17:08 +00:00
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
cmake --build . --config RelWithDebInfo --target everything
2020-10-01 07:48:11 +00:00
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1