Skip to content

Commit 5e7f99e

Browse files
authored
Slightly faster CodeQL (#91)
1 parent deffd5e commit 5e7f99e

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
@@ -19,6 +19,12 @@ jobs:
1919
contents: read
2020
actions: read # for github/codeql-action/init to get workflow details
2121
security-events: write # for github/codeql-action/analyze to upload SARIF results
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: actions
27+
- language: java
2228
runs-on: ubuntu-latest
2329
steps:
2430
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -27,27 +33,32 @@ jobs:
2733
fetch-depth: 0
2834

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

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

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

4654
- name: Assemble
55+
if: matrix.language == 'java'
4756
# --no-build-cache is required for codeql to analyze all modules
4857
# --no-daemon is required for codeql to observe the compilation
4958
# (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)
5059
run: ./gradlew assemble --no-build-cache --no-daemon
5160

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

0 commit comments

Comments
 (0)