Skip to content

Commit 6cc445e

Browse files
committed
download ninja binary, apt seems take too long ~ 1 min
also upload sarif as artifacts
1 parent 5e3e243 commit 6cc445e

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/actions/get_deps/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ runs:
1919
- name: Linux dependencies
2020
if: runner.os == 'Linux'
2121
run: |
22-
sudo apt install -y ninja-build
22+
NINJA_URL=https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-linux.zip
23+
wget $NINJA_URL -O ninja-linux.zip
24+
unzip ninja-linux.zip -d ninja-bin
25+
echo >> $GITHUB_PATH "${{ github.workspace }}/ninja-bin"
2326
shell: bash
2427

2528
- name: Get Dependencies

.github/workflows/static_analysis.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
with:
5151
category: CodeQL
5252
upload: always
53-
id: step1
53+
id: analyze
5454

5555
# - name: Filter out unwanted errors and warnings
5656
# uses: advanced-security/filter-sarif@v1
@@ -71,15 +71,21 @@ jobs:
7171
# -**/third*party/**
7272
# -**/3rd*party/**
7373
# -**/external/**
74-
# input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
75-
# output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
74+
# input: ${{ steps.analyze.outputs.sarif-output }}/cpp.sarif
75+
# output: ${{ steps.analyze.outputs.sarif-output }}/cpp.sarif
7676
#
7777
# - name: Upload SARIF
7878
# uses: github/codeql-action/upload-sarif@v4
7979
# with:
80-
# sarif_file: ${{ steps.step1.outputs.sarif-output }}
80+
# sarif_file: ${{ steps.analyze.outputs.sarif-output }}
8181
# category: CodeQL
8282

83+
- name: Upload artifact
84+
uses: actions/upload-artifact@v5
85+
with:
86+
name: codeql-${{ matrix.board }}
87+
path: ${{ steps.analyze.outputs.sarif-output }}
88+
8389
PVS-Studio:
8490
runs-on: ubuntu-latest
8591
strategy:
@@ -114,14 +120,21 @@ jobs:
114120
cmake examples -B build -G Ninja -DBOARD=${{ matrix.board }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=MinSizeRel
115121
cmake --build build
116122
pvs-studio-analyzer analyze -f build/compile_commands.json -j --exclude-path hw/mcu/ --exclude-path lib/
117-
plog-converter -t sarif -o pvs.sarif PVS-Studio.log
123+
plog-converter -t sarif -o pvs-${{ matrix.board }}.sarif PVS-Studio.log
118124
119125
- name: Upload SARIF
120126
uses: github/codeql-action/upload-sarif@v4
121127
with:
122-
sarif_file: pvs.sarif
128+
sarif_file: pvs-${{ matrix.board }}.sarif
123129
category: PVS-Studio
124130

131+
- name: Upload artifact
132+
uses: actions/upload-artifact@v5
133+
with:
134+
name: pvs-${{ matrix.board }}
135+
path: pvs-${{ matrix.board }}.sarif
136+
137+
125138
# SonarQube:
126139
# name: Build and analyze
127140
# runs-on: ubuntu-latest

0 commit comments

Comments
 (0)