-
-
Notifications
You must be signed in to change notification settings - Fork 2
93 lines (77 loc) · 2.25 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CodeQL
on:
schedule:
- cron: '0 6 * * 6' # Every saturday at 06:00
workflow_dispatch:
jobs:
analyze-go:
name: Analyze Go Code
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
analyze-cpp:
name: Analyze C++ Code
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
- name: Prepare environment
run: |
shopt -s extglob
rm -rf !("compiler")
cp -fR ./compiler/cpp/* .
rm -rf ./compiler
- name: Download Libs
run: |
mkdir -p ./lib/json
cd lib
git clone https://github.com/google/googletest.git
curl -sSL "https://github.com/nlohmann/json/releases/download/v3.11.2/json.hpp" --output json/json.hpp
- name: Build project
uses: nicledomaS/[email protected]
with:
submodule_update: ON
run_tests: ON
cmake_args: -DWITH_TESTS=ON
unit_test_build: -Dtest=ON
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
analyze-java:
name: Analyze Java Code
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
- name: Set up JDK 15
uses: actions/setup-java@v4
with:
java-version: 15
distribution: adopt
- name: Run the Maven verify phase
working-directory: compiler/java
run: mvn verify --batch-mode --update-snapshots --quiet --no-transfer-progress
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3