Skip to content

Commit 8bf2573

Browse files
committed
Add CodeQL workflow with manual build
Since `autobuild` did not work, we have to switch to the "advanced" mode.
1 parent 8861d4f commit 8bf2573

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
schedule:
7+
- cron: '23 2 * * 4'
8+
9+
jobs:
10+
analyze:
11+
name: Analyze (${{ matrix.language }})
12+
runs-on: 'ubuntu-latest'
13+
permissions:
14+
security-events: write
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- language: actions
20+
build-mode: none
21+
- language: java-kotlin
22+
build-mode: manual
23+
steps:
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- name: 'Set up JDK 21'
26+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
27+
with:
28+
java-version: 21
29+
distribution: temurin
30+
- uses: sbt/setup-sbt@6c68d2fe8dfbc0a0534d70101baa2e0420e1a506 # v1.1.9
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: ${{ matrix.language }}
35+
build-mode: ${{ matrix.build-mode }}
36+
- if: matrix.build-mode == 'manual'
37+
# TODO compile only, avoid running tests
38+
run: java src/Builder.java
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)