This avoids the previously applied paths-ignore exception workaround, and makes runs as strict as (reasonably) possible. Only directories known to affect builds will trigger builds, as well as any `.cpp` or `.h` files to account for any new folders created - though these should still be added to the workflow later Signed-off-by: Seth Flynn <getchoo@tuta.io>
91 lines
1.8 KiB
YAML
91 lines
1.8 KiB
YAML
name: "CodeQL Code Scanning"
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
# File types
|
|
- "**.cpp"
|
|
- "**.h"
|
|
- "**.java"
|
|
|
|
# Directories
|
|
- "buildconfig/"
|
|
- "cmake/"
|
|
- "launcher/"
|
|
- "libraries/"
|
|
- "program_info/"
|
|
- "tests/"
|
|
|
|
# Files
|
|
- "CMakeLists.txt"
|
|
- "COPYING.md"
|
|
|
|
# Workflows
|
|
- ".github/codeql"
|
|
- ".github/workflows/codeql.yml"
|
|
pull_request:
|
|
paths:
|
|
# File types
|
|
- "**.cpp"
|
|
- "**.h"
|
|
|
|
# Directories
|
|
- "buildconfig/"
|
|
- "cmake/"
|
|
- "launcher/"
|
|
- "libraries/"
|
|
- "program_info/"
|
|
- "tests/"
|
|
|
|
# Files
|
|
- "CMakeLists.txt"
|
|
- "COPYING.md"
|
|
|
|
# Workflows
|
|
- ".github/codeql"
|
|
- ".github/workflows/codeql.yml"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
CodeQL:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: "true"
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v3
|
|
with:
|
|
config-file: ./.github/codeql/codeql-config.yml
|
|
queries: security-and-quality
|
|
languages: cpp, java
|
|
|
|
- name: Install Dependencies
|
|
run: sudo apt-get -y update
|
|
|
|
sudo apt-get -y install ninja-build extra-cmake-modules scdoc
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
aqtversion: "==3.1.*"
|
|
py7zrversion: ">=0.20.2"
|
|
version: "6.8.1"
|
|
host: "linux"
|
|
target: "desktop"
|
|
arch: ""
|
|
modules: "qt5compat qtimageformats qtnetworkauth"
|
|
tools: ""
|
|
|
|
- name: Configure and Build
|
|
run: |
|
|
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -G Ninja
|
|
|
|
cmake --build build
|
|
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v3
|