[ruby/irb] Change debug test workaround only enabled when output is
[ruby.git] / .travis.yml
blob06de3dd493263f767b8ea4b53a7599186d93e647
1 # -*- YAML -*-
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
7 # details.
9 # When you see Travis CI issues, or you are interested in understanding how to
10 # manage, please check the link below.
11 # https://github.com/ruby/ruby/wiki/CI-Servers#travis-ci
13 # We enable Travis on the specific branches or forked repositories here.
14 if: >-
15   (repo != ruby/ruby OR branch = master OR branch =~ /^ruby_\d_\d$/)
16   AND (commit_message !~ /\[DOC\]/)
18 language: c
20 os: linux
22 dist: jammy
24 git:
25   quiet: true
27 env:
28   global:
29     - NPROC="$(nproc)"
30     - JOBS="-j${NPROC}"
31     # SETARCH are overridden when necessary. See below.
32     - SETARCH=
33     # https://github.com/travis-ci/travis-build/blob/e411371dda21430a60f61b8f3f57943d2fe4d344/lib/travis/build/bash/travis_apt_get_options.bash#L7
34     - travis_apt_get_options='--allow-downgrades --allow-remove-essential --allow-change-held-packages'
35     - travis_apt_get_options="-yq --no-install-suggests --no-install-recommends $travis_apt_get_options"
36     # -g0 disables backtraces when SEGV. Do not set that.
37     - debugflags=-ggdb3
38     - RUBY_TESTOPTS="$JOBS -q --tty=no"
40 .org.ruby-lang.ci.matrix-definitions:
41   - &gcc-11
42     compiler: gcc-11
43     before_install:
44       - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
45       - >-
46         tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
47         gcc-11
48         g++-11
49         libffi-dev
50         libncurses-dev
51         libncursesw5-dev
52         libreadline-dev
53         libssl-dev
54         libyaml-dev
55         openssl
56         zlib1g-dev
57       - gcc-11 --version
58   - &arm64-linux
59     name: arm64-linux
60     arch: arm64
61     <<: *gcc-11
62   - &ppc64le-linux
63     name: ppc64le-linux
64     arch: ppc64le
65     <<: *gcc-11
66   - &s390x-linux
67     name: s390x-linux
68     arch: s390x
69     <<: *gcc-11
70     env:
71       # Avoid possible test failures with the zlib applying the following patch
72       # on s390x CPU architecture.
73       # https://github.com/madler/zlib/pull/410
74       - DFLTCC=0
75   - &arm32-linux
76     name: arm32-linux
77     arch: arm64
78     # https://packages.ubuntu.com/jammy/crossbuild-essential-armhf
79     compiler: arm-linux-gnueabihf-gcc
80     env:
81       - SETARCH='setarch linux32 --verbose --32bit'
82       # Still keep the -O1 for only arm32, while we want to test with the
83       # default optflags -O3.
84       # Because bootstraptest/test_ractor.rb fails with segfualt with the
85       # default -O3.
86       # https://bugs.ruby-lang.org/issues/19981
87       - optflags=-O1
88     before_install:
89       - sudo dpkg --add-architecture armhf
90       - tool/travis_retry.sh sudo bash -c "rm -rf '${TRAVIS_ROOT}/var/lib/apt/lists/'* && exec apt-get update -yq"
91       - >-
92         tool/travis_retry.sh sudo -E apt-get $travis_apt_get_options install
93         crossbuild-essential-armhf
94         libc6:armhf
95         libstdc++-10-dev:armhf
96         libffi-dev:armhf
97         libncurses-dev:armhf
98         libncursesw5-dev:armhf
99         libreadline-dev:armhf
100         libssl-dev:armhf
101         libyaml-dev:armhf
102         linux-libc-dev:armhf
103         zlib1g-dev:armhf
105 matrix:
106   include:
107     - <<: *arm64-linux
108     - <<: *ppc64le-linux
109     - <<: *s390x-linux
110     # FIXME: lib/rubygems/util.rb:104 glob_files_in_dir -
111     # <internal:dir>:411:in glob: File name too long - (Errno::ENAMETOOLONG)
112     # https://github.com/rubygems/rubygems/issues/7132
113     - <<: *arm32-linux
114   allow_failures:
115     # Allow failures for the unstable jobs.
116     # - name: arm64-linux
117     - name: ppc64le-linux
118     - name: s390x-linux
119     # The 2nd arm64 pipeline may be unstable.
120     # - name: arm32-linux
121   fast_finish: true
123 before_script:
124   - lscpu
125   - ./autogen.sh
126   - mkdir build
127   - cd build
128   - $SETARCH ../configure -C --disable-install-doc --prefix=$(pwd)/install
129   - $SETARCH make -s $JOBS
130   - make -s $JOBS install
131   # Useful info to report issues to the Ruby.
132   - $SETARCH $(pwd)/install/bin/ruby -v
133   # Useful info To report issues to the RubyGems.
134   - $SETARCH $(pwd)/install/bin/gem env
136 script:
137   - $SETARCH make -s test
138   - ../tool/travis_wait.sh $SETARCH make -s test-all RUBYOPT="-w"
139   - ../tool/travis_wait.sh $SETARCH make -s test-spec
141 # We want to be notified when something happens.
142 notifications:
143   webhooks:
144     urls:
145       # ruby-lang slack: ruby/simpler-alerts-bot (travis)
146       - secure: mRsoS/UbqDkKkW5p3AEqM27d4SZnV6Gsylo3bm8T/deltQzTsGzZwrm7OIBXZv0UFZdE68XmPlyHfZFLSP2V9QZ7apXMf9/vw0GtcSe1gchtnjpAPF6lYBn7nMCbVPPx9cS0dwL927fjdRM1vj7IKZ2bk4F0lAJ25R25S6teqdk=
147     on_success: never
148     on_failure: always
149   email:
150     recipients:
151       - jaruga@ruby-lang.org
152     on_success: never
153     on_failure: always