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

68 lines
2.4 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
env:
CARGO_HTTP_MULTIPLEXING: false
2020-10-01 07:48:11 +00:00
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@v4
2020-10-01 07:48:11 +00:00
with:
submodules: true
- name: Prepare Linux
if: matrix.language == 'cpp'
run: |
sudo apt-get update -y
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libmariadb-dev libwebsockets-dev libvulkan-dev glslang-tools spirv-tools libglew-dev -y
2020-10-01 07:48:11 +00:00
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
2022-10-25 11:50:49 +00:00
uses: github/codeql-action/init@v2
2020-10-01 07:48:11 +00:00
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.
2020-10-01 07:48:11 +00:00
# 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
2023-08-23 15:35:28 +00:00
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
2020-10-01 07:48:11 +00:00
- name: Build in release mode
if: matrix.language == 'cpp'
run: |
mkdir release
cd release
2022-02-14 21:34:43 +00:00
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
2021-08-16 09:17:08 +00:00
cmake --build . --config RelWithDebInfo --target everything
2020-10-01 07:48:11 +00:00
- name: Perform CodeQL Analysis
2022-10-25 11:50:49 +00:00
uses: github/codeql-action/analyze@v2