-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.47 KB
/
codeql-analysis.yml
File metadata and controls
55 lines (47 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'CodeQL'
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '45 0 * * 1'
jobs:
analyze:
name: 'Analyze'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
compiler_c: [gcc]
compiler_cxx: [g++]
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4.1.1
# Initializes the CodeQL tools for scanning.
- name: 'Initialize CodeQL'
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: 'Install build dependencies'
run: |
sudo apt-get update
sudo apt-get install -y texinfo
sudo apt-get install -y autotools-dev autoconf build-essential bear
# Use custom build process for C/C++
- name: 'Build'
env:
CC: ${{ matrix.compiler_c }}
CXX: ${{ matrix.compiler_cxx }}
run: |
cd ${{ github.workspace }}
autoreconf -vi
./scripts/build.sh
- name: 'Perform CodeQL analysis'
uses: github/codeql-action/analyze@v2