Skip to content

Commit

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

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

jobs:
java-slow-test-build:
Expand Down Expand Up @@ -110,7 +110,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
echo 'Acquire::Retries "${INSTALL_COMPILER_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
Expand Down Expand Up @@ -213,7 +213,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
echo 'Acquire::Retries "${INSTALL_COMPILER_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
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
CMAKE_VERSION: "3.6.1"
APT_RETRIES: "5"
INSTALL_COMPILER_RETRIES: "5"

jobs:
java-build:
Expand Down Expand Up @@ -174,11 +174,11 @@ 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
echo 'Acquire::Retries "${INSTALL_COMPILER_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
curl -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
curl --retry ${INSTALL_COMPILER_RETRIES} -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
tar xf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
echo "cmake-${CMAKE_VERSION}-Linux-x86_64/bin" >> $GITHUB_PATH
- name: Build
Expand Down Expand Up @@ -270,12 +270,12 @@ jobs:
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- 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
curl --retry ${INSTALL_COMPILER_RETRIES} -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo 'Acquire::Retries "${INSTALL_COMPILER_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
curl -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
curl --retry ${INSTALL_COMPILER_RETRIES} -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
tar xf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
echo "cmake-${CMAKE_VERSION}-Linux-x86_64/bin" >> $GITHUB_PATH
- name: Build
Expand Down Expand Up @@ -330,12 +330,12 @@ jobs:
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- 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
curl --retry ${INSTALL_COMPILER_RETRIES} -L https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo 'Acquire::Retries "${INSTALL_COMPILER_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
curl -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
curl --retry ${INSTALL_COMPILER_RETRIES} -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
tar xf cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz
echo "cmake-${CMAKE_VERSION}-Linux-x86_64/bin" >> $GITHUB_PATH
- name: Build
Expand Down Expand Up @@ -388,7 +388,7 @@ jobs:
echo "BUILD_JAVA_VERSION=8" >> $GITHUB_ENV
- name: Install CMake
run: |
curl -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
curl --retry ${INSTALL_COMPILER_RETRIES} -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
tar xf cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
echo "cmake-${CMAKE_VERSION}-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH
- name: Build
Expand Down

0 comments on commit 745a8e6

Please sign in to comment.