Skip to content

Commit f8cd3b4

Browse files
authored
Add retry to brew calls (#111)
1 parent 0b92b85 commit f8cd3b4

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ jobs:
126126
# GitHub actions comes with libomp already installed, but for its native arch only. Must build universal one
127127
# manually so that both x86 and arm builds can be built.
128128
run: |
129-
brew install coreutils
130-
brew install libomp
129+
brew fetch --retry coreutils && brew install coreutils
130+
brew fetch --retry libomp && brew install libomp
131131
if [[ ${{ matrix.cibw_archs }} == "arm64" ]] ; then
132132
echo "Building universal libomp manually"
133-
sh add_arm_to_libomp_dylib.sh
133+
sh add_arm_to_libomp_dylib.sh || exit 1
134134
fi
135135
136136
- uses: pypa/cibuildwheel@v2.16

add_arm_to_libomp_dylib.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ if [ "$(arch)" != "x86_64" ] && [ "$(arch)" != "i386" ]; then
2020
fi
2121

2222
set -x # echo on
23+
set -e # fail fast
2324

2425
#mkdir x86lib
2526
mkdir armlib
2627

2728
# download and unzip both x86 and arm libomp tarballs
28-
#brew fetch --force --bottle-tag=x86_64_monterey libomp
29-
brew fetch --force --bottle-tag=arm64_big_sur libomp
29+
#brew fetch --retry --force --bottle-tag=x86_64_monterey libomp
30+
brew fetch --retry --force --bottle-tag=arm64_big_sur libomp
3031

3132
# untar
3233
#tar -xzf $(brew --cache --bottle-tag=x86_64_monterey libomp) --strip-components 2 -C x86lib

0 commit comments

Comments
 (0)