Skip to content

Commit 49a16a9

Browse files
committed
CI Linux: add-apt-repostitory retries
Fetching GPG keys sometimes fails on timeout so prevent it by adding retries with exponentially increasing intervals taken from: <canonical/server-test-scripts#18> (just removed bashisms)
1 parent 3e04432 commit 49a16a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/scripts/Linux/prepare.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ sdl2_ttf_build_dep=$(get_build_deps_excl libsdl2-ttf libsdl2-dev)
5656
sudo apt install $sdl2_mix_build_dep $sdl2_ttf_build_dep
5757

5858
# FFmpeg deps
59-
sudo add-apt-repository ppa:savoury1/ffmpeg4 # openh264, new x265
59+
for i in $(seq 10); do
60+
[ "$i" -gt 1 ] && sleep $((2**i))
61+
# openh264, new x265
62+
sudo add-apt-repository --yes ppa:savoury1/ffmpeg4 && err=0 && break || err=$?
63+
done
64+
(exit "$err")
6065
# for FFmpeg - libzmq3-dev needs to be ignored (cannot be installed, see run #380)
6166
ffmpeg_build_dep=$(get_build_deps_excl ffmpeg 'libva-dev')
6267
# shellcheck disable=SC2086 # intentional

0 commit comments

Comments
 (0)