2 # Copyright (C) 2011 Urabe, Shyouhei. All rights reserved.
4 # This file is a part of the programming language Ruby. Permission is hereby
5 # granted, to either redistribute or modify this file, provided that the
6 # conditions mentioned in the file COPYING are met. Consult the file for
9 # We only manage non-amd64 free pipelines.
10 # https://docs.travis-ci.com/user/billing-overview/
16 if: commit_message !~ /^\[DOC\]/
27 - $HOME/.downloaded-cache
31 # The tests skipped in `make test-all`.
32 - TEST_ALL_SKIPPED_TESTS=
33 # The tests executed separately by `make test-all`.
34 - TEST_ALL_SEPARATED_TESTS=
35 # Reset timestamps early
36 - _=$(touch NEWS && find . -type f -exec touch -r NEWS {} +)
38 - CCACHE_COMPILERCHECK=none
40 - CCACHE_MAXSIZE=512Mi
42 # JOBS and SETARCH are overridden when necessary; see below.
43 - JOBS=-j$((1+${NPROC}))
45 - RUBY_PREFIX=/tmp/ruby-prefix
46 - GEMS_FOR_TEST='timezone tzinfo'
47 # https://github.com/travis-ci/travis-build/blob/e411371dda21430a60f61b8f3f57943d2fe4d344/lib/travis/build/bash/travis_apt_get_options.bash#L7
48 - travis_apt_get_options='--allow-downgrades --allow-remove-essential --allow-change-held-packages'
49 - travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
50 # -O1 is faster than -O3 in our tests.
52 # -g0 disables backtraces when SEGV. Do not set that.
55 .org.ruby-lang.ci.matrix-definitions:
60 - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
62 tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
96 # https://packages.ubuntu.com/focal/crossbuild-essential-armhf
97 compiler: arm-linux-gnueabihf-gcc
99 - SETARCH='setarch linux32 --verbose --32bit'
100 # The "TestReadline#test_interrupt_in_other_thread" started failing on arm32
101 # from https://www.travis-ci.com/github/ruby/ruby/jobs/529005145
102 - TEST_ALL_SKIPPED_TESTS=test_interrupt_in_other_thread
104 - sudo dpkg --add-architecture armhf
105 - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
107 tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
109 crossbuild-essential-armhf
111 libstdc++-10-dev:armhf
115 libncursesw5-dev:armhf
116 libreadline-dev:armhf
123 # Build every commit (Allowed Failures):
125 # Comment out as the 2nd arm64 pipeline is unstable.
130 # We see multiple errors indicating errors on the Travis environment itself in a short while:
131 # https://app.travis-ci.com/github/ruby/ruby/jobs/544382885
132 # https://app.travis-ci.com/github/ruby/ruby/jobs/544361370
133 # It's not a fault of Ruby's arm32 support but just Travis arm32 seems unsable.
135 # - name: arm64-linux
136 # We see "Some worker was crashed." in about 40% of recent ppc64le-linux jobs
137 # e.g. https://app.travis-ci.com/github/ruby/ruby/jobs/530959548
138 - name: ppc64le-linux
139 # Tentatively disable, because often hungs up **after** all tests
140 # have finished successfully and saving caches.
145 - . tool/ci_functions.sh
147 if [ -n "${TEST_ALL_SKIPPED_TESTS}" ]; then
148 TEST_ALL_OPTS="${TEST_ALL_OPTS} $(ci_to_excluded_test_opts "${TEST_ALL_SKIPPED_TESTS}")"
149 if [ -z "${TEST_ALL_SEPARATED_TESTS}" ]; then
150 TEST_ALL_SEPARATED_TESTS="${TEST_ALL_SKIPPED_TESTS}"
154 if [ -n "${TEST_ALL_SEPARATED_TESTS}" ]; then
155 TEST_ALL_OPTS_SEPARATED="$(ci_to_included_test_opts "${TEST_ALL_SEPARATED_TESTS}")"
157 - echo TEST_ALL_OPTS="${TEST_ALL_OPTS}" TEST_ALL_OPTS_SEPARATED="${TEST_ALL_OPTS_SEPARATED}"
158 - rm -fr .ext autom4te.cache
160 [ -d ~/.downloaded-cache ] ||
161 mkdir ~/.downloaded-cache
162 - ln -s ~/.downloaded-cache
165 - sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
168 - rm -f config.status Makefile rbconfig.rb .rbconfig.time
170 if [ -d ~/config_2nd ]; then
171 cp -pr ~/config_2nd build
175 - mkdir config_1st config_2nd
177 - chmod -R u+w build config_1st config_2nd
181 gcc*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-diagnostics-color";;
182 clang*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-color-diagnostics";;
185 [ ! -f config.cache ] ||
186 [ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
187 (set -x; exec rm config.cache)
188 - $SETARCH ../configure -C --disable-install-doc --prefix=$RUBY_PREFIX $CONFIG_FLAG
189 - cp -pr config.cache config.status .ext/include ../config_1st
190 - $SETARCH make reconfig
191 - cp -pr config.cache config.status .ext/include ../config_2nd
192 - (cd .. && exec diff -ru config_1st config_2nd)
194 - rm -rf ~/config_2nd
197 - $SETARCH make -s $JOBS
200 [ -z "${GEMS_FOR_TEST}" ] ||
201 $RUBY_PREFIX/bin/gem install --no-document $GEMS_FOR_TEST
202 - echo "raise 'do not load ~/.irbrc in test'" > ~/.irbrc
205 - $SETARCH make -s test -o showflags TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
206 - ../tool/travis_wait.sh $SETARCH make -s test-all -o exts TESTOPTS="$JOBS -q --tty=no ${TEST_ALL_OPTS}" RUBYOPT="-w"
207 # Run the failing tests separately returning ok status to check if it works,
210 if [ -n "${TEST_ALL_OPTS_SEPARATED}" ]; then
211 $SETARCH make -s test-all -o exts TESTOPTS="$JOBS -v --tty=no ${TEST_ALL_OPTS_SEPARATED}" RUBYOPT="-w" || :
213 - $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
214 - $SETARCH make -s -o showflags leaked-globals
216 # We enable Travis on the specific branches or forked repositories here.
217 if: (repo = ruby/ruby AND (branch = master OR branch =~ /^ruby_\d_\d$/)) OR repo != ruby/ruby
219 # We want to be notified when something happens.
223 - "chat.freenode.net#ruby-core"
224 on_success: change # [always|never|change] # default: always
225 on_failure: always # [always|never|change] # default: always
227 - "%{message} by @%{author}: See %{build_url}"
231 - secure: mRsoS/UbqDkKkW5p3AEqM27d4SZnV6Gsylo3bm8T/deltQzTsGzZwrm7OIBXZv0UFZdE68XmPlyHfZFLSP2V9QZ7apXMf9/vw0GtcSe1gchtnjpAPF6lYBn7nMCbVPPx9cS0dwL927fjdRM1vj7IKZ2bk4F0lAJ25R25S6teqdk= # ruby-lang slack: ruby/simpler-alerts-bot (travis)
236 - jaruga@ruby-lang.org