99 # So it doesn't make much sense to have different build types other than 'debug' here.
1010 # The release dmg is built using aqtinstall instead (the job below this one).
1111 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 }})
1313 runs-on : ${{ matrix.os }}
1414 strategy :
1515 fail-fast : false
1616 matrix :
1717 include :
1818 - os : macos-13
19- qt-version-major : 5
20- build-type : debug
21-
22- - os : macos-13
23- qt-version-major : 6
2419 build-type : debug
2520 steps :
2621 - name : Checkout code
2722 uses : actions/checkout@v4
2823 with :
2924 submodules : recursive
3025
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)
3727 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
4429
4530 - name : Setup CLang problem matcher
4631 # Technically, this action only supports GCC, but it seems to work well for Clang too.
@@ -55,13 +40,10 @@ jobs:
5540 cmake . --warn-uninitialized --warn-unused-vars \
5641 -G Ninja -B build \
5742 -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 )" \
5944 -DPRO_VERSION=OFF
6045 cmake --build build
6146
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- #
6547 # NOTE: This job uses a fixed Qt version (set in the 'qt-version' key below)!
6648 # So, remember to keep it updated whenever a new Qt version is available on aqtinstall.
6749 dmg-aqtinstall :
7153 fail-fast : false
7254 matrix :
7355 include :
74- - os : macos-13
75- qt-version : 5.15.2
76- build-type : release
77-
7856 - os : macos-13
7957 qt-version : 6.5.2
8058 build-type : release
9876 then
9977 version="${version}+g${GITHUB_SHA::7}"
10078 fi
101- arches='x86_64'
102- if [[ '${{ matrix.qt-version }}' == 6.* ]]
103- then
104- arches+='-arm64'
105- fi
79+ arches='x86_64-arm64'
10680 artifact_name="Notes_${version}-Qt${{ matrix.qt-version }}-${arches}"
10781 if [ '${{ matrix.build-type }}' == 'debug' ]
10882 then
@@ -126,23 +100,20 @@ jobs:
126100
127101 - name : Build (${{ matrix.build-type }})
128102 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
132104 VERBOSE : 1
133105 run : |
134106 export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)
135107 cmake . --warn-uninitialized --warn-unused-vars \
136108 -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 \
138110 -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
139111 -DGIT_REVISION=${{ github.ref_type != 'tag' && 'ON' || 'OFF' }} \
140- -DCMAKE_OSX_ARCHITECTURES="${{ env.TARGET_ARCH }}" \
112+ -DCMAKE_OSX_ARCHITECTURES='x86_64;arm64' \
141113 -DPRO_VERSION=OFF
142114 cmake --build build
143115
144116 - name : (FIXME) Run qmllint
145- if : startsWith(matrix.qt-version, '6.')
146117 run : |
147118 cmake --build build --target all_qmllint || true
148119
@@ -158,17 +129,6 @@ jobs:
158129 mv Notes.app 'Notes Better.app'
159130 macdeployqt 'Notes Better.app' -qmldir=../src/qml -appstore-compliant
160131
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-
172132 - name : Import signing certificate
173133 if : github.repository == 'nuttyartist/notes' && github.event_name != 'pull_request'
174134 run : |
0 commit comments