forked from Tibia-Servers/otclient-1
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 2.2 KB
/
analysis-codeql.yml
File metadata and controls
80 lines (67 loc) · 2.2 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: Analysis - CodeQL
on:
pull_request:
push:
branches:
- master
- dev
- devel
- develop
env:
VCPKG_BUILD_TYPE: release
CMAKE_BUILD_PARALLEL_LEVEL: 2
MAKEFLAGS: '-j 2'
NODE_OPTIONS: ' --max-old-space-size=8192 '
jobs:
codeql:
name: CodeQL
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['cpp', 'python']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Install Linux Dependencies
if: ${{ matrix.language == 'cpp' }}
run: >
sudo apt-get update && sudo apt-get install ccache build-essential
libluajit-5.1-dev liblua5.1-0 liblua5.1-0-dev libglfw3-dev
libgl1-mesa-dev libglu1-mesa-dev libgl1-mesa-dev libegl1-mesa-dev zip
- name: CCache
id: ccache
uses: actions/cache@v2
with:
path: /home/runner/.ccache
key: ccache-${{ runner.os }}-RelWithDebInfo-${{ hashFiles('**/src') }}
restore-keys: |
ccache-${{ runner.os }}-RelWithDebInfo-
ccache-${{ runner.os }}-
- 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: 86d689b2305d8c453418cae1ed2009718d05cddf
- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest
- name: Run CMake
if: ${{ matrix.language == 'cpp' }}
uses: lukka/run-cmake@v3
with:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: ${{ github.workspace }}/build/
cmakeBuildType: RelWithDebInfo
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1