Skip to content

use static qt build #20

use static qt build

use static qt build #20

Workflow file for this run

# Modified from (GPL):
# https://github.com/travisgoodspeed/maskromtool/blob/master/.github/workflows/build.yml
name: Build
on: [workflow_dispatch, push]
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
include:
- os: windows-latest
os-caption: windows
- os: macos-latest
os-caption: macos
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install Qt
run: |
cd ..
curl -LO https://github.com/AllanChain/static-qt6/releases/download/v6.7.2-2/qt-6.7.2-static-${{matrix.os-caption}}.zip
7z x qt-6.7.2-static-${{matrix.os-caption}}.zip
- name: Configure MSVC (Windows)
if: contains(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
- name: Make Project
env:
CMAKE_TOOLCHAIN_FILE: ../../qt6_static_64/lib/cmake/Qt6/qt.toolchain.cmake
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ..
- name: Build Project (Windows)
if: contains(matrix.os, 'windows')
working-directory: build
env:
CL: /MP # Build with multiple processes
run: msbuild sane-break.sln /property:Configuration=Release -maxcpucount
- name: Build Project (macOS)
if: contains(matrix.os, 'macos')
working-directory: build
run: make -j3
- name: Packing (Windows)
if: contains(matrix.os, 'windows')
working-directory: build
run: |
move Release ..
- name: Packing (macOs)
if: contains(matrix.os, 'macos')
run: |
mkdir release
hdiutil create -volname "Sane Break" -srcfolder build/sane-break.app -ov release/sane-break.dmg
- name: Create Artifact
uses: actions/upload-artifact@v4
with:
name: "sane-break (${{matrix.os-caption}})"
path: ./release/*