mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 16:08:23 +08:00
Add CodeQL, build everything for PVS-Studio
This commit is contained in:
parent
787e02181a
commit
d6bf25df67
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@ -216,9 +216,9 @@ jobs:
|
|||||||
COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||||
COVERITY_BUILD_COMMAND: ./unixbuild.sh --build
|
COVERITY_BUILD_COMMAND: ./unixbuild.sh --build
|
||||||
|
|
||||||
analyze_pvs_studio:
|
analyze_pvs_studio_and_codeql:
|
||||||
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
|
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
|
||||||
name: PVS-Studio Static Analysis
|
name: PVS-Studio and CodeQL Static Analysis
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install Qt
|
- name: Install Qt
|
||||||
@ -241,20 +241,28 @@ jobs:
|
|||||||
sudo apt install pvs-studio
|
sudo apt install pvs-studio
|
||||||
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
|
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
|
||||||
|
|
||||||
- name: Build
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: cpp
|
||||||
|
|
||||||
|
- name: Build everything using CMake
|
||||||
run: |
|
run: |
|
||||||
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On -B build UEFITool
|
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On -B build .
|
||||||
cmake --build build -j
|
cmake --build build -j
|
||||||
|
|
||||||
- name: Analyze
|
- name: Perform CodeQL analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
|
- name: Perform PVS-Studio analysis
|
||||||
run: |
|
run: |
|
||||||
pvs-studio-analyzer analyze -f build/compile_commands.json -j
|
pvs-studio-analyzer analyze -f build/compile_commands.json -j
|
||||||
|
|
||||||
- name: Convert report
|
- name: Convert PVS-Studio report
|
||||||
run: |
|
run: |
|
||||||
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
|
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
|
||||||
|
|
||||||
- name: Publish report
|
- name: Publish PVS-Studio report
|
||||||
uses: github/codeql-action/upload-sarif@v2
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
sarif_file: pvs-report.sarif
|
sarif_file: pvs-report.sarif
|
||||||
|
7
CMakeLists.txt
Normal file
7
CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
|
||||||
|
|
||||||
|
PROJECT(UEFITool_everything)
|
||||||
|
|
||||||
|
ADD_SUBDIRECTORY(UEFIExtract)
|
||||||
|
ADD_SUBDIRECTORY(UEFIFind)
|
||||||
|
ADD_SUBDIRECTORY(UEFITool)
|
@ -148,5 +148,5 @@ TARGET_LINK_LIBRARIES(UEFITool PRIVATE Qt6::Widgets)
|
|||||||
SET_TARGET_PROPERTIES(UEFITool PROPERTIES
|
SET_TARGET_PROPERTIES(UEFITool PROPERTIES
|
||||||
WIN32_EXECUTABLE ON
|
WIN32_EXECUTABLE ON
|
||||||
MACOSX_BUNDLE ON
|
MACOSX_BUNDLE ON
|
||||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/Info.plist"
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user