ruby-changes:56946
From: Takashi <ko1@a...>
Date: Mon, 12 Aug 2019 14:37:52 +0900 (JST)
Subject: [ruby-changes:56946] Takashi Kokubun: b1ef14176b (master): We did not have tool/ before checkout
https://git.ruby-lang.org/ruby.git/commit/?id=b1ef14176b From b1ef14176b3716e3900672a9563b94aa3abedb2d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Mon, 12 Aug 2019 14:35:49 +0900 Subject: We did not have tool/ before checkout anyway we don't need authorization here. Also retry does not seem to work in the original version, so let's extend this with retries as a separate github action later. diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 629b542..f698b55 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,7 +22,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/macos.yml#L22 brew update brew install gdbm gmp libffi openssl zlib ccache autoconf automake libtool readline - name: Checkout # not using actions/checkout because it's unstable. - run: tool/ci_retry.sh git clone --depth=50 https://github.com/ruby/ruby . + run: git clone --depth=50 https://github.com/ruby/ruby . - name: Set ENV run: | echo '##[set-env name=JOBS]'-j$((1 + $(sysctl -n hw.activecpu))) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 7870fae..7be2c68 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -21,7 +21,7 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L21 sudo apt-get install ruby2.5 sudo apt-get build-dep ruby2.5 - name: Checkout # not using actions/checkout because it's unstable. - run: tool/ci_retry.sh git clone --depth=50 https://github.com/ruby/ruby . + run: git clone --depth=50 https://github.com/ruby/ruby . - name: Set ENV run: | export JOBS=-j$((1 + $(nproc --all))) diff --git a/.travis.yml b/.travis.yml index 726b75b..710bb4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,10 +91,10 @@ env: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L91 # sources: # - ubuntu-toolchain-r-test before_install: - - tool/ci_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" - - tool/ci_retry.sh bash -c "sudo rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && sudo apt-get update -yq" + - tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - tool/travis_retry.sh bash -c "sudo rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && sudo apt-get update -yq" - |- - tool/ci_retry.sh sudo -E apt-get $travis_apt_get_options install \ + tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \ gcc-8 \ libffi-dev \ libgdbm-dev \ @@ -119,9 +119,9 @@ env: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L119 config: retries: true before_install: - - tool/ci_retry.sh bash -c "sudo rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && sudo apt-get update -yq" + - tool/travis_retry.sh bash -c "sudo rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && sudo apt-get update -yq" - |- - tool/ci_retry.sh sudo -E apt-get $travis_apt_get_options install \ + tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \ clang-8 \ llvm-8-tools \ libffi-dev \ @@ -277,10 +277,10 @@ env: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L277 # sources: # - ubuntu-toolchain-r-test before_install: - - tool/ci_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" - - tool/ci_retry.sh bash -c "sudo rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && sudo apt-get update -yq" + - tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + - tool/travis_retry.sh bash -c "sudo rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && sudo apt-get update -yq" - |- - tool/ci_retry.sh sudo -E apt-get $travis_apt_get_options install \ + tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \ gcc-8-multilib \ libffi-dev:i386 \ libffi6:i386 \ diff --git a/tool/ci_retry.sh b/tool/ci_retry.sh deleted file mode 100755 index 4eb378a..0000000 --- a/tool/ci_retry.sh +++ /dev/null @@ -1,15 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/.travis.yml#L0 -#!/bin/sh -eu -# The modified version of `travis_retry` to support custom backoffs, which is used by .travis.yml. -# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_retry.bash -# -# Now this is also used by .github/workflow/*.yml. - -for sleep in 0 ${WAITS:- 1 25 100}; do - sleep "$sleep" - - echo "+ $@" - if "$@"; then - exit 0 - fi -done -exit 1 diff --git a/tool/travis_retry.sh b/tool/travis_retry.sh new file mode 100755 index 0000000..9b79c56 --- /dev/null +++ b/tool/travis_retry.sh @@ -0,0 +1,13 @@ https://github.com/ruby/ruby/blob/trunk/tool/travis_retry.sh#L1 +#!/bin/sh -eu +# The modified version of `travis_retry` to support custom backoffs, which is used by .travis.yml. +# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_retry.bash + +for sleep in 0 ${WAITS:- 1 25 100}; do + sleep "$sleep" + + echo "+ $@" + if "$@"; then + exit 0 + fi +done +exit 1 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/