Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add codeql ghaction #1

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 1 * * *'

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579

- name: Initialize CodeQL
uses: github/codeql-action/init@5581e08a65fc3811c3ac78939dd59e7a8adbf003
with:
languages: ${{ matrix.language }}

- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qqy \
bison \
clang \
flex \
gawk \
gettext \
libaudit-dev \
libcap-dev \
libcap-ng-dev \
libcunit1-dev \
libdbus-glib-1-dev \
libpcre3-dev \
python3-dev \
python-dev \
ruby-dev \
swig \
xmlto

- run: |
make -j$(nproc) DESTDIR="$(pwd)/destdir" install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5581e08a65fc3811c3ac78939dd59e7a8adbf003