forked from opentibiabr/canary
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 1.97 KB
/
analysis-qodana.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: Analysis - Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# - name: Install Linux Dependencies
# run: >
# sudo apt-get update && sudo apt-get install ccache
# linux-headers-$(uname -r)
# - name: CCache
# uses: hendrikmuhs/ccache-action@main
# with:
# max-size: "1G"
# key: ccache-qodana
# - name: Restore artifacts and install vcpkg
# id: vcpkg-step
# run: |
# vcpkgCommitId=$(grep '.builtin-baseline' vcpkg.json | awk -F: '{print $2}' | tr -d '," ')
# echo "vcpkg commit ID: $vcpkgCommitId"
# echo "VCPKG_GIT_COMMIT_ID=$vcpkgCommitId" >> $GITHUB_ENV
# - name: Get vcpkg commit id from vcpkg.json
# uses: lukka/run-vcpkg@main
# with:
# vcpkgGitURL: "https://github.com/microsoft/vcpkg.git"
# vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT_ID }}
# - name: Get latest CMake and ninja
# uses: lukka/get-cmake@main
# - name: Run CMake
# uses: lukka/run-cmake@main
# with:
# configurePreset: linux-debug
# - name: Qodana Scan
# run: |
# docker run \
# -v $(pwd):/data/project/ \
# -v $(pwd):$(pwd) \
# -e QODANA_TOKEN="${{ secrets.QODANA_TOKEN }}" \
# jetbrains/qodana-clang:2024.1-eap \
# --compile-commands ./build/linux-debug/compile_commands.json
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,qodana-base.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}