Skip to content

Commit 13cf515

Browse files
committed
fix
1 parent 14a9d46 commit 13cf515

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/boards.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
name: Set Chunks
4343
run: |
4444
echo "test-chunks<<EOF" >> $GITHUB_OUTPUT
45-
echo "$( jq -nc '${{ env.FQBNS }} | [_nwise( ${{ env.BOARD-COUNT }}/15 | ceil)]')" >> $GITHUB_OUTPUT
45+
echo "$( jq -nc '${{ env.FQBNS }} | [_nwise( ${{ env.BOARD-COUNT }}/15 | ceil)] | to_entries | map({id: (.key + 1), chunk: .value})')" >> $GITHUB_OUTPUT
4646
echo "EOF" >> $GITHUB_OUTPUT
4747
4848
test-boards:
@@ -57,7 +57,7 @@ jobs:
5757
strategy:
5858
fail-fast: false
5959
matrix:
60-
chunk: ${{ fromJSON(needs.setup-chunks.outputs.test-chunks) }}
60+
include: ${{ fromJSON(needs.setup-chunks.outputs.test-chunks) }}
6161

6262
steps:
6363
- name: Checkout repository
@@ -90,7 +90,12 @@ jobs:
9090
exit 1;
9191
fi
9292
93-
# Running CodeQL here generates thousands of false positives
93+
- name: Initialize CodeQL
94+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
95+
with:
96+
languages: cpp
97+
build-mode: manual
98+
config-file: ./.github/codeql/codeql-config.yml
9499

95100
- name: Compile sketch
96101
uses: P-R-O-C-H-Y/compile-sketches@a62f069b92dc8f5053da4ac439ea6d1950cf6379 # main
@@ -108,3 +113,25 @@ jobs:
108113
sketch-paths: "- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino"
109114
verbose: true
110115

116+
- name: Run CodeQL Analysis
117+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
118+
with:
119+
category: "Boards Test: ${{ env.TEST_MODE }} chunk ${{ matrix.id }}"
120+
output: sarif-results
121+
upload: failure-only
122+
123+
- name: Filter CodeQL Results
124+
uses: advanced-security/filter-sarif@v1
125+
with:
126+
patterns: |
127+
+**/*
128+
-tools/**
129+
input: sarif-results/cpp.sarif
130+
output: sarif-results/cpp.sarif
131+
132+
- name: Upload filtered SARIF
133+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
134+
with:
135+
sarif_file: sarif-results/cpp.sarif
136+
category: "Boards Test: ${{ env.TEST_MODE }} chunk ${{ matrix.id }}"
137+

0 commit comments

Comments
 (0)