CI: Work around Azure Ubuntu mirror issue

This commit is contained in:
Connor McLaughlin 2023-01-13 21:14:19 +10:00
parent 5b600602c2
commit b5f806a830
2 changed files with 16 additions and 2 deletions

View File

@ -171,8 +171,9 @@ jobs:
- name: Install packages - name: Install packages
shell: bash shell: bash
run: | run: |
sudo apt-get update # Workaround for https://github.com/actions/runner-images/issues/675
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 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 - name: Cache Dependencies
id: cache-deps id: cache-deps

13
scripts/retry.sh Executable file
View File

@ -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