diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 9d0e600596..e25bf9dacd 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -120,7 +120,9 @@ jobs: target_os: macos building_on_os: macos-10.15 cmd1_prebuild: "./autobuild/mac/artifacts/autobuild_mac_1_prepare.sh 5.15.2" - cmd2_build: "./autobuild/mac/artifacts/autobuild_mac_2_build.sh sign_if_possible" + # QMAKE_MAC_SDK limits the auto-used to the specified maximum version to ensure compatibility with Qt 5.15.2, + # QMAKE_MACOSX_DEPLOYMENT_TARGET describes the minimum version which we support with this build: + cmd2_build: "env EXTRA_QMAKE_ARGS='QMAKE_MAC_SDK=macosx10.15 QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13' ./autobuild/mac/artifacts/autobuild_mac_2_build.sh sign_if_possible" cmd3_postbuild: "./autobuild/mac/artifacts/autobuild_mac_3_copy_files.sh" uses_codeql: false @@ -151,13 +153,13 @@ jobs: runs-on: ${{ matrix.config.building_on_os }} steps: - # For Qt5 on Mac, we need to ensure SDK 10.15 is used, and not SDK 11.x - # This is done by selecting Xcode 11.7 instead of the latest default of 12.x + # For Qt5 on Mac, we need to ensure SDK 10.15 is used. + # Xcode 12.0 is the last version which ships SDK 10.15, therefore pin it: - name: Select Xcode version for Mac if: ${{ matrix.config.target_os == 'macos' }} uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '11.7' + xcode-version: '12.4.0' # Checkout code - name: Checkout code diff --git a/autobuild/mac/artifacts/autobuild_mac_2_build.sh b/autobuild/mac/artifacts/autobuild_mac_2_build.sh index 8347bfe9b9..d6b14d1e85 100755 --- a/autobuild/mac/artifacts/autobuild_mac_2_build.sh +++ b/autobuild/mac/artifacts/autobuild_mac_2_build.sh @@ -21,6 +21,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../ensure_THIS_JAMULUS_PROJECT_PATH.sh cd "${THIS_JAMULUS_PROJECT_PATH}" echo "Run deploy script..." +export EXTRA_QMAKE_ARGS # If we have certificate details, then prepare the signing if [[ "${SIGN}" != "sign_if_possible" || @@ -47,4 +48,4 @@ else sh "${THIS_JAMULUS_PROJECT_PATH}"/mac/deploy_mac.sh -s "${MACOS_CERTIFICATE_ID}" # Set up the notarization and staple parts echo "::set-output name=macos_signed::true" -fi +fi \ No newline at end of file diff --git a/mac/deploy_mac.sh b/mac/deploy_mac.sh index 438fc38a7b..f8b2c7c0dc 100755 --- a/mac/deploy_mac.sh +++ b/mac/deploy_mac.sh @@ -43,7 +43,7 @@ cleanup() build_app() { # Build Jamulus - qmake "${project_path}" -o "${build_path}/Makefile" "CONFIG+=release" ${@:2} + qmake "${project_path}" -o "${build_path}/Makefile" "CONFIG+=release" ${@:2} ${EXTRA_QMAKE_ARGS:-} local target_name="$(cat "${build_path}/Makefile" | sed -nE 's/^QMAKE_TARGET *= *(.*)$/\1/p')" local job_count="$(sysctl -n hw.ncpu)"