Skip to content

Commit cbbdb1a

Browse files
authored
Merge pull request #3297 from ann0see/autobuild/macARM
2 parents ef0996b + 2ce9824 commit cbbdb1a

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/autobuild/mac.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
set -eu
2828

29-
QT_DIR=/usr/local/opt/qt
29+
QT_DIR=/opt/qt
3030
# The following version pinnings are semi-automatically checked for
3131
# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually:
3232
AQTINSTALL_VERSION=3.1.16
@@ -47,7 +47,15 @@ setup() {
4747
echo "Using Qt installation from previous run (actions/cache)"
4848
else
4949
echo "Installing Qt..."
50-
python3 -m pip install "aqtinstall==${AQTINSTALL_VERSION}"
50+
# We may need to create the Qt installation directory and chown it to the runner user to fix permissions
51+
sudo mkdir -p "${QT_DIR}"
52+
sudo chown "$(whoami)" "${QT_DIR}"
53+
# Create and enter virtual environment
54+
python3 -m venv venv
55+
# Must hide directory as it just gets created during execution of the previous command and cannot be found by shellcheck
56+
# shellcheck source=/dev/null
57+
source venv/bin/activate
58+
pip install "aqtinstall==${AQTINSTALL_VERSION}"
5159
local qtmultimedia=()
5260
if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
5361
# From Qt6 onwards, qtmultimedia is a module and cannot be installed
@@ -56,6 +64,9 @@ setup() {
5664
fi
5765
qtmultimedia+=("qtmultimedia")
5866
python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase qttools qttranslations "${qtmultimedia[@]}"
67+
# deactivate and remove venv as aqt is no longer needed from here on
68+
deactivate
69+
rm -rf venv
5970
fi
6071
}
6172

.github/workflows/autobuild.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,12 @@ jobs:
226226

227227
- config_name: MacOS (artifacts)
228228
target_os: macos
229-
building_on_os: macos-12
229+
building_on_os: macos-14
230230
base_command: QT_VERSION=6.6.3 SIGN_IF_POSSIBLE=1 TARGET_ARCHS="x86_64 arm64" ./.github/autobuild/mac.sh
231231
# Disable CodeQL on mac as it interferes with signing the binaries (signing hangs, see #2563 and #2564)
232232
run_codeql: false
233-
# Default Xcode which runs on macos-12:
234-
xcode_version: 14.2.0
233+
# Latest Xcode which runs on macos-14:
234+
xcode_version: 15.4.0
235235
is_main_build_target: true
236236

237237
# Reminder: If Legacy is removed, be sure to add a dedicated job for CodeQL again.
@@ -323,7 +323,7 @@ jobs:
323323
uses: actions/cache@v4
324324
with:
325325
path: |
326-
/usr/local/opt/qt
326+
/opt/qt
327327
~/Library/Cache/jamulus-homebrew-bottles
328328
key: ${{ matrix.config.target_os }}-${{ hashFiles('.github/workflows/autobuild.yml', '.github/autobuild/mac.sh', 'mac/deploy_mac.sh') }}-${{ matrix.config.base_command }}
329329

0 commit comments

Comments
 (0)