-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (67 loc) · 1.93 KB
/
codeql-analysis-unix.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
name: "CodeQL Unix"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '27 9 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'javascript-typescript', 'swift', 'java-kotlin' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
#
# Remove "bridging" files not compiled as part of C library builds so that
# the coverage reports are clean
#
- if: matrix.language == 'c-cpp'
name: Prune for C build
run: |
rm -rf src/java
rm -rf src/ios
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config: |
paths:
- src
- if: matrix.language == 'c-cpp'
name: Build C
run: |
make -C src/c-lib -j `nproc`
make -C src/c-lib -j `nproc` test
make -C src/c-lib -j `nproc` fuzzer
- if: matrix.language == 'java-kotlin'
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- if: matrix.language == 'java-kotlin'
name: Build Android app
working-directory: src/android
run: |
./gradlew build --no-daemon
- if: matrix.language == 'java-kotlin'
name: Build Java
run: |
make -C src/c-lib -j `nproc` libshared
ant -f src/java/build.xml test
- if: matrix.language == 'swift' || matrix.language == 'javascript-typescript'
name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3