Files
strongswan-ext/.github/workflows/codeql.yml
T
Tobias Brunner 60f4c86780 github: Remove commit ID from cache keys
This reduces the cache storage for active branches and since caches for
different branches are separate and we abort previous builds of the same
branch, this is not necessary to ensure caches can successfully be stored.
2026-04-17 15:18:11 +02:00

77 lines
2.0 KiB
YAML

name: "CodeQL"
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 200M
# CodeQL currently doesn't support ccache
CCACHE_DISABLE: true
OS_NAME: linux
jobs:
pre-check:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip-check.outputs.should_skip }}
steps:
- id: skip-check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content_newer'
analyze:
needs: pre-check
if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python', 'ruby' ]
steps:
- uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/config.yml
- if: matrix.language == 'python' || matrix.language == 'ruby'
name: Autobuild
uses: github/codeql-action/autobuild@v4
# this follows the steps of the Linux workflow
- if: matrix.language == 'cpp'
uses: actions/cache@v5
with:
path: ~/.cache/ccache
key: ccache-ubuntu-latest-gcc-codeql
restore-keys: |
ccache-ubuntu-latest-gcc-all
ccache-ubuntu-latest-gcc-
- if: matrix.language == 'cpp'
run: |
sudo apt-get install -qq ccache
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
ccache -z
- if: matrix.language == 'cpp'
env:
TEST: codeql
uses: ./.github/actions/default
- if: matrix.language == 'cpp'
run: ccache -s
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"