This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 332
64 lines (52 loc) · 1.69 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
---
name: "CodeQL"
on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '17 22 * * 2'
env:
NODE_OPTIONS: " --max-old-space-size=8192 "
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]
steps:
- uses: lukka/get-cmake@latest
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Install Dependencies
if: ${{ matrix.language == 'cpp' }}
run: >
sudo apt-get update && sudo apt-get install ccache build-essential
libluajit-5.1-dev zip
- name: Restore artifacts, or setup vcpkg (do not install any package)
if: ${{ matrix.language == 'cpp' }}
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
vcpkgTriplet: x64-linux
additionalCachedPaths: ${{ github.workspace }}/build/vcpkg_installed
vcpkgGitCommitId: b9cd2a7958dec657fb869ec487d2a98cf39a8d48
- name: 'Run CMake with Ninja, install dependencies with vcpkg, build with CMake'
if: ${{ matrix.language == 'cpp' }}
uses: lukka/run-cmake@v3
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: ${{ github.workspace }}/build/
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1