Skip to content

Commit

Permalink
use static qt build
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanChain committed Jul 13, 2024
1 parent 66c3b31 commit f1f36b0
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@

name: Build

env:
CL: /MP # Multi-threaded compilation for MSVC

on: [workflow_dispatch, push]

jobs:
Build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
os: [windows-latest]
# os: [windows-latest, macos-latest]
include:
- os: windows-latest
os-caption: Windows
- os: macos-latest
os-caption: MacOS
os-caption: windows
# - os: macos-latest
# os-caption: macos

runs-on: ${{matrix.os}}
steps:
- name: Clone Project
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.7.2
run: |
cd ..
curl -L https://github.com/AllanChain/static-qt6/releases/download/v6.7.2-1/qt-6.7.2-static-${{matrix.os-caption}}.zip | 7z x -si -oqt6
- name: Configure MSVC (Windows)
if: contains(matrix.os, 'windows')
Expand All @@ -38,24 +35,24 @@ jobs:
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
cmake -DCMAKE_PREFIX_PATH=../qt6 -DCMAKE_BUILD_TYPE=MinSizeRel ..
- name: Build Project (Windows)
if: contains(matrix.os, 'windows')
run: |
cd build
msbuild sane-break.sln /property:Configuration=Release -maxcpucount
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')
run: |
cd build
make -j3
working-directory: build
run: make -j3

- name: Packing (Windows)
if: contains(matrix.os, 'windows')
working-directory: build
run: |
cd build
windeployqt --release --no-compiler-runtime --no-opengl-sw release
move release ..\
Expand Down

0 comments on commit f1f36b0

Please sign in to comment.