Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/cpp-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,28 @@ jobs:
- name: Fetch and build binutils
run: |
set +e
# Retry up to 10 times because Curl has a tendency to timeout on
# Github runners.
for retry in {1..10} error; do
if [[ $retry == "error" ]]; then exit 5; fi
curl -L https://ftpmirror.gnu.org/binutils/binutils-${{ matrix.binutils_version }}.tar.xz --output binutils.tar.xz && break
sleep 300
# Retry up to 10 times with fallback mirrors and fail on HTTP errors.
urls=(
"https://ftpmirror.gnu.org/binutils/binutils-${{ matrix.binutils_version }}.tar.xz"
"https://ftp.gnu.org/gnu/binutils/binutils-${{ matrix.binutils_version }}.tar.xz"
"https://mirrors.kernel.org/gnu/binutils/binutils-${{ matrix.binutils_version }}.tar.xz"
)
download_success=false
for retry in {1..10}; do
for url in "${urls[@]}"; do
rm -f binutils.tar.xz
echo "Attempting to download binutils from ${url} (attempt ${retry})..."
if curl -f -L --connect-timeout 30 --max-time 300 "${url}" --output binutils.tar.xz; then
download_success=true
break 2
fi
done
sleep 30
done
if [[ "${download_success}" != "true" ]]; then
echo "Failed to download binutils after multiple retries."
exit 5
fi
set -e

tar -xf binutils.tar.xz
Expand Down Expand Up @@ -706,9 +721,10 @@ jobs:
# Retry up to 10 times because Curl has a tendency to timeout on
# Github runners.
for retry in {1..10} error; do
if [[ $retry == "error" ]]; then exit 5; fi
curl -L https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_${GITHUB_EVENT_INPUTS_DOWNLOADPUBLICVERSION}.zip --output firebase_cpp_sdk.zip && break
sleep 300
if [[ $retry == "error" ]]; then exit 5; fi
rm -f firebase_cpp_sdk.zip
curl -f -L --connect-timeout 30 --max-time 300 https://dl.google.com/firebase/sdk/cpp/firebase_cpp_sdk_${GITHUB_EVENT_INPUTS_DOWNLOADPUBLICVERSION}.zip --output firebase_cpp_sdk.zip && break
sleep 30
done
set -e
env:
Expand Down
10 changes: 6 additions & 4 deletions build_scripts/android/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ else
# Github runners.
for retry in {1..10} error; do
if [[ $retry == "error" ]]; then exit 5; fi
curl -LSs \
rm -f Strings.zip
Comment thread
a-maurice marked this conversation as resolved.
curl -f -LSs \
"https://download.sysinternals.com/files/Strings.zip" \
--output Strings.zip && break
sleep 300
sleep 30
done
set -e
unzip -q Strings.zip && rm -f Strings.zip
Expand Down Expand Up @@ -76,10 +77,11 @@ if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.p
# Github runners.
for retry in {1..10} error; do
if [[ $retry == "error" ]]; then exit 5; fi
curl --http1.1 -LSs \
rm -f /tmp/android-ndk-r21e.zip
Comment thread
a-maurice marked this conversation as resolved.
curl -f --http1.1 -LSs \
"https://dl.google.com/android/repository/android-ndk-r21e-${platform}-x86_64.zip" \
--output /tmp/android-ndk-r21e.zip && break
sleep 300
sleep 30
done
set -e
(cd /tmp && unzip -oq android-ndk-r21e.zip && rm -f android-ndk-r21e.zip)
Expand Down
Loading