Skip to content

Commit

Permalink
CI: Work around Azure Ubuntu mirror issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 13, 2023
1 parent 5b60060 commit b5f806a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/rolling-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ jobs:
- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install cmake ninja-build ccache libsdl2-dev libgtk-3-dev libegl1-mesa-dev libevdev-dev libgbm-dev libdrm-dev libwayland-dev libwayland-egl-backend-dev extra-cmake-modules libcurl4-gnutls-dev libxrandr-dev llvm-12 lld-12 clang-12
# Workaround for https://github.com/actions/runner-images/issues/675
sudo scripts/retry.sh apt-get update
sudo scripts/retry.sh apt-get -y install cmake ninja-build ccache libsdl2-dev libgtk-3-dev libegl1-mesa-dev libevdev-dev libgbm-dev libdrm-dev libwayland-dev libwayland-egl-backend-dev extra-cmake-modules libcurl4-gnutls-dev libxrandr-dev llvm-12 lld-12 clang-12
- name: Cache Dependencies
id: cache-deps
Expand Down
13 changes: 13 additions & 0 deletions scripts/retry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

RETRIES=10

for i in $(seq 1 "$RETRIES"); do
"$@" && break
if [ "$i" == "$RETRIES" ]; then
echo "Command \"$@\" failed after ${RETRIES} retries."
exit 1
fi
done

exit 0

0 comments on commit b5f806a

Please sign in to comment.