2018-12-27 09:12:09 +03:00
|
|
|
# -*- YAML -*-
|
2012-08-21 12:10:37 +04:00
|
|
|
# Copyright (C) 2011 Urabe, Shyouhei. All rights reserved.
|
|
|
|
#
|
|
|
|
# This file is a part of the programming language Ruby. Permission is hereby
|
|
|
|
# granted, to either redistribute or modify this file, provided that the
|
|
|
|
# conditions mentioned in the file COPYING are met. Consult the file for
|
|
|
|
# details.
|
2012-05-21 07:45:52 +04:00
|
|
|
|
2012-08-21 12:10:37 +04:00
|
|
|
# This is a Travis-CI build configuration file. The list of configurations
|
|
|
|
# available is located in
|
|
|
|
#
|
|
|
|
# http://about.travis-ci.org/docs/user/build-configuration/
|
|
|
|
#
|
|
|
|
# and as Ruby itself is a project written in C language,
|
|
|
|
#
|
|
|
|
# http://about.travis-ci.org/docs/user/languages/c/
|
|
|
|
#
|
|
|
|
# is also a good place to look at.
|
2011-11-26 10:26:44 +04:00
|
|
|
|
2012-08-21 12:10:37 +04:00
|
|
|
language: c
|
2018-11-14 03:43:45 +03:00
|
|
|
|
2019-09-02 19:11:18 +03:00
|
|
|
os: linux
|
|
|
|
|
2018-11-13 05:03:33 +03:00
|
|
|
dist: xenial
|
2018-11-14 03:43:45 +03:00
|
|
|
|
2018-11-14 07:50:59 +03:00
|
|
|
git:
|
|
|
|
quiet: true
|
|
|
|
|
2018-11-15 05:25:25 +03:00
|
|
|
cache:
|
|
|
|
ccache: true
|
|
|
|
directories:
|
2018-11-28 03:49:24 +03:00
|
|
|
- $HOME/config_2nd
|
2018-11-29 08:26:05 +03:00
|
|
|
- $HOME/.downloaded-cache
|
2018-11-14 03:43:45 +03:00
|
|
|
|
2018-11-13 07:55:43 +03:00
|
|
|
env:
|
|
|
|
global:
|
2019-09-02 19:11:18 +03:00
|
|
|
# Reset timestamps early
|
2019-08-10 10:33:32 +03:00
|
|
|
- _=$(touch NEWS && find . -type f -exec touch -r NEWS {} +)
|
2018-11-28 03:49:24 +03:00
|
|
|
- CONFIGURE_TTY=no
|
|
|
|
- CCACHE_COMPILERCHECK=none
|
|
|
|
- CCACHE_NOCOMPRESS=1
|
|
|
|
- CCACHE_MAXSIZE=512Mi
|
2019-09-02 19:01:47 +03:00
|
|
|
- NPROC="`nproc`"
|
2018-11-15 10:37:05 +03:00
|
|
|
# JOBS and SETARCH are overridden when necessary; see below.
|
2018-11-28 03:49:24 +03:00
|
|
|
- JOBS=-j$((1+${NPROC}))
|
|
|
|
- SETARCH=
|
2018-11-28 17:08:34 +03:00
|
|
|
- RUBY_PREFIX=/tmp/ruby-prefix
|
|
|
|
- GEMS_FOR_TEST='timezone tzinfo'
|
2019-05-19 10:24:33 +03:00
|
|
|
- UPDATE_UNICODE="UNICODE_FILES=. UNICODE_PROPERTY_FILES=. UNICODE_AUXILIARY_FILES=. UNICODE_EMOJI_FILES=."
|
2020-01-07 06:23:04 +03:00
|
|
|
- BEFORE_INSTALL=true
|
2019-08-05 18:01:05 +03:00
|
|
|
# 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'
|
2019-08-10 09:48:39 +03:00
|
|
|
- travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
|
2018-11-14 03:43:45 +03:00
|
|
|
|
2018-11-06 04:36:20 +03:00
|
|
|
.org.ruby-lang.ci.matrix-definitions:
|
|
|
|
|
|
|
|
- &make-test-only
|
|
|
|
script:
|
2018-11-28 03:49:24 +03:00
|
|
|
- $SETARCH make -s test TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
|
2018-11-06 04:36:20 +03:00
|
|
|
|
2019-08-05 18:01:05 +03:00
|
|
|
- &gcc-8
|
|
|
|
compiler: gcc-8
|
2019-08-31 11:34:23 +03:00
|
|
|
# # Not using addon to control retries
|
|
|
|
# addons:
|
|
|
|
# apt:
|
|
|
|
# sources:
|
|
|
|
# - ubuntu-toolchain-r-test
|
2019-08-05 18:01:05 +03:00
|
|
|
before_install:
|
2020-01-07 06:23:04 +03:00
|
|
|
- bash -cx "${BEFORE_INSTALL}"
|
2019-08-31 11:34:23 +03:00
|
|
|
- tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
2019-08-31 11:18:00 +03:00
|
|
|
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
|
2020-02-26 07:20:56 +03:00
|
|
|
- >-
|
|
|
|
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
|
|
|
|
ccache
|
|
|
|
gcc-8
|
|
|
|
g++-8
|
|
|
|
libffi-dev
|
|
|
|
libgdbm-dev
|
|
|
|
libncurses5-dev
|
|
|
|
libncursesw5-dev
|
|
|
|
libreadline6-dev
|
|
|
|
libssl-dev
|
|
|
|
libyaml-dev
|
|
|
|
openssl
|
|
|
|
zlib1g-dev
|
2019-08-05 18:01:05 +03:00
|
|
|
|
2019-04-26 07:32:55 +03:00
|
|
|
- &clang-8
|
|
|
|
compiler: clang-8
|
|
|
|
addons:
|
|
|
|
apt:
|
2019-08-07 15:47:03 +03:00
|
|
|
# Not doing this manually unlike other sources, because it has been stable.
|
2019-04-26 07:32:55 +03:00
|
|
|
sources:
|
|
|
|
- llvm-toolchain-xenial-8
|
2019-08-07 15:47:03 +03:00
|
|
|
config:
|
|
|
|
retries: true
|
2019-08-05 18:01:05 +03:00
|
|
|
before_install:
|
2019-08-12 14:20:37 +03:00
|
|
|
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
|
2020-02-26 07:20:56 +03:00
|
|
|
- >-
|
|
|
|
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
|
|
|
|
clang-8
|
|
|
|
llvm-8-tools
|
|
|
|
libffi-dev
|
|
|
|
libgdbm-dev
|
|
|
|
libncurses5-dev
|
|
|
|
libncursesw5-dev
|
|
|
|
libreadline6-dev
|
|
|
|
libssl-dev
|
|
|
|
libyaml-dev
|
|
|
|
openssl
|
|
|
|
zlib1g-dev
|
2019-04-26 07:32:55 +03:00
|
|
|
|
2018-11-06 04:36:20 +03:00
|
|
|
# --------
|
|
|
|
|
|
|
|
- &x86_64-linux
|
|
|
|
name: x86_64-linux
|
2019-08-05 18:01:05 +03:00
|
|
|
<<: *gcc-8
|
2018-11-06 04:36:20 +03:00
|
|
|
|
2019-10-16 06:59:40 +03:00
|
|
|
- &arm64-linux
|
|
|
|
name: arm64-linux
|
|
|
|
arch: arm64
|
|
|
|
<<: *gcc-8
|
|
|
|
|
2019-12-06 19:27:58 +03:00
|
|
|
- &s390x-linux
|
|
|
|
name: s390x-linux
|
|
|
|
arch: s390x
|
|
|
|
<<: *gcc-8
|
2020-01-07 06:23:04 +03:00
|
|
|
|
2018-11-06 04:36:20 +03:00
|
|
|
- &i686-linux
|
|
|
|
name: i686-linux
|
2019-08-05 18:01:05 +03:00
|
|
|
compiler: gcc-8
|
2018-11-06 04:36:20 +03:00
|
|
|
env:
|
2018-11-28 03:49:24 +03:00
|
|
|
- GCC_FLAGS=-m32
|
2019-09-07 12:41:34 +03:00
|
|
|
- CXX='g++-8 -m32'
|
2018-11-28 03:49:24 +03:00
|
|
|
- debugflags=-g0
|
|
|
|
- SETARCH='setarch i686 --verbose --3gb'
|
2019-08-06 19:26:02 +03:00
|
|
|
# # Not using addon to control retries
|
|
|
|
# addons:
|
|
|
|
# apt:
|
|
|
|
# sources:
|
|
|
|
# - ubuntu-toolchain-r-test
|
2019-08-05 18:01:05 +03:00
|
|
|
before_install:
|
2019-08-12 08:35:49 +03:00
|
|
|
- tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
2019-08-12 14:20:37 +03:00
|
|
|
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
|
2020-02-26 07:20:56 +03:00
|
|
|
- >-
|
|
|
|
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
|
|
|
|
gcc-8-multilib
|
|
|
|
g++-8
|
|
|
|
g++-8-multilib
|
|
|
|
libstdc++-8-dev:i386
|
|
|
|
libffi-dev:i386
|
|
|
|
libffi6:i386
|
|
|
|
libgdbm-dev:i386
|
|
|
|
libgdbm3:i386
|
|
|
|
libncurses5-dev:i386
|
|
|
|
libncurses5:i386
|
|
|
|
libncursesw5-dev:i386
|
|
|
|
libreadline6-dev:i386
|
|
|
|
libreadline6:i386
|
|
|
|
libssl-dev:i386
|
|
|
|
libssl1.0.0:i386
|
|
|
|
linux-libc-dev:i386
|
|
|
|
zlib1g-dev:i386
|
|
|
|
zlib1g:i386
|
2018-11-06 04:36:20 +03:00
|
|
|
|
2019-10-15 18:08:00 +03:00
|
|
|
- &arm32-linux
|
|
|
|
name: arm32-linux
|
|
|
|
arch: arm64
|
|
|
|
# https://packages.ubuntu.com/xenial/crossbuild-essential-armhf
|
|
|
|
compiler: arm-linux-gnueabihf-gcc
|
|
|
|
env:
|
|
|
|
- debugflags=-g0
|
|
|
|
- SETARCH='setarch linux32 --verbose --32bit'
|
|
|
|
before_install:
|
|
|
|
- sudo dpkg --add-architecture armhf
|
|
|
|
- tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
|
2020-02-26 07:20:56 +03:00
|
|
|
- >-
|
|
|
|
tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
|
|
|
|
ccache
|
|
|
|
crossbuild-essential-armhf
|
|
|
|
libc6:armhf
|
|
|
|
libstdc++-5-dev:armhf
|
|
|
|
libffi-dev:armhf
|
|
|
|
libffi6:armhf
|
|
|
|
libgdbm-dev:armhf
|
|
|
|
libgdbm3:armhf
|
|
|
|
libncurses5-dev:armhf
|
|
|
|
libncurses5:armhf
|
|
|
|
libncursesw5-dev:armhf
|
|
|
|
libreadline6-dev:armhf
|
|
|
|
libreadline6:armhf
|
|
|
|
libssl-dev:armhf
|
|
|
|
libssl1.0.0:armhf
|
|
|
|
linux-libc-dev:armhf
|
|
|
|
zlib1g-dev:armhf
|
|
|
|
zlib1g:armhf
|
2019-10-15 18:08:00 +03:00
|
|
|
|
2018-09-09 15:48:33 +03:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-08-18 13:09:40 +03:00
|
|
|
# Build every commit:
|
2018-11-06 04:36:20 +03:00
|
|
|
- <<: *i686-linux
|
2019-08-18 13:09:40 +03:00
|
|
|
# Build every commit (Allowed Failures):
|
2020-05-03 23:58:54 +03:00
|
|
|
- <<: *arm32-linux
|
|
|
|
- <<: *arm64-linux
|
|
|
|
- <<: *s390x-linux
|
2019-04-14 08:52:14 +03:00
|
|
|
allow_failures:
|
2020-03-19 04:20:02 +03:00
|
|
|
- name: arm32-linux
|
2020-03-19 04:48:00 +03:00
|
|
|
- name: arm64-linux
|
2020-05-03 23:58:54 +03:00
|
|
|
- name: s390x-linux
|
2018-11-06 04:36:20 +03:00
|
|
|
fast_finish: true
|
2014-09-20 06:55:27 +04:00
|
|
|
|
2012-08-21 12:10:37 +04:00
|
|
|
before_script:
|
2020-04-05 05:53:07 +03:00
|
|
|
- rm -fr .ext autom4te.cache
|
2018-11-29 08:26:05 +03:00
|
|
|
- |-
|
|
|
|
[ -d ~/.downloaded-cache ] ||
|
|
|
|
mkdir ~/.downloaded-cache
|
|
|
|
- ln -s ~/.downloaded-cache
|
2017-05-23 15:42:40 +03:00
|
|
|
- "> config.status"
|
2018-12-28 07:23:39 +03:00
|
|
|
- "> .rbconfig.time"
|
2019-06-07 03:09:29 +03:00
|
|
|
- sed -f tool/prereq.status template/Makefile.in common.mk > Makefile
|
2020-02-26 06:33:43 +03:00
|
|
|
- make touch-unicode-files
|
|
|
|
- make -s $JOBS $UPDATE_UNICODE up
|
|
|
|
- make -s $JOBS srcs
|
2018-12-28 07:28:16 +03:00
|
|
|
- rm -f config.status Makefile rbconfig.rb .rbconfig.time
|
2018-11-15 05:25:25 +03:00
|
|
|
- |-
|
|
|
|
if [ -d ~/config_2nd ]; then
|
|
|
|
cp -pr ~/config_2nd build
|
|
|
|
else
|
|
|
|
mkdir build
|
|
|
|
fi
|
2018-11-28 03:49:24 +03:00
|
|
|
- mkdir config_1st config_2nd
|
|
|
|
- chmod -R a-w .
|
|
|
|
- chmod -R u+w build config_1st config_2nd
|
|
|
|
- cd build
|
2018-11-15 05:25:25 +03:00
|
|
|
- |-
|
2019-10-16 18:28:53 +03:00
|
|
|
case "$CC" in
|
|
|
|
gcc*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-diagnostics-color";;
|
|
|
|
clang*) CC="ccache $CC${GCC_FLAGS:+ }$GCC_FLAGS -fno-color-diagnostics";;
|
|
|
|
esac
|
2018-11-28 03:49:24 +03:00
|
|
|
- |-
|
|
|
|
[ ! -f config.cache ] ||
|
|
|
|
[ "$CC" = "`sed -n s/^ac_cv_prog_CC=//p config.cache`" ] ||
|
|
|
|
(set -x; exec rm config.cache)
|
2018-11-28 17:08:34 +03:00
|
|
|
- $SETARCH ../configure -C --disable-install-doc --prefix=$RUBY_PREFIX $CONFIG_FLAG
|
2018-11-28 03:49:24 +03:00
|
|
|
- cp -pr config.cache config.status .ext/include ../config_1st
|
|
|
|
- $SETARCH make reconfig
|
|
|
|
- cp -pr config.cache config.status .ext/include ../config_2nd
|
|
|
|
- (cd .. && exec diff -ru config_1st config_2nd)
|
|
|
|
- chmod u+w ..
|
2018-12-04 16:15:24 +03:00
|
|
|
- rm -rf ~/config_2nd
|
2018-11-28 03:49:24 +03:00
|
|
|
- mv ../config_2nd ~
|
|
|
|
- chmod u-w ..
|
2019-03-29 15:55:07 +03:00
|
|
|
- $SETARCH make -s $JOBS
|
2020-02-26 06:39:16 +03:00
|
|
|
- make -s install
|
2018-11-29 05:47:36 +03:00
|
|
|
- |-
|
|
|
|
[ -z "${GEMS_FOR_TEST}" ] ||
|
|
|
|
$RUBY_PREFIX/bin/gem install --no-document $GEMS_FOR_TEST
|
2019-06-11 06:32:13 +03:00
|
|
|
- echo "raise 'do not load ~/.irbrc in test'" > ~/.irbrc
|
2016-09-28 04:49:16 +03:00
|
|
|
|
2013-04-18 17:55:45 +04:00
|
|
|
script:
|
2019-08-10 13:49:21 +03:00
|
|
|
- $SETARCH make -s test -o showflags TESTOPTS="${TESTOPTS=$JOBS -q --tty=no}"
|
2019-08-12 07:45:55 +03:00
|
|
|
- travis_wait 50 $SETARCH make -s test-all -o exts TESTOPTS="${TESTOPTS} ${TEST_ALL_OPTS}" RUBYOPT="-w"
|
2019-04-14 08:52:14 +03:00
|
|
|
- $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
|
2019-08-10 13:49:21 +03:00
|
|
|
- $SETARCH make -s -o showflags leaked-globals
|
2012-08-21 12:10:37 +04:00
|
|
|
|
|
|
|
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
|
2013-04-18 22:04:11 +04:00
|
|
|
branches:
|
|
|
|
only:
|
2019-06-30 18:14:11 +03:00
|
|
|
- master
|
2016-12-23 19:09:09 +03:00
|
|
|
- ruby_2_4
|
2017-12-25 10:56:46 +03:00
|
|
|
- ruby_2_5
|
2018-12-25 02:12:07 +03:00
|
|
|
- ruby_2_6
|
2020-02-26 06:31:44 +03:00
|
|
|
- ruby_2_7
|
2012-08-03 11:41:18 +04:00
|
|
|
|
2012-08-21 12:10:37 +04:00
|
|
|
# We want to be notified when something happens.
|
2013-04-18 22:04:11 +04:00
|
|
|
notifications:
|
|
|
|
irc:
|
|
|
|
channels:
|
2016-10-05 15:36:40 +03:00
|
|
|
- "chat.freenode.net#ruby-core"
|
2013-04-18 22:04:11 +04:00
|
|
|
on_success: change # [always|never|change] # default: always
|
2016-01-12 20:10:27 +03:00
|
|
|
on_failure: always # [always|never|change] # default: always
|
2013-04-18 22:04:11 +04:00
|
|
|
template:
|
|
|
|
- "%{message} by @%{author}: See %{build_url}"
|
2012-08-21 12:10:37 +04:00
|
|
|
|
2020-03-07 11:16:21 +03:00
|
|
|
webhooks:
|
|
|
|
urls:
|
2020-03-10 08:31:50 +03:00
|
|
|
- secure: mRsoS/UbqDkKkW5p3AEqM27d4SZnV6Gsylo3bm8T/deltQzTsGzZwrm7OIBXZv0UFZdE68XmPlyHfZFLSP2V9QZ7apXMf9/vw0GtcSe1gchtnjpAPF6lYBn7nMCbVPPx9cS0dwL927fjdRM1vj7IKZ2bk4F0lAJ25R25S6teqdk= # ruby-lang slack: ruby/simpler-alerts-bot (travis)
|
2020-03-07 11:16:21 +03:00
|
|
|
on_success: never
|
|
|
|
on_failure: always
|
|
|
|
|
2017-08-02 05:19:04 +03:00
|
|
|
email:
|
|
|
|
- ko1c-failure@atdot.net
|