File tree Expand file tree Collapse file tree 6 files changed +76
-4
lines changed
dynamic_configuration/src Expand file tree Collapse file tree 6 files changed +76
-4
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ jobs:
219219 uses : actions/checkout@v4
220220
221221 - name : Download Artifacts
222- uses : actions/download-artifact@v4
222+ uses : actions/download-artifact@v5
223223 with :
224224 path : cmake-build
225225 merge-multiple : true
Original file line number Diff line number Diff line change 2020 required : false
2121 default : false
2222 type : boolean
23+ analyze-pvs :
24+ required : false
25+ default : false
26+ type : boolean
2327 os :
2428 required : false
2529 type : string
6872 fi
6973 shell : bash
7074
75+ - name : PVS-Studio analyze
76+ if : ${{ inputs.analyze-pvs }}
77+ run : |
78+ wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt | sudo apt-key add -
79+ sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
80+ sudo apt update
81+ sudo apt install pvs-studio
82+ pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
83+ mkdir -p sarif-reports
84+ for build_dir in cmake-build/cmake-build-*; do
85+ BOARD=${build_dir#cmake-build/cmake-build-}
86+ pvs-studio-analyzer analyze -f ${build_dir}/compile_commands.json -j -o ${build_dir}/pvs-report.log --exclude-path hw/mcu/ --exclude-path lib/
87+ plog-converter -t sarif -o sarif-reports/${BOARD}.sarif ${build_dir}/pvs-report.log
88+ done
89+
90+ - name : PVS-Studio upload SARIF
91+ if : ${{ inputs.analyze-pvs }}
92+ uses : github/codeql-action/upload-sarif@v4
93+ with :
94+ sarif_file : sarif-reports/
95+ category : PVS-Studio
96+
7197 - name : Upload Artifacts for Hardware Testing
7298 if : ${{ inputs.upload-artifacts }}
7399 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 1+ name : Static Analysis
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ types : [opened, synchronize, reopened]
9+ jobs :
10+ # SonarQube:
11+ # name: Build and analyze
12+ # runs-on: ubuntu-latest
13+ # env:
14+ # BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
15+ # steps:
16+ # - uses: actions/checkout@v4
17+ # with:
18+ # fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
19+ # - name: Install Build Wrapper
20+ # uses: SonarSource/sonarqube-scan-action/install-build-wrapper@v6
21+ # - name: Run Build Wrapper
22+ # run: |
23+ # build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build --preset ${{ env.BOARD }} -t ${{ env.EXAMPLE }}
24+ # - name: SonarQube Scan
25+ # uses: SonarSource/sonarqube-scan-action@v6
26+ # env:
27+ # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
28+ # with:
29+ # args: >
30+ # --define "sonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json"
31+ PVS-Studio :
32+ uses : ./.github/workflows/build_util.yml
33+ strategy :
34+ fail-fast : false
35+ matrix :
36+ board :
37+ - ' stm32h743eval'
38+ with :
39+ build-system : ' cmake'
40+ toolchain : ' arm-gcc'
41+ build-args : ' -b${{ matrix.board }}'
42+ one-per-family : true
43+ analyze-pvs : true
Original file line number Diff line number Diff line change @@ -45,10 +45,11 @@ enum {
4545 DISK_BLOCK_SIZE = 512
4646};
4747
48+ static
4849#ifdef CFG_EXAMPLE_MSC_READONLY
4950const
5051#endif
51- static uint8_t msc_disk [DISK_BLOCK_NUM ][DISK_BLOCK_SIZE ] = {
52+ uint8_t msc_disk [DISK_BLOCK_NUM ][DISK_BLOCK_SIZE ] = {
5253 //------------- Block0: Boot Sector -------------//
5354 // byte_per_sector = DISK_BLOCK_SIZE; fat12_sector_num_16 = DISK_BLOCK_NUM;
5455 // sector_per_cluster = 1; reserved_sectors = 1;
Original file line number Diff line number Diff line change @@ -76,10 +76,11 @@ enum {
7676 DISK_BLOCK_SIZE = 512
7777};
7878
79+ static
7980#ifdef CFG_EXAMPLE_MSC_READONLY
8081const
8182#endif
82- static uint8_t msc_disk [DISK_BLOCK_NUM ][DISK_BLOCK_SIZE ] =
83+ uint8_t msc_disk [DISK_BLOCK_NUM ][DISK_BLOCK_SIZE ] =
8384{
8485 //------------- Block0: Boot Sector -------------//
8586 // byte_per_sector = DISK_BLOCK_SIZE; fat12_sector_num_16 = DISK_BLOCK_NUM;
Original file line number Diff line number Diff line change 4343 DISK_BLOCK_SIZE = 512
4444};
4545
46+ static
4647#ifdef CFG_EXAMPLE_MSC_READONLY
4748const
4849#endif
49- static uint8_t msc_disk [DISK_BLOCK_NUM ][DISK_BLOCK_SIZE ] =
50+ uint8_t msc_disk [DISK_BLOCK_NUM ][DISK_BLOCK_SIZE ] =
5051{
5152 //------------- Block0: Boot Sector -------------//
5253 // byte_per_sector = DISK_BLOCK_SIZE; fat12_sector_num_16 = DISK_BLOCK_NUM;
You can’t perform that action at this time.
0 commit comments