Skip to content

CodeQL Advanced

CodeQL Advanced #7

Workflow file for this run

# SPDX-FileCopyrightText: © FOSSology contributors
# SPDX-License-Identifier: FSFAP
#
# 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.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '42 23 * * 1'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: c-cpp
build-mode: manual
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
dependency-caching: true
config-file: ./.github/codeql/codeql-config.yml
- if: matrix.build-mode == 'manual'
shell: bash
name: Build project
run: |
sudo apt update
sudo apt install -y libboost-system-dev libboost-filesystem-dev \
libcppunit-dev libcunit1-dev libdbd-sqlite3-perl libjsoncpp-dev \
libjson-c-dev liblocal-lib-perl libspreadsheet-writeexcel-perl \
libtext-template-perl libgcrypt20-dev lsb-release
sudo ./utils/fo-installdeps --everything -y
sudo apt install -y gcc g++
mkdir build
cmake -DCMAKE_BUILD_TYPE=Debug -GNinja -DTESTING=ON -S . -B ./build
cmake --build build --config Debug --parallel
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"