forked from xingguangcuican6666/ABK
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (77 loc) · 2.51 KB
/
Copy pathcodeql.yml
File metadata and controls
89 lines (77 loc) · 2.51 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
81
82
83
84
85
86
87
88
89
name: CodeQL
on:
push:
branches:
- dev
pull_request:
branches:
- dev
schedule:
- cron: "28 4 * * 1"
workflow_dispatch:
permissions:
actions: read
contents: read
packages: read
security-events: write
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: c-cpp
build-mode: manual
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
- language: java-kotlin
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix['build-mode'] }}
dependency-caching: true
- name: Set up JDK
if: ${{ matrix.language == 'java-kotlin' || matrix.language == 'c-cpp' }}
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- name: Set up Android SDK
if: ${{ matrix.language == 'java-kotlin' || matrix.language == 'c-cpp' }}
uses: android-actions/setup-android@v3
- name: Install Android SDK packages
if: ${{ matrix.language == 'java-kotlin' || matrix.language == 'c-cpp' }}
run: sdkmanager --channel=3 "platforms;android-37.0" "build-tools;37.0.0" "cmake;3.22.1" "ndk;28.2.13676358"
- name: Set up Gradle
if: ${{ matrix.language == 'java-kotlin' || matrix.language == 'c-cpp' }}
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "9.3.1"
- name: Build Java/Kotlin sources for CodeQL
if: ${{ matrix.language == 'java-kotlin' }}
run: >-
gradle --no-daemon --no-build-cache --rerun-tasks
:app:compileDebugKotlin :app:compileDebugJavaWithJavac
- name: Build native sources for CodeQL
if: ${{ matrix.language == 'c-cpp' }}
run: >-
gradle --no-daemon --no-build-cache --rerun-tasks
':app:buildCMakeDebug[arm64-v8a]'
':app:buildCMakeDebug[armeabi-v7a]'
':app:buildCMakeDebug[x86]'
':app:buildCMakeDebug[x86_64]'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: /language:${{ matrix.language }}