-
Notifications
You must be signed in to change notification settings - Fork 28
108 lines (93 loc) · 3.22 KB
/
mac_arm64-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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build PageEdit on macOS arm64
on:
push:
branches: [ master ]
tags-ignore:
- '**'
paths-ignore:
- 'docs/**'
- 'installer/win_installer_note.txt'
- 'ChangeLog.txt'
- 'COPYING.txt'
- 'version.xml'
- '.retired_travis.yml'
- '.retired_appveyor.yml'
- '**/**.md'
pull_request:
branches: [ master ]
tags-ignore:
- '**'
paths-ignore:
- 'docs/**'
- 'installer/win_installer_note.txt'
- 'ChangeLog.txt'
- 'COPYING.txt'
- 'version.xml'
- '.retired_travis.yml'
- '.retired_appveyor.yml'
- '**/**.md'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
MACOSX_DEPLOYMENT_TARGET: 11
DOWNLOADQT: https://github.com/kevinhendricks/BuildSigilOnMac/releases/download/for_sigil_1.0.0/Qt672_arm64.tar.xz
QT: Qt672
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Cache Custom Qt
uses: actions/cache@v4
with:
path: ${{runner.workspace}}/${{env.QT}}
key: ${{ runner.os }}-qtdeps-${{hashFiles('**/reset-mac_arm64-caches.txt')}}
- name: Install dependencies
shell: bash
working-directory: ${{runner.workspace}}
run: |
pwd
if [[ ! -d ${{runner.workspace}}/${{env.QT}} ]]; \
then curl -L -o qt6.tar.xz ${DOWNLOADQT} && tar xzf qt6.tar.xz; fi
if [[ -d ${{runner.workspace}}/${{env.QT}}/bin ]]; \
then cd ${{runner.workspace}}/${{env.QT}}/bin && \
echo [Paths] > qt.conf && echo Prefix=.. >> qt.conf; fi
export MYQTHOME=${{runner.workspace}}/${{env.QT}}
echo ${MYQTHOME}/bin >> $GITHUB_PATH
cd ${{runner.workspace}}
echo "Qt6_DIR=${{runner.workspace}}/${{env.QT}}/lib/cmake/Qt6" >> $GITHUB_ENV
echo "Qt6_Dir=${{runner.workspace}}/${{env.QT}}/lib/cmake/Qt6" >> $GITHUB_ENV
echo "QT_PLUGIN_PATH=${{runner.workspace}}/${{env.QT}}/plugins" >> $GITHUB_ENV
- name: Test environment
shell: bash
run: |
qmake -v
mkdir ${{runner.workspace}}/build
pwd
- name: Build PageEdit
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=11 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS=-Wno-inconsistent-missing-override \
-DCMAKE_PREFIX_PATH=${{runner.workspace}}/${{env.QT}}/lib/cmake \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/ $GITHUB_WORKSPACE
make -j$(getconf _NPROCESSORS_ONLN)
- name: Build Installer
working-directory: ${{runner.workspace}}/build
shell: bash
if: "contains(github.event.head_commit.message, '[deploy]')"
run: |
echo 'Deploying App'
make addframeworks
bash $GITHUB_WORKSPACE/ci_scripts/rpath_adjust.sh
cd ./bin
tar -cJf PageEdit_arm64.tar.xz PageEdit.app
- uses: actions/upload-artifact@v4
if: "contains(github.event.head_commit.message, '[deploy]')"
with:
name: pageedit-installer
path: ${{runner.workspace}}/build/bin/PageEdit_arm64.tar.xz
retention-days: 3