Skip to content

Commit

Permalink
github: enable codeql analysis
Browse files Browse the repository at this point in the history
Hopefully, this will help finding bugs.

Signed-off-by: Robin Jarry <[email protected]>
  • Loading branch information
rjarry committed Jan 9, 2025
1 parent dc39ca2 commit 527be9d
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2025 Robin Jarry
---
name: CodeQL

permissions:
contents: read

on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '44 21 * * 5'

jobs:
analyze:
permissions:
security-events: write
name: ${{ matrix.name }}
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
include:
- name: Github Actions
language: actions
build-mode: none
- name: C Code
language: c-cpp
build-mode: manual

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Build
if: matrix.build-mode == 'manual'
run: |
set -xe
sudo apt-get update -qy
sudo apt-get install -qy --no-install-recommends \
make gcc ninja-build meson git scdoc libibverbs-dev \
libasan8 libcmocka-dev libedit-dev libarchive-dev \
libevent-dev libsmartcols-dev libnuma-dev python3-pyelftools
make
- uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

0 comments on commit 527be9d

Please sign in to comment.