Skip to content

Commit

Permalink
Merge pull request #3445 from ann0see/iOS/upgradeiOSBuild
Browse files Browse the repository at this point in the history
Upgrade iOS Build to Qt6
  • Loading branch information
pljones authored Dec 25, 2024
2 parents bd6adea + 93e89de commit a1da151
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
23 changes: 15 additions & 8 deletions .github/autobuild/ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

set -eu

QT_DIR=/usr/local/opt/qt
QT_DIR=/opt/qt
# The following version pinnings are semi-automatically checked for
# updates. Verify .github/workflows/bump-dependencies.yaml when changing those manually:
AQTINSTALL_VERSION=3.1.18
Expand All @@ -45,7 +45,15 @@ setup() {
echo "Using Qt installation from previous run (actions/cache)"
else
echo "Installing Qt"
python3 -m pip install "aqtinstall==${AQTINSTALL_VERSION}"
# We may need to create the Qt installation directory and chown it to the runner user to fix permissions
sudo mkdir -p "${QT_DIR}"
sudo chown "$(whoami)" "${QT_DIR}"
# Create and enter virtual environment
python3 -m venv venv
# Must hide directory as it just gets created during execution of the previous command and cannot be found by shellcheck
# shellcheck source=/dev/null
source venv/bin/activate
pip install "aqtinstall==${AQTINSTALL_VERSION}"
# Install actual ios Qt:
local qtmultimedia=()
if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
Expand All @@ -58,14 +66,13 @@ setup() {
if [[ ! "${QT_VERSION}" =~ 5\.[0-9]+\.[0-9]+ ]]; then
# Starting with Qt6, ios' qtbase install does no longer include a real qmake binary.
# Instead, it is a script which invokes the mac desktop qmake.
# As of aqtinstall 2.1.0 / 04/2022, desktop qtbase has to be installed manually:
python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase
# As of aqtinstall 2.1.0 / 04/2022, desktop qtbase and qttools including lrelease have to be installed manually:
python3 -m aqt install-qt --outputdir "${QT_DIR}" mac desktop "${QT_VERSION}" --archives qtbase qttools
fi

# Suppress deprecation of Legacy Build System for now.
# TODO: Legacy Build System is removed in xcode 14. Need to migrate
# to the Modern Build System instead.
/usr/libexec/PlistBuddy -c "Add :DisableBuildSystemDeprecationDiagnostic bool true" /usr/local/opt/qt/"${QT_VERSION}"/ios/mkspecs/macx-xcode/WorkspaceSettings.xcsettings
# deactivate and remove venv as aqt is no longer needed from here on
deactivate
rm -rf venv
fi
}

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,13 @@ jobs:

- config_name: iOS (artifacts)
target_os: ios
building_on_os: macos-12
base_command: QT_VERSION=5.15.2 ./.github/autobuild/ios.sh
building_on_os: macos-14
base_command: QT_VERSION=6.7.3 ./.github/autobuild/ios.sh
# Build failed with CodeQL enabled when last tested 03/2022 (#2490).
# There are no hints that iOS is supposed to be supported by CodeQL.
# Therefore, disable it:
run_codeql: false
# Unfortunately, more modern Xcode versions no longer seem to support
# Qt 5.15.2. Therefore upgrading to Qt6 is needed in the medium term (#2711)
xcode_version: 13.4.1
xcode_version: 15.4.0

- config_name: Windows (artifact+codeQL)
target_os: windows
Expand Down

0 comments on commit a1da151

Please sign in to comment.