-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.82 KB
/
codeql-analysis.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "28 21 * * 6"
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ["cpp"]
os: [centos7, rhel8]
include:
- os: centos7
container: "centos:7"
- os: rhel8
container: "oraclelinux:8"
container: ${{ matrix.container }}
steps:
- name: Checkout for centos7
if: ${{ matrix.os == 'centos7' }}
uses: actions/checkout@v3
- name: Checkout for rhel8
if: ${{ matrix.os == 'rhel8' }}
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL for centos7
if: ${{ matrix.os == 'centos7' }}
uses: github/codeql-action/init@v2
with:
queries: security-extended
languages: ${{ matrix.language }}
- name: Initialize CodeQL for rhel8
if: ${{ matrix.os == 'rhel8' }}
uses: github/codeql-action/init@v3
with:
queries: security-extended
languages: ${{ matrix.language }}
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
- name: Build osptoolkit
run: |
yum install -y epel-release
yum install -y make gcc-c++ openssl-devel utf8proc-devel
cd $GITHUB_WORKSPACE/src
make build
cd $GITHUB_WORKSPACE/test
make linux
- name: Perform CodeQL Analysis for centos7
if: ${{ matrix.os == 'centos7' }}
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis for rhel8
if: ${{ matrix.os == 'rhel8' }}
uses: github/codeql-action/analyze@v3