From cbd4c5ebf9710206753f029b383caadd7344497b Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Wed, 23 Jun 2021 13:09:00 -0700 Subject: [PATCH 1/2] GH-1368: Use --osx-sysroot for macOS CI builds --- .cirrus.yml | 2 +- ci/build.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8b1290b67e..47deb48b8d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -219,7 +219,7 @@ macos_big_sur_task: macos_catalina_task: macos_instance: - image: catalina-xcode-11.6 + image: catalina-xcode prepare_script: ./ci/macos/prepare.sh << : *CI_TEMPLATE << : *MACOS_RESOURCES_TEMPLATE diff --git a/ci/build.sh b/ci/build.sh index 8fc0518264..9227ac7a35 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -3,6 +3,12 @@ set -e set -x +# If we're on macOS, use --osx-sysroot to ensure we can find the SDKs from Xcode. This avoids +# some problems with Catalina specifically, but it doesn't break anything on Big Sur either. +if [ "${CIRRUS_OS}" == "darwin" ]; then + export ZEEK_CI_CONFIGURE_FLAGS="${ZEEK_CI_CONFIGURE_FLAGS} --osx-sysroot=$(xcrun --show-sdk-path)" +fi + if [ "${ZEEK_CI_CREATE_ARTIFACT}" != "1" ]; then ./configure ${ZEEK_CI_CONFIGURE_FLAGS} cd build From 1a61771d2f258c78c4ae6a6265faf05db851d4f0 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Wed, 23 Jun 2021 13:09:23 -0700 Subject: [PATCH 2/2] Call brew update-reset in ci/macos/prepare.sh This fixes some issues with the Catalina builds when it prepares the image and the base Cirrus image has old recipes for Homebrew. The VM then has to build a bunch of packages it shouldn't need to. --- ci/macos/prepare.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/macos/prepare.sh b/ci/macos/prepare.sh index 2e81e060c3..16e7e55085 100755 --- a/ci/macos/prepare.sh +++ b/ci/macos/prepare.sh @@ -5,5 +5,6 @@ sysctl hw.model hw.machine hw.ncpu hw.physicalcpu hw.logicalcpu set -e set -x +brew update-reset brew upgrade cmake openssl brew install swig bison