Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imp: use qodana GHA #2812

Merged
merged 7 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 42 additions & 35 deletions .github/workflows/analysis-qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,48 @@ jobs:
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: 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: Get latest CMake and ninja
uses: lukka/get-cmake@main
# - 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: Run CMake
uses: lukka/run-cmake@main
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
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
args: --compile-commands,./build/linux-debug/compile_commands.json,--baseline,qodana-base.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"description": "Build Debug Mode",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"DEBUG_LOG": "ON",
"SPEED_UP_BUILD_UNITY": "OFF"
}
Expand Down
Loading