diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 32c8efb..8c02dc5 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -126,11 +126,11 @@ jobs: # GitHub actions comes with libomp already installed, but for its native arch only. Must build universal one # manually so that both x86 and arm builds can be built. run: | - brew install coreutils - brew install libomp + brew fetch --retry coreutils && brew install coreutils + brew fetch --retry libomp && brew install libomp if [[ ${{ matrix.cibw_archs }} == "arm64" ]] ; then echo "Building universal libomp manually" - sh add_arm_to_libomp_dylib.sh + sh add_arm_to_libomp_dylib.sh || exit 1 fi - uses: pypa/cibuildwheel@v2.16 diff --git a/add_arm_to_libomp_dylib.sh b/add_arm_to_libomp_dylib.sh index 99e32b0..40f657c 100755 --- a/add_arm_to_libomp_dylib.sh +++ b/add_arm_to_libomp_dylib.sh @@ -20,13 +20,14 @@ if [ "$(arch)" != "x86_64" ] && [ "$(arch)" != "i386" ]; then fi set -x # echo on +set -e # fail fast #mkdir x86lib mkdir armlib # download and unzip both x86 and arm libomp tarballs -#brew fetch --force --bottle-tag=x86_64_monterey libomp -brew fetch --force --bottle-tag=arm64_big_sur libomp +#brew fetch --retry --force --bottle-tag=x86_64_monterey libomp +brew fetch --retry --force --bottle-tag=arm64_big_sur libomp # untar #tar -xzf $(brew --cache --bottle-tag=x86_64_monterey libomp) --strip-components 2 -C x86lib