-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.07 KB
/
codeql-scan.yml
File metadata and controls
48 lines (38 loc) · 1.07 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
name: "CodeQL scan"
on:
push:
branches:
- develop
- master
pull_request:
branches: [develop]
jobs:
CodeQL-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Install gcc
run: |
sudo apt update
sudo apt install gcc-10 g++-10
shell: bash
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release
env:
CC: gcc-10
CXX: g++-10
- name: CodeQL init
uses: github/codeql-action/init@v1
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Release
- name: Run CodeQL Analysis
uses: github/codeql-action/analyze@v1