2022-08-28 20:08:40 +08:00
|
|
|
name: CI/CD
|
2020-11-22 17:20:27 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
2023-02-13 07:04:40 +08:00
|
|
|
# Release builds
|
|
|
|
build_release_macos:
|
2023-04-24 05:17:00 +08:00
|
|
|
name: Release build (macOS universal, static Qt 6.5.0)
|
2022-08-28 00:25:26 +08:00
|
|
|
runs-on: macos-12
|
2020-11-22 17:20:27 +08:00
|
|
|
steps:
|
2023-01-29 14:02:15 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-28 20:08:40 +08:00
|
|
|
- name: Get Qt
|
2023-01-29 14:02:15 +08:00
|
|
|
uses: actions/checkout@v3
|
2022-08-28 20:08:40 +08:00
|
|
|
with:
|
2023-04-24 05:17:00 +08:00
|
|
|
repository: LongSoft/qt-6-static-universal-macos
|
2022-08-28 20:08:40 +08:00
|
|
|
path: qt
|
|
|
|
lfs: true
|
|
|
|
- name: Unpack Qt
|
|
|
|
shell: bash
|
|
|
|
working-directory: qt
|
2023-04-24 05:17:00 +08:00
|
|
|
run: sudo 7z x qt-6.5.0-static-universal-macos.7z -o/opt
|
2023-02-13 02:37:42 +08:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
- name: Configure everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2023-04-24 06:27:43 +08:00
|
|
|
run: cmake -DCMAKE_PREFIX_PATH="/opt/qt-6.5.0-static-universal-macos" -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" ../UEFITool
|
2022-08-28 20:08:40 +08:00
|
|
|
- name: Build everything
|
2023-02-13 02:37:42 +08:00
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . --config Release
|
|
|
|
- name: Create dist directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/UEFITool/dist
|
|
|
|
- name: Archive everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
UEFITOOL_VER=$(cat ../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
2023-02-13 07:04:40 +08:00
|
|
|
zip -qryj ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_universal_mac.zip ./UEFIExtract/UEFIExtract
|
|
|
|
zip -qryj ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_universal_mac.zip ./UEFIFind/UEFIFind
|
2023-02-15 00:15:25 +08:00
|
|
|
cd UEFITool
|
|
|
|
zip -qry ../../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_universal_mac.zip ./UEFITool.app
|
2020-11-22 17:20:27 +08:00
|
|
|
- name: Upload to artifacts
|
2023-01-29 14:02:15 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
|
|
|
name: macOS builds
|
|
|
|
path: dist/*.zip
|
|
|
|
- name: Upload to releases
|
|
|
|
if: github.event_name == 'release'
|
2023-02-01 09:45:29 +08:00
|
|
|
uses: svenstaro/upload-release-action@v2
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: dist/*.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
file_glob: true
|
|
|
|
|
2023-02-13 07:04:40 +08:00
|
|
|
build_release_linux:
|
2023-04-24 05:17:00 +08:00
|
|
|
name: Release build (Linux x64, shared Qt 6)
|
2023-02-13 07:04:40 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2020-11-22 17:20:27 +08:00
|
|
|
steps:
|
2023-01-29 14:02:15 +08:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-22 17:20:27 +08:00
|
|
|
- name: Get Qt
|
2023-02-13 07:04:40 +08:00
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt-get install -qq zip cmake libgl1-mesa-dev qt6-base-dev
|
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
- name: Configure everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
run: cmake ../UEFITool
|
2022-08-28 20:08:40 +08:00
|
|
|
- name: Build everything
|
2023-02-13 07:04:40 +08:00
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . --config Release
|
|
|
|
- name: Create dist directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/UEFITool/dist
|
|
|
|
- name: Archive everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
UEFITOOL_VER=$(cat ../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
|
|
|
zip -qryj ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_x64_linux.zip ./UEFIExtract/uefiextract
|
|
|
|
zip -qryj ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_x64_linux.zip ./UEFIFind/uefifind
|
|
|
|
zip -qryj ../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_x64_linux.zip ./UEFITool/uefitool
|
2020-11-22 17:20:27 +08:00
|
|
|
- name: Upload to artifacts
|
2023-01-29 14:02:15 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
|
|
|
name: Linux builds
|
|
|
|
path: dist/*.zip
|
|
|
|
- name: Upload to releases
|
|
|
|
if: github.event_name == 'release'
|
2023-02-01 09:45:29 +08:00
|
|
|
uses: svenstaro/upload-release-action@v2
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: dist/*.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
file_glob: true
|
|
|
|
|
2023-02-13 07:04:40 +08:00
|
|
|
build_release_freebsd:
|
2023-04-24 05:17:00 +08:00
|
|
|
name: Release build (FreeBSD x64, shared Qt 6)
|
2022-10-03 19:36:51 +08:00
|
|
|
runs-on: macos-12
|
|
|
|
steps:
|
2023-01-29 14:02:15 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-03 19:36:51 +08:00
|
|
|
- name: Build on FreeBSD inside macOS VM
|
|
|
|
id: test
|
2023-11-03 03:59:28 +08:00
|
|
|
uses: cross-platform-actions/action@v0.21.0
|
2022-10-03 19:36:51 +08:00
|
|
|
with:
|
2023-11-03 03:59:28 +08:00
|
|
|
operating_system: freebsd
|
|
|
|
version: '13.1'
|
|
|
|
shell: sh
|
2022-10-03 19:36:51 +08:00
|
|
|
run: |
|
2023-11-03 03:59:28 +08:00
|
|
|
sudo pkg install -y zip cmake qt6-base
|
2023-02-13 07:04:40 +08:00
|
|
|
mkdir dist
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
cmake --build . --config Release
|
|
|
|
UEFITOOL_VER=$(cat ../version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
|
|
|
zip -qryj ../dist/UEFIExtract_NE_${UEFITOOL_VER}_x64_freebsd.zip ./UEFIExtract/uefiextract
|
|
|
|
zip -qryj ../dist/UEFIFind_NE_${UEFITOOL_VER}_x64_freebsd.zip ./UEFIFind/uefifind
|
|
|
|
zip -qryj ../dist/UEFITool_NE_${UEFITOOL_VER}_x64_freebsd.zip ./UEFITool/uefitool
|
2022-10-03 19:36:51 +08:00
|
|
|
- name: Upload to artifacts
|
2023-01-29 14:02:15 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-10-03 19:36:51 +08:00
|
|
|
with:
|
|
|
|
name: FreeBSD builds
|
|
|
|
path: dist/*.zip
|
|
|
|
- name: Upload to releases
|
|
|
|
if: github.event_name == 'release'
|
2023-02-01 09:45:29 +08:00
|
|
|
uses: svenstaro/upload-release-action@v2
|
2022-10-03 19:36:51 +08:00
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: dist/*.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
file_glob: true
|
|
|
|
|
2023-02-13 07:04:40 +08:00
|
|
|
build_release_windows_32:
|
|
|
|
name: Release build (Win32, static Qt 5.6.3)
|
2022-08-25 05:02:08 +08:00
|
|
|
runs-on: windows-2019
|
2020-11-22 17:20:27 +08:00
|
|
|
steps:
|
2023-02-12 05:58:44 +08:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get Qt 5.6.3
|
2023-01-29 14:02:15 +08:00
|
|
|
uses: actions/checkout@v3
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
|
|
|
repository: LongSoft/qt-5.6.3-static-x86-msvc2017
|
2023-02-12 05:58:44 +08:00
|
|
|
path: qt5
|
2020-11-22 17:20:27 +08:00
|
|
|
lfs: true
|
2023-02-12 05:58:44 +08:00
|
|
|
- name: Unpack Qt 5.6.3
|
2020-11-22 17:20:27 +08:00
|
|
|
shell: bash
|
2023-02-12 05:58:44 +08:00
|
|
|
working-directory: qt5
|
2020-11-22 17:20:27 +08:00
|
|
|
run: 7z x qt-5.6.3-static-x86-msvc2017.7z -o../..
|
|
|
|
- name: Create dist directory
|
|
|
|
shell: bash
|
|
|
|
run: mkdir dist
|
|
|
|
- name: Create UEFIExtract build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build/UEFIExtract
|
|
|
|
- name: Configure UEFIExtract
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFIExtract
|
2023-06-20 09:01:25 +08:00
|
|
|
run: cmake -G "Visual Studio 16 2019" -A Win32 -T "v141_xp" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ../../UEFITool/UEFIExtract/
|
2020-11-22 17:20:27 +08:00
|
|
|
- name: Build UEFIExtract
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFIExtract
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . --config Release
|
|
|
|
- name: Archive UEFIExtract
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFIExtract/Release
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
|
|
|
7z a ../../../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_win32.zip UEFIExtract.exe
|
|
|
|
- name: Create UEFIFind build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build/UEFIFind
|
|
|
|
- name: Configure UEFIFind
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFIFind
|
2023-02-12 05:58:44 +08:00
|
|
|
shell: bash
|
2023-06-20 09:01:25 +08:00
|
|
|
run: cmake -G "Visual Studio 16 2019" -A Win32 -T "v141_xp" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" ../../UEFITool/UEFIFind/
|
2020-11-22 17:20:27 +08:00
|
|
|
- name: Build UEFIFind
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFIFind
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . --config Release
|
|
|
|
- name: Archive UEFIFind
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFIFind/Release
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
|
|
|
7z a ../../../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_win32.zip UEFIFind.exe
|
2023-02-14 08:56:53 +08:00
|
|
|
- name: Create UEFITool build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool
|
|
|
|
- name: Configure UEFITool
|
2020-11-22 17:20:27 +08:00
|
|
|
shell: bash
|
2023-02-14 08:56:53 +08:00
|
|
|
working-directory: ${{runner.workspace}}/build/UEFITool
|
2023-02-06 14:12:54 +08:00
|
|
|
run: ../../qt-5.6.3-static-x86-msvc2017/bin/qmake.exe -tp vc ../../UEFITool/UEFITool/
|
2023-02-14 08:56:53 +08:00
|
|
|
- name: Build UEFITool
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFITool
|
2020-11-22 17:20:27 +08:00
|
|
|
shell: cmd
|
|
|
|
run: |
|
2022-08-25 05:02:08 +08:00
|
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
|
2023-02-06 14:12:54 +08:00
|
|
|
msbuild -t:Rebuild -p:PlatformToolset=v141_xp;Configuration=Release
|
2023-02-14 08:56:53 +08:00
|
|
|
- name: Archive UEFITool
|
|
|
|
working-directory: ${{runner.workspace}}/build/UEFITool/release
|
2020-11-22 17:20:27 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
UEFITOOL_VER=$(cat ../../../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
|
|
|
7z a ../../../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_win32.zip UEFITool.exe
|
|
|
|
- name: Upload to artifacts
|
2023-01-29 14:02:15 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
2023-02-12 05:58:44 +08:00
|
|
|
name: Windows 32-bit builds
|
2020-11-22 17:20:27 +08:00
|
|
|
path: dist/*.zip
|
2022-08-28 20:08:40 +08:00
|
|
|
- name: Upload to releases
|
2020-11-22 17:20:27 +08:00
|
|
|
if: github.event_name == 'release'
|
2023-02-01 09:45:29 +08:00
|
|
|
uses: svenstaro/upload-release-action@v2
|
2020-11-22 17:20:27 +08:00
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: dist/*.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
file_glob: true
|
2020-11-27 17:17:33 +08:00
|
|
|
|
2023-02-13 07:04:40 +08:00
|
|
|
build_release_windows_64:
|
2023-04-23 13:22:16 +08:00
|
|
|
name: Release build (Win64, static Qt 6.5.0)
|
2023-02-13 07:04:40 +08:00
|
|
|
runs-on: windows-2022
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-04-23 13:22:16 +08:00
|
|
|
- name: Get Qt 6.5.0
|
2023-02-13 07:04:40 +08:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2023-04-23 13:22:16 +08:00
|
|
|
repository: LongSoft/qt-6-static-x64-msvc2022
|
2023-02-13 07:04:40 +08:00
|
|
|
path: qt6
|
|
|
|
lfs: true
|
2023-04-23 13:22:16 +08:00
|
|
|
- name: Unpack Qt 6.5.0
|
2023-02-13 07:04:40 +08:00
|
|
|
shell: bash
|
|
|
|
working-directory: qt6
|
2023-04-23 13:22:16 +08:00
|
|
|
run: 7z x qt-6.5.0-static-x64-msvc2022.7z -o../..
|
2023-02-13 07:04:40 +08:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
- name: Configure everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: cmd
|
2023-06-20 09:01:25 +08:00
|
|
|
run: cmake -DCMAKE_PREFIX_PATH="D:\a\UEFITool\qt-6.5.0-static-x64-msvc2022" -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded" -A x64 ../UEFITool
|
2023-02-13 07:04:40 +08:00
|
|
|
- name: Build everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: cmake --build . --config Release
|
|
|
|
- name: Create dist directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/UEFITool/dist
|
|
|
|
- name: Archive everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
UEFITOOL_VER=$(cat ../UEFITool/version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/') ; \
|
|
|
|
7z a ../UEFITool/dist/UEFIExtract_NE_${UEFITOOL_VER}_win64.zip ./UEFIExtract/Release/UEFIExtract.exe
|
|
|
|
7z a ../UEFITool/dist/UEFIFind_NE_${UEFITOOL_VER}_win64.zip ./UEFIFind/Release/UEFIFind.exe
|
|
|
|
7z a ../UEFITool/dist/UEFITool_NE_${UEFITOOL_VER}_win64.zip ./UEFITool/Release/UEFITool.exe
|
|
|
|
- name: Upload to artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: Windows 64-bit builds
|
|
|
|
path: dist/*.zip
|
|
|
|
- name: Upload to releases
|
|
|
|
if: github.event_name == 'release'
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: dist/*.zip
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
file_glob: true
|
|
|
|
|
|
|
|
# Build Tests
|
|
|
|
build_test_linux_meson:
|
2023-04-24 05:17:00 +08:00
|
|
|
name: Meson build system test (shared Qt 5)
|
2023-04-23 17:37:12 +08:00
|
|
|
runs-on: ubuntu-22.04
|
2023-02-13 07:04:40 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get Deps
|
|
|
|
run: |
|
|
|
|
sudo apt update
|
|
|
|
sudo apt-get install -qq cmake meson zlib1g-dev qtbase5-dev
|
|
|
|
- name: Configure build
|
|
|
|
run: mkdir build-meson && meson ./build-meson
|
|
|
|
- name: Build everything
|
|
|
|
run: ninja -C build-meson
|
|
|
|
|
|
|
|
build_test_windows_mingw:
|
2023-04-24 05:17:00 +08:00
|
|
|
name: MinGW compiler test (shared Qt 6.5.0)
|
2022-09-27 23:36:27 +08:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2023-01-29 14:02:15 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-27 23:36:27 +08:00
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v3
|
|
|
|
with:
|
2023-04-23 17:13:18 +08:00
|
|
|
version: '6.5.0'
|
2022-09-27 23:36:27 +08:00
|
|
|
host: 'windows'
|
|
|
|
target: 'desktop'
|
|
|
|
arch: 'win64_mingw'
|
2023-02-13 07:04:40 +08:00
|
|
|
- name: Build everything
|
2022-09-27 23:36:27 +08:00
|
|
|
run: |
|
|
|
|
cmake -G "MinGW Makefiles" -B build .
|
2023-04-23 17:13:18 +08:00
|
|
|
cmake --build build --parallel
|
2023-02-13 07:04:40 +08:00
|
|
|
|
|
|
|
# Static Analysis
|
|
|
|
build_analyze_linux_coverity:
|
2020-11-27 17:17:33 +08:00
|
|
|
env:
|
|
|
|
PROJECT_TYPE: TOOL
|
|
|
|
JOB_TYPE: COVERITY
|
2020-12-11 16:54:38 +08:00
|
|
|
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
|
2023-04-24 05:17:00 +08:00
|
|
|
name: Coverity Static Analysis (shared Qt 6.5.0)
|
2023-04-24 01:26:47 +08:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-27 17:17:33 +08:00
|
|
|
steps:
|
2023-02-13 07:04:40 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-08-28 20:08:40 +08:00
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v3
|
|
|
|
with:
|
2023-04-23 17:13:18 +08:00
|
|
|
version: '6.5.0'
|
2022-08-28 20:08:40 +08:00
|
|
|
host: 'linux'
|
|
|
|
target: 'desktop'
|
2023-02-13 07:04:40 +08:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
- name: Configure everything
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
|
|
|
run: cmake ../UEFITool
|
2020-11-27 17:17:33 +08:00
|
|
|
- name: Run Coverity
|
2023-02-13 07:04:40 +08:00
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-27 17:17:33 +08:00
|
|
|
run: |
|
2022-08-28 20:08:40 +08:00
|
|
|
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/coverity/covstrap-linux.sh) && eval "$src" || exit 1
|
2020-11-27 17:17:33 +08:00
|
|
|
env:
|
|
|
|
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
|
|
|
COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
2023-04-24 01:23:50 +08:00
|
|
|
COVERITY_BUILD_COMMAND: cmake --build .
|
2022-09-03 04:09:47 +08:00
|
|
|
|
2023-02-13 07:04:40 +08:00
|
|
|
build_analyze_linux_pvs_studio_and_codeql:
|
2022-09-03 04:09:47 +08:00
|
|
|
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
|
2023-04-24 05:17:00 +08:00
|
|
|
name: PVS-Studio and CodeQL Static Analysis (shared Qt 6.5.0)
|
2023-04-24 01:26:47 +08:00
|
|
|
runs-on: ubuntu-latest
|
2022-09-03 04:09:47 +08:00
|
|
|
steps:
|
2023-02-13 07:04:40 +08:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-03 04:09:47 +08:00
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v3
|
|
|
|
with:
|
2023-04-23 17:13:18 +08:00
|
|
|
version: '6.5.0'
|
2022-09-03 04:09:47 +08:00
|
|
|
host: 'linux'
|
|
|
|
target: 'desktop'
|
|
|
|
- name: Install PVS-Studio
|
|
|
|
run: |
|
|
|
|
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt \
|
|
|
|
| sudo apt-key add -
|
|
|
|
sudo wget -O /etc/apt/sources.list.d/viva64.list \
|
|
|
|
https://files.pvs-studio.com/etc/viva64.list
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install pvs-studio
|
|
|
|
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
|
2022-09-03 04:52:16 +08:00
|
|
|
- name: Initialize CodeQL
|
|
|
|
uses: github/codeql-action/init@v2
|
|
|
|
with:
|
|
|
|
languages: cpp
|
2023-02-13 07:04:40 +08:00
|
|
|
- name: Build everything
|
2022-09-03 04:09:47 +08:00
|
|
|
run: |
|
2022-09-03 04:52:16 +08:00
|
|
|
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On -B build .
|
2023-04-24 01:23:50 +08:00
|
|
|
cmake --build build
|
2022-09-03 04:52:16 +08:00
|
|
|
- name: Perform CodeQL analysis
|
|
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
- name: Perform PVS-Studio analysis
|
2022-09-03 04:09:47 +08:00
|
|
|
run: |
|
|
|
|
pvs-studio-analyzer analyze -f build/compile_commands.json -j
|
2022-09-03 04:52:16 +08:00
|
|
|
- name: Convert PVS-Studio report
|
2022-09-03 04:09:47 +08:00
|
|
|
run: |
|
|
|
|
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
|
2022-09-27 23:36:27 +08:00
|
|
|
- name: Publish PVS-Studio report
|
2022-09-03 04:09:47 +08:00
|
|
|
uses: github/codeql-action/upload-sarif@v2
|
|
|
|
with:
|
|
|
|
sarif_file: pvs-report.sarif
|
2022-09-03 05:24:23 +08:00
|
|
|
category: PVS-Studio
|
|
|
|
|
2023-02-13 07:04:40 +08:00
|
|
|
build_analyze_linux_sonarcloud:
|
2022-09-03 05:24:23 +08:00
|
|
|
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
|
2023-04-24 05:17:00 +08:00
|
|
|
name: SonarCloud Static Analysis (shared Qt 6.5.0)
|
2022-09-03 05:24:23 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
|
|
|
|
steps:
|
2023-02-13 07:04:40 +08:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
2022-09-03 05:24:23 +08:00
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v3
|
|
|
|
with:
|
2023-04-23 17:13:18 +08:00
|
|
|
version: '6.5.0'
|
2022-09-03 05:24:23 +08:00
|
|
|
host: 'linux'
|
|
|
|
target: 'desktop'
|
2023-10-26 23:39:55 +08:00
|
|
|
- name: Install JDK 17
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: 'zulu'
|
|
|
|
java-version: 17
|
2023-10-26 23:28:56 +08:00
|
|
|
- name: Install sonar-scanner and build-wrapper
|
2023-10-26 23:51:41 +08:00
|
|
|
uses: SonarSource/sonarcloud-github-c-cpp@v2
|
2022-09-03 05:24:23 +08:00
|
|
|
- name: Run build-wrapper
|
|
|
|
run: |
|
|
|
|
cmake -B build .
|
2023-04-24 01:23:50 +08:00
|
|
|
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build
|
2022-09-03 05:24:23 +08:00
|
|
|
- name: Run sonar-scanner
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
|
|
run: |
|
2023-10-26 23:28:56 +08:00
|
|
|
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
|