9
9
# So it doesn't make much sense to have different build types other than 'debug' here.
10
10
# The release dmg is built using aqtinstall instead (the job below this one).
11
11
build-homebrew :
12
- name : Build (${{ matrix.build-type }}, homebrew (qt${{ matrix.qt-version-major }} ), ${{ matrix.os }})
12
+ name : Build (${{ matrix.build-type }}, homebrew (qt6 ), ${{ matrix.os }})
13
13
runs-on : ${{ matrix.os }}
14
14
strategy :
15
15
fail-fast : false
16
16
matrix :
17
17
include :
18
18
- os : macos-13
19
- qt-version-major : 5
20
- build-type : debug
21
-
22
- - os : macos-13
23
- qt-version-major : 6
24
19
build-type : debug
25
20
steps :
26
21
- name : Checkout code
27
22
uses : actions/checkout@v4
28
23
with :
29
24
submodules : recursive
30
25
31
- - name : Install Qt ${{ matrix.qt-version-major }} (homebrew)
32
- run : |
33
- brew install ninja qt@${{ matrix.qt-version-major }}
34
-
35
- - name : Configure Qt ${{ matrix.qt-version-major }} (homebrew)
36
- if : matrix.qt-version-major == 5
26
+ - name : Install Qt 6 (homebrew)
37
27
run : |
38
- brew link qt@${{ matrix.qt-version-major }}
39
- cat << EOF
40
- LDFLAGS="-L/usr/local/opt/qt@${{ matrix.qt-version-major }}/lib"
41
- export CPPFLAGS="-I/usr/local/opt/qt@${{ matrix.qt-version-major }}/include"
42
- export PATH="/usr/local/opt/qt@${{ matrix.qt-version-major }}/bin:$PATH"
43
- EOF >> ~/.bashrc
28
+ brew install ninja qt@6
44
29
45
30
- name : Setup CLang problem matcher
46
31
# Technically, this action only supports GCC, but it seems to work well for Clang too.
@@ -55,13 +40,10 @@ jobs:
55
40
cmake . --warn-uninitialized --warn-unused-vars \
56
41
-G Ninja -B build \
57
42
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
58
- -DCMAKE_PREFIX_PATH="$(brew --prefix qt@${{ matrix.qt-version-major }} )" \
43
+ -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6 )" \
59
44
-DPRO_VERSION=OFF
60
45
cmake --build build
61
46
62
- # Build the dmg disk image using the official Qt 5 release downloaded by aqtinstall.
63
- # This is also done for Linux and Windows, just to make sure we use the exact same Qt version across all three OSes.
64
- #
65
47
# NOTE: This job uses a fixed Qt version (set in the 'qt-version' key below)!
66
48
# So, remember to keep it updated whenever a new Qt version is available on aqtinstall.
67
49
dmg-aqtinstall :
71
53
fail-fast : false
72
54
matrix :
73
55
include :
74
- - os : macos-13
75
- qt-version : 5.15.2
76
- build-type : release
77
-
78
56
- os : macos-13
79
57
qt-version : 6.5.2
80
58
build-type : release
98
76
then
99
77
version="${version}+g${GITHUB_SHA::7}"
100
78
fi
101
- arches='x86_64'
102
- if [[ '${{ matrix.qt-version }}' == 6.* ]]
103
- then
104
- arches+='-arm64'
105
- fi
79
+ arches='x86_64-arm64'
106
80
artifact_name="Notes_${version}-Qt${{ matrix.qt-version }}-${arches}"
107
81
if [ '${{ matrix.build-type }}' == 'debug' ]
108
82
then
@@ -126,23 +100,20 @@ jobs:
126
100
127
101
- name : Build (${{ matrix.build-type }})
128
102
env :
129
- # Only commercial Qt 5 supports targeting Apple Silicon at the moment:
130
- # https://www.qt.io/blog/qt-on-apple-silicon
131
- TARGET_ARCH : ${{ startsWith(matrix.qt-version, '6.') && 'x86_64;arm64' || 'x86_64' }}
103
+ TARGET_ARCH : x86_64;arm64
132
104
VERBOSE : 1
133
105
run : |
134
106
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)
135
107
cmake . --warn-uninitialized --warn-unused-vars \
136
108
-B build -G Ninja \
137
- -DCMAKE_OSX_DEPLOYMENT_TARGET=${{ startsWith(matrix.qt-version, '6.') && ' 11.0' || '10.15' }} \
109
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
138
110
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
139
111
-DGIT_REVISION=${{ github.ref_type != 'tag' && 'ON' || 'OFF' }} \
140
- -DCMAKE_OSX_ARCHITECTURES="${{ env.TARGET_ARCH }}" \
112
+ -DCMAKE_OSX_ARCHITECTURES='x86_64;arm64' \
141
113
-DPRO_VERSION=OFF
142
114
cmake --build build
143
115
144
116
- name : (FIXME) Run qmllint
145
- if : startsWith(matrix.qt-version, '6.')
146
117
run : |
147
118
cmake --build build --target all_qmllint || true
148
119
@@ -158,17 +129,6 @@ jobs:
158
129
mv Notes.app 'Notes Better.app'
159
130
macdeployqt 'Notes Better.app' -qmldir=../src/qml -appstore-compliant
160
131
161
- - name : Remove unnecessary Qt plugins and libraries
162
- run : |
163
- set -x
164
- set -e
165
- cd 'build/Notes Better.app'
166
- if [[ '${{ matrix.qt-version }}' == 5.* ]]
167
- then
168
- # The bearer plugin has caused problems for us in the past. Plus, it was removed altogether in Qt 6.
169
- rm -rv Contents/PlugIns/bearer
170
- fi
171
-
172
132
- name : Import signing certificate
173
133
if : github.repository == 'nuttyartist/notes' && github.event_name != 'pull_request'
174
134
run : |
0 commit comments