UEFITool/.github/workflows/main.yml

218 lines
6.9 KiB
YAML
Raw Normal View History

name: CI/CD
2020-11-22 04:20:27 -05:00
on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
build_mac:
name: Build on macOS
runs-on: macos-12
env:
HAS_QT: 1
2020-11-22 04:20:27 -05:00
steps:
- uses: actions/checkout@v2
- name: Get Qt
uses: actions/checkout@v2
with:
repository: LongSoft/qt-5.6.3-static-universal-macos-sdk12.3
path: qt
lfs: true
- name: Unpack Qt
shell: bash
working-directory: qt
run: sudo unzip -q qt-5.6.3-static-universal-macos-sdk12.3.zip -d/opt && echo "/opt/qt56sm/bin" >> $GITHUB_PATH
- name: Build everything
run: ./unixbuild.sh
2020-11-22 04:20:27 -05:00
- name: Upload to artifacts
uses: actions/upload-artifact@v2
with:
name: macOS builds
path: dist/*.zip
2020-11-22 04:20:27 -05:00
- name: Upload to releases
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true
build_linux:
name: Build on Linux
runs-on: ubuntu-20.04
env:
HAS_QT: 1
2020-11-22 04:20:27 -05:00
steps:
- uses: actions/checkout@v2
2020-11-22 04:20:27 -05:00
- name: Get Qt
run: sudo apt-get install -qq qt5-default qt5-qmake qtbase5-dev-tools cmake
- name: Build everything
run: ./unixbuild.sh
2020-11-22 04:20:27 -05:00
- name: Upload to artifacts
uses: actions/upload-artifact@v2
with:
name: Linux builds
path: dist/*.zip
2020-11-22 04:20:27 -05:00
- name: Upload to releases
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true
build_linux_meson:
name: Build on Linux with Meson
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Deps
run: sudo apt-get install -qq zlib1g-dev meson qt5-default
- name: Configure build
run: mkdir build-meson && meson ./build-meson
- name: Build everything
run: ninja -C build-meson
build_win:
2020-11-22 04:20:27 -05:00
name: Build on Windows
runs-on: windows-2019
2020-11-22 04:20:27 -05:00
steps:
- uses: actions/checkout@v2
- name: Get Qt
uses: actions/checkout@v2
with:
repository: LongSoft/qt-5.6.3-static-x86-msvc2017
path: qt
lfs: true
2020-11-22 04:20:27 -05:00
- name: Unpack Qt
shell: bash
working-directory: qt
run: 7z x qt-5.6.3-static-x86-msvc2017.7z -o../..
2020-11-22 04:20:27 -05:00
- name: Create dist directory
shell: bash
run: mkdir dist
- name: Create UEFIExtract build directory
run: cmake -E make_directory ${{runner.workspace}}/build/UEFIExtract
2020-11-22 04:20:27 -05:00
- name: Configure UEFIExtract
shell: bash
working-directory: ${{runner.workspace}}/build/UEFIExtract
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" -DU_STATIC_RT=YES ../../UEFITool/UEFIExtract/
2020-11-22 04:20:27 -05:00
- name: Build UEFIExtract
working-directory: ${{runner.workspace}}/build/UEFIExtract
shell: bash
run: cmake --build . --config Release
2020-11-22 04:20:27 -05:00
- 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
2020-11-22 04:20:27 -05:00
- name: Configure UEFIFind
shell: bash
working-directory: ${{runner.workspace}}/build/UEFIFind
run: cmake -G "Visual Studio 16 2019" -T "v141_xp" -DU_STATIC_RT=YES ../../UEFITool/UEFIFind/
2020-11-22 04:20:27 -05:00
- name: Build UEFIFind
working-directory: ${{runner.workspace}}/build/UEFIFind
shell: bash
run: cmake --build . --config Release
2020-11-22 04:20:27 -05:00
- 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
- name: Create UEFITool build directory
run: cmake -E make_directory ${{runner.workspace}}/build/UEFITool
2020-11-22 04:20:27 -05:00
- name: Configure UEFITool
shell: bash
working-directory: ${{runner.workspace}}/build/UEFITool
run: ../../qt-5.6.3-static-x86-msvc2017/bin/qmake.exe ../../UEFITool/UEFITool/
2020-11-22 04:20:27 -05:00
- name: Build UEFITool
working-directory: ${{runner.workspace}}/build/UEFITool
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
2020-11-22 04:20:27 -05:00
nmake release
2020-11-22 04:20:27 -05:00
- name: Archive UEFITool
working-directory: ${{runner.workspace}}/build/UEFITool/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/UEFITool_NE_${UEFITOOL_VER}_win32.zip UEFITool.exe
- name: Upload to artifacts
uses: actions/upload-artifact@v2
with:
name: Windows builds
path: dist/*.zip
- name: Upload to releases
2020-11-22 04:20:27 -05:00
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
tag: ${{ github.ref }}
file_glob: true
2020-11-27 04:17:33 -05:00
analyze_coverity:
env:
PROJECT_TYPE: TOOL
JOB_TYPE: COVERITY
HAS_QT: 1
2020-12-11 03:54:38 -05:00
if: github.repository_owner == 'LongSoft' && github.event_name != 'pull_request'
name: Coverity
runs-on: ubuntu-latest
2020-11-27 04:17:33 -05:00
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.2.4'
host: 'linux'
target: 'desktop'
2020-11-27 04:17:33 -05:00
- name: CI Bootstrap
run: |
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
- uses: actions/checkout@v2
- run: ./unixbuild.sh --configure
2020-11-27 04:17:33 -05:00
- name: Run Coverity
run: |
src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/coverity/covstrap-linux.sh) && eval "$src" || exit 1
2020-11-27 04:17:33 -05:00
env:
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
COVERITY_SCAN_EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
COVERITY_BUILD_COMMAND: ./unixbuild.sh --build