-
Notifications
You must be signed in to change notification settings - Fork 21
90 lines (76 loc) · 2.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build
env:
# Multi-threaded compilation for MSVC
CL: /MP
on: [workflow_dispatch, push]
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
version: [6.5.1]
include:
- os: windows-latest
os-caption: Windows
- os: ubuntu-latest
os-caption: Ubuntu
# - os: macos-latest
# os-caption: MacOS
runs-on: ${{matrix.os}}
steps:
- name: Clone Project
uses: actions/checkout@v4
- name: Update packages (Ubuntu)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install make gcc g++ cmake git
- name: Install Qt (Others)
uses: jurplel/install-qt-action@v3
with:
version: ${{matrix.version}}
modules: qtcharts
- name: Configure MSVC (Windows)
if: contains(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
- name: Make Project
run: |
mkdir build
cd build
cmake ..
- name: Build Project (Windows)
if: contains(matrix.os, 'windows')
run: |
cd build
msbuild maskromtool.sln /property:Configuration=Release -maxcpucount
- name: Build Project (Others)
if: contains(matrix.os, 'windows') != true
run: |
cd build
make -j3
- name: Packing (Ubuntu)
if: contains(matrix.os, 'ubuntu')
run: |
mkdir release
cp ./build/maskromtool ./release/
- name: Packing (Windows)
if: contains(matrix.os, 'windows')
run: |
mkdir release
cd build
windeployqt --no-compiler-runtime Release\maskromtool.exe
move Release\* ..\release\
- name: Packing (MacOS)
if: contains(matrix.os, 'macos')
run: |
mkdir release
cp -rf build/maskromtool.app release/
macdeployqt release/maskromtool.app -sign-for-notarization="Developer ID Application: Travis Goodspeed"
hdiutil create -volname "maskromtool" -srcfolder "./release/maskromtool.app" -ov -format UDZO "./release/maskromtool.dmg"
rm -rf "./release/maskromtool.app"
- name: Create Artifact
uses: actions/upload-artifact@v4
with:
name: "maskromtool (${{matrix.os-caption}})"
path: ./release/