ci: enable caching for dependencies #21
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
name: "CodeQL Advanced" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
schedule: | |
- cron: "26 4 * * 4" | |
jobs: | |
analyze: | |
name: Analyze (${{ matrix.language }}) | |
runs-on: ubuntu-latest | |
permissions: | |
# required for all workflows | |
security-events: write | |
# required to fetch internal or private CodeQL packs | |
packages: read | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- language: c-cpp | |
build-mode: manual | |
- language: actions | |
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 }} | |
# These steps install the dependencies needed for the build | |
- name: Install gpac and GStreamer | |
if: matrix.language == 'c-cpp' | |
uses: ./.github/actions/deps | |
# This step builds the project. | |
- name: Build | |
if: matrix.language == 'c-cpp' | |
shell: bash | |
run: | | |
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -B build | |
cmake --build build -j | |
# This step performs the CodeQL analysis. | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 | |
with: | |
category: "/language:${{ matrix.language }}" |