Skip to content

Commit 12bc215

Browse files
committed
Use GMP mirror from GitHub in CI
1 parent a390bdc commit 12bc215

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

bin/build_dependencies_unix.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ do
4848
PATCH_GMP_ARM64=yes
4949
shift
5050
;;
51+
--use-gmp-github-mirror)
52+
USE_GMP_GITHUB_MIRROR=yes
53+
shift
54+
;;
5155
*)
5256
2>&1 echo "unrecognised argument:" $key
5357
exit 1
@@ -82,7 +86,14 @@ if [ $USE_GMP = "gmp" ]; then
8286
# #
8387
# ----------------------------------------------------------------------- #
8488

85-
curl -O https://gmplib.org/download/gmp/gmp-$GMPVER.tar.xz
89+
if [ $USE_GMP_GITHUB_MIRROR = "yes" ]; then
90+
# Needed in GitHub Actions because it is blocked from gmplib.org
91+
git clone https://github.com/oscarbenjamin/gmp_mirror.git
92+
cp gmp_mirror/gmp-$GMPVER.tar.xz .
93+
else
94+
curl -O https://gmplib.org/download/gmp/gmp-$GMPVER.tar.xz
95+
fi
96+
8697
tar xf gmp-$GMPVER.tar.xz
8798
cd gmp-$GMPVER
8899

bin/cibw_before_all_linux.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
yum install -y xz
44
bin/build_dependencies_unix.sh\
55
--gmp gmp\
6-
--host x86_64-pc-linux-gnu
6+
--host x86_64-pc-linux-gnu\
7+
--use-gmp-github-mirror

bin/cibw_before_all_macosx_arm64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export LDFLAGS=" -arch arm64"
66
bin/build_dependencies_unix.sh\
77
--gmp gmp\
88
--host aarch64-apple-darwin\
9-
--patch-gmp-arm64
9+
--patch-gmp-arm64\
10+
--use-gmp-github-mirror

bin/cibw_before_all_macosx_x86_64.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
bin/build_dependencies_unix.sh\
44
--gmp gmp\
5-
--host x86_64-apple-darwin
5+
--host x86_64-apple-darwin\
6+
--use-gmp-github-mirror

bin/cibw_before_all_windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ cat setup.cfg
1717
pacman -S --noconfirm mingw-w64-x86_64-gcc m4 make mingw-w64-x86_64-tools-git
1818

1919
# This takes ~30mins
20-
bin/build_dependencies_unix.sh
20+
bin/build_dependencies_unix.sh --use-gmp-github-mirror

0 commit comments

Comments
 (0)