1919 fail-fast : false
2020 matrix :
2121 board :
22- - ' raspberry_pi_pico '
22+ - ' metro_m4_express '
2323 steps :
2424 - name : Checkout TinyUSB
2525 uses : actions/checkout@v4
@@ -88,12 +88,13 @@ jobs:
8888 path : ${{ steps.analyze.outputs.sarif-output }}
8989
9090 PVS-Studio :
91+ if : github.repository_owner == 'hathach'
9192 runs-on : ubuntu-latest
9293 strategy :
9394 fail-fast : false
9495 matrix :
9596 board :
96- - ' stm32h743eval '
97+ - ' raspberry_pi_pico '
9798 steps :
9899 - name : Checkout TinyUSB
99100 uses : actions/checkout@v4
@@ -119,7 +120,7 @@ jobs:
119120 - name : Analyze
120121 run : |
121122 mkdir -p build
122- cmake examples -B build -G Ninja -DBOARD=${{ matrix.board }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - DCMAKE_BUILD_TYPE=MinSizeRel
123+ cmake examples -B build -G Ninja -DBOARD=${{ matrix.board }} -DCMAKE_BUILD_TYPE=MinSizeRel
123124 cmake --build build
124125 pvs-studio-analyzer analyze -f build/compile_commands.json -j --exclude-path hw/mcu/ --exclude-path lib/
125126 plog-converter -t sarif -o pvs-studio-${{ matrix.board }}.sarif PVS-Studio.log
@@ -137,14 +138,15 @@ jobs:
137138 path : pvs-studio-${{ matrix.board }}.sarif
138139
139140 SonarQube :
141+ if : github.repository_owner == 'hathach'
140142 runs-on : ubuntu-latest
141143 env :
142144 BUILD_WRAPPER_OUT_DIR : build_wrapper_output_directory
143145 strategy :
144146 fail-fast : false
145147 matrix :
146148 board :
147- - ' metro_m4_express '
149+ - ' stm32h743eval '
148150 steps :
149151 - name : Checkout TinyUSB
150152 uses : actions/checkout@v4
@@ -166,7 +168,7 @@ jobs:
166168
167169 - name : Run Build Wrapper
168170 run : |
169- cmake examples -B build -G Ninja -DBOARD=${{ matrix.board }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - DCMAKE_BUILD_TYPE=MinSizeRel
171+ cmake examples -B build -G Ninja -DBOARD=${{ matrix.board }} -DCMAKE_BUILD_TYPE=MinSizeRel
170172 build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/
171173
172174 - name : SonarQube Scan
@@ -177,3 +179,46 @@ jobs:
177179 # Consult https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/sonarscanner/ for more information and options
178180 args : >
179181 --define sonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json
182+
183+ IAR-CStat :
184+ if : github.repository_owner == 'hathach'
185+ runs-on : ubuntu-latest
186+ strategy :
187+ fail-fast : false
188+ matrix :
189+ board :
190+ - ' b_g474e_dpow1'
191+ steps :
192+ - name : Checkout TinyUSB
193+ uses : actions/checkout@v4
194+
195+ - name : Get Dependencies
196+ uses : ./.github/actions/get_deps
197+ with :
198+ arg : -b${{ matrix.board }}
199+
200+ - name : Setup Toolchain
201+ uses : ./.github/actions/setup_toolchain
202+ with :
203+ toolchain : ' arm-iar'
204+
205+ - name : Run IAR C-STAT Analysis
206+ env :
207+ IAR_LMS_BEARER_TOKEN : ${{ secrets.IAR_LMS_BEARER_TOKEN }}
208+ run : |
209+ # CMake run post build to generate C-STAT SARIF report
210+ mkdir -p build
211+ cmake examples -B build -G Ninja -DBOARD=${{ matrix.board }} -DTOOLCHAIN=iar -DIAR_CSTAT=1 -DCMAKE_BUILD_TYPE=MinSizeRel
212+ cmake --build build
213+
214+ - name : Upload SARIF
215+ uses : github/codeql-action/upload-sarif@v4
216+ with :
217+ sarif_file : build/cstat_sarif
218+ category : IAR-CStat
219+
220+ - name : Upload artifact
221+ uses : actions/upload-artifact@v5
222+ with :
223+ name : iar-cstat-${{ matrix.board }}
224+ path : build/cstat_sarif
0 commit comments