From a8a369c8379ebd06f357a566f775596458da6ac3 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 5 Jun 2021 13:21:34 -0400 Subject: [PATCH] ci: retry add-apt-repository to deal with network issues Signed-off-by: Alex Gaynor --- .github/workflows/ci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 47e4f4ecdbf9ea..f130e9f234fa15 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -137,7 +137,11 @@ jobs: # Setup: LLVM - run: curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - - run: sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' + # Retry to be resilient to intermittent network issues + - run: | + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' || + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' || + sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main' - run: sudo apt-get update -y - run: sudo apt-get install -y llvm-12 clang-12 lld-12 - run: echo $(llvm-config-12 --bindir) >> $GITHUB_PATH