mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Disable IPv6 on Travis s390x case. (#2819)
This fixes following error that sometimes happens once in a few times on Travis s390x environment. ``` $ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test Error: retrieving gpg key timed out. ```
This commit is contained in:
parent
b0bf654c31
commit
f132825ffa
2 changed files with 18 additions and 2 deletions
|
@ -47,6 +47,7 @@ env:
|
||||||
- RUBY_PREFIX=/tmp/ruby-prefix
|
- RUBY_PREFIX=/tmp/ruby-prefix
|
||||||
- GEMS_FOR_TEST='timezone tzinfo'
|
- GEMS_FOR_TEST='timezone tzinfo'
|
||||||
- UPDATE_UNICODE="UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
|
- UPDATE_UNICODE="UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
|
||||||
|
- BEFORE_INSTALL=true
|
||||||
# https://github.com/travis-ci/travis-build/blob/e411371dda21430a60f61b8f3f57943d2fe4d344/lib/travis/build/bash/travis_apt_get_options.bash#L7
|
# https://github.com/travis-ci/travis-build/blob/e411371dda21430a60f61b8f3f57943d2fe4d344/lib/travis/build/bash/travis_apt_get_options.bash#L7
|
||||||
- travis_apt_get_options='--allow-downgrades --allow-remove-essential --allow-change-held-packages'
|
- travis_apt_get_options='--allow-downgrades --allow-remove-essential --allow-change-held-packages'
|
||||||
- travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
|
- travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
|
||||||
|
@ -68,10 +69,10 @@ env:
|
||||||
# sources:
|
# sources:
|
||||||
# - ubuntu-toolchain-r-test
|
# - ubuntu-toolchain-r-test
|
||||||
before_install:
|
before_install:
|
||||||
|
- bash -cx "${BEFORE_INSTALL}"
|
||||||
- tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
- tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
||||||
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
|
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
|
||||||
- |-
|
- |-
|
||||||
${BEFORE_INSTALL}
|
|
||||||
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \
|
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install \
|
||||||
ccache \
|
ccache \
|
||||||
gcc-8 \
|
gcc-8 \
|
||||||
|
@ -132,7 +133,9 @@ env:
|
||||||
name: s390x-linux
|
name: s390x-linux
|
||||||
arch: s390x
|
arch: s390x
|
||||||
<<: *gcc-8
|
<<: *gcc-8
|
||||||
|
env:
|
||||||
|
- BEFORE_INSTALL="tool/travis_disable_ipv6.sh"
|
||||||
|
|
||||||
- &jemalloc
|
- &jemalloc
|
||||||
name: --with-jemalloc
|
name: --with-jemalloc
|
||||||
<<: *gcc-8
|
<<: *gcc-8
|
||||||
|
@ -453,6 +456,8 @@ before_script:
|
||||||
- echo JOBS=${JOBS} SETARCH=${SETARCH}
|
- echo JOBS=${JOBS} SETARCH=${SETARCH}
|
||||||
- $SETARCH uname -a
|
- $SETARCH uname -a
|
||||||
- $SETARCH uname -r
|
- $SETARCH uname -r
|
||||||
|
- ip a
|
||||||
|
- cat /etc/hosts
|
||||||
- rm -fr .ext autom4te.cache
|
- rm -fr .ext autom4te.cache
|
||||||
- echo $TERM
|
- echo $TERM
|
||||||
- |-
|
- |-
|
||||||
|
|
11
tool/travis_disable_ipv6.sh
Executable file
11
tool/travis_disable_ipv6.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
ip a
|
||||||
|
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
||||||
|
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
||||||
|
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
|
||||||
|
ip a
|
||||||
|
|
||||||
|
cat /etc/hosts
|
||||||
|
sudo ruby -e "hosts = File.read('/etc/hosts').sub(/^::1\s*localhost.*$/, ''); File.write('/etc/hosts', hosts)"
|
||||||
|
cat /etc/hosts
|
Loading…
Add table
Add a link
Reference in a new issue