From 04ec5f9bb188229a790998e8c2f3bec552eaaaf5 Mon Sep 17 00:00:00 2001 From: John Lee Date: Fri, 26 Jul 2024 17:49:49 -0400 Subject: [PATCH] CI: fix mac universal rebuild for nightlies (#6084) --- scripts/travis/build.sh | 14 +++++++++++--- scripts/travis/deploy_packages.sh | 4 ++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh index 3087f63d75..244ff399ef 100755 --- a/scripts/travis/build.sh +++ b/scripts/travis/build.sh @@ -9,12 +9,18 @@ # Examples: scripts/travis/build.sh MAKE_DEBUG_OPTION="" +MAKE_UNIVERSAL_OPTION="" + while [ "$1" != "" ]; do case "$1" in --make_debug) shift MAKE_DEBUG_OPTION="1" ;; + --make_universal) + shift + MAKE_UNIVERSAL_OPTION="1" + ;; *) echo "Unknown option" "$1" exit 1 @@ -75,13 +81,15 @@ set -e scripts/travis/before_build.sh duration "before_build.sh" -if [ "${OS}-${ARCH}" = "linux-arm" ] || [ "${OS}-${ARCH}" = "windows-amd64" ]; then - # for arm, build just the basic distro +if [ "${OS}-${ARCH}" = "windows-amd64" ]; then # for windows, we still have some issues with the enlistment checking, so we'll make it simple for now. MAKE_DEBUG_OPTION="" fi -if [ "${MAKE_DEBUG_OPTION}" != "" ]; then +if [ "${MAKE_UNIVERSAL_OPTION}" != "" ]; then + make universal + duration "make universal" +elif [ "${MAKE_DEBUG_OPTION}" != "" ]; then make build build-race duration "make build build-race" else diff --git a/scripts/travis/deploy_packages.sh b/scripts/travis/deploy_packages.sh index 5879835b01..8eae9307b4 100755 --- a/scripts/travis/deploy_packages.sh +++ b/scripts/travis/deploy_packages.sh @@ -26,11 +26,11 @@ fi if [ "${NIGHTLY_BUILD}" == "true" ]; then # we want to rebuild universal binaries for nightly builds - NO_BUILD=true if [ "${OSARCH}" == "darwin/arm64" ]; then - make universal + ./scripts/travis/build.sh --make_universal OSARCH="darwin/universal" fi + NO_BUILD=true fi if [ -z "${NO_BUILD}" ] || [ "${NO_BUILD}" != "true" ]; then