Skip to content

Commit

Permalink
[CI] Retry apt download up to 5 times.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyazelenko committed May 11, 2021
1 parent 6772e17 commit 2259a58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci-low-cadence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
APT_RETRIES: "5"

jobs:
java-slow-test-build:
Expand Down Expand Up @@ -64,7 +65,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -110,8 +110,8 @@ jobs:
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- name: Install compiler
run: |
echo 'Acquire::Retries "${APT_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev libidn11
- name: Build
run: cppbuild/cppbuild --c-warnings-as-errors --cxx-warnings-as-errors --slow-system-tests --no-system-tests
Expand All @@ -120,7 +120,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -169,7 +168,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -215,8 +213,8 @@ jobs:
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- name: Install compiler
run: |
echo 'Acquire::Retries "${APT_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev libidn11
- name: Build
run: cppbuild/cppbuild --sanitise-build --c-warnings-as-errors --cxx-warnings-as-errors --slow-system-tests
Expand All @@ -225,7 +223,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
CMAKE_VERSION: "3.6.1"
APT_RETRIES: "5"

jobs:
java-build:
Expand Down Expand Up @@ -68,7 +69,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -129,7 +129,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -175,6 +174,7 @@ jobs:
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- name: Install compiler
run: |
echo 'Acquire::Retries "${APT_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries
sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe"
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.version }} libbsd-dev uuid-dev libidn11
Expand All @@ -188,7 +188,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -226,7 +225,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -273,6 +271,7 @@ jobs:
- name: Install compiler
run: |
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo 'Acquire::Retries "${APT_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${{ matrix.version }} main"
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.version }} libstdc++-7-dev libbsd-dev uuid-dev libidn11
Expand All @@ -286,7 +285,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -333,6 +331,7 @@ jobs:
- name: Install compiler
run: |
curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo 'Acquire::Retries "${APT_RETRIES}";' | sudo tee -a /etc/apt/apt.conf.d/99retries
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${{ matrix.version }} main"
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.version }} libstdc++-7-dev libbsd-dev uuid-dev libidn11
Expand All @@ -346,7 +345,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -400,7 +398,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down Expand Up @@ -455,7 +452,6 @@ jobs:
if: failure()
run: |
echo "::set-output name=dir::build/test_logs"
./gradlew copyTestLogs
- name: Upload crash logs
if: always() && steps.copy_test_logs.outputs.dir == 'build/test_logs'
Expand Down

0 comments on commit 2259a58

Please sign in to comment.