Skip to content

Commit

Permalink
CI: fix mac universal rebuild for nightlies (#6084)
Browse files Browse the repository at this point in the history
  • Loading branch information
onetechnical authored Jul 26, 2024
1 parent 8ed60e2 commit 04ec5f9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/travis/deploy_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04ec5f9

Please sign in to comment.