Skip to content

Commit aa33092

Browse files
authored
Slightly faster CodeQL (#242)
1 parent 278329a commit aa33092

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/codeql.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,32 +21,43 @@ jobs:
2121
contents: read
2222
actions: read # for github/codeql-action/init to get workflow details
2323
security-events: write # for github/codeql-action/analyze to upload SARIF results
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: actions
29+
- language: java
2430
runs-on: ubuntu-latest
2531
steps:
2632
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2733

2834
- name: Set up Java 17
35+
if: matrix.language == 'java'
2936
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3037
with:
3138
distribution: temurin
3239
java-version: 17
3340

3441
- name: Set up gradle
42+
if: matrix.language == 'java'
3543
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
3644

3745
- name: Initialize CodeQL
3846
uses: github/codeql-action/init@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
3947
with:
40-
languages: java, actions
48+
languages: ${{ matrix.language }}
4149
# using "latest" helps to keep up with the latest Kotlin support
4250
# see https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433
4351
tools: latest
4452

4553
- name: Assemble
54+
if: matrix.language == 'java'
4655
# --no-build-cache is required for codeql to analyze all modules
4756
# --no-daemon is required for codeql to observe the compilation
4857
# (see https://docs.github.com/en/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis#specifying-build-commands)
4958
run: ./gradlew assemble --no-build-cache --no-daemon
5059

5160
- name: Perform CodeQL analysis
5261
uses: github/codeql-action/analyze@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
62+
with:
63+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)