summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 863f3223196063148b089a6900a1064b8ffa718e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# vim ft=yaml
# travis-ci.org definition

# NOTE TO MERGERS: Most of the contents in the Travis-CI configuration has been
# tailored for a specific release or MariaDB. As a general rule, do not merge
# changes in this file across MariaDB branches to avoid breaking the CI. Updates
# the the Travis-CI pipeline are most of the time better done manually.

dist: focal

git:
  depth: 2

language: cpp

cache:
  timeout: 500
  apt: true
  ccache: true

addons:
  apt:
    sources: &add-sources
      # Remember to document well what packages each extra repository is used for
      - ubuntu-toolchain-r-test
      # => gcc-9 and gcc-10 for Ubuntu Bionic
      # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages?field.name_filter=&field.status_filter=published&field.series_filter=bionic
      - sourceline: 'ppa:maria-captains/travis-ci-helper-repo'
      # => galera-4 for Ubuntu Bionic
      # https://launchpad.net/~maria-captains/+archive/ubuntu/travis-ci-helper-repo/+packages?field.name_filter=&field.status_filter=published&field.series_filter=bionic
    packages: &common-packages
      # Remember to update this list if the Debian build dependencies are updated
      - bison
      - chrpath
      - clang-7  # In suites: focal, bionic-updates
      - clang-10 # In suites: focal, bionic
      - cmake
      - cracklib-runtime
      - galera-4 # In suites: focal, bionic (via ppa:maria-captains/travis-ci-helper-repo)
      - g++-7    # In suites: focal, bionic
      - g++-10   # In suites: focal, bionic (via ppa:ubuntu-toolchain-r/test)
      - gdb
      - libaio-dev
      - libarchive-dev
      - libboost-atomic-dev
      - libboost-chrono-dev
      - libboost-date-time-dev
      - libboost-dev
      - libboost-filesystem-dev
      - libboost-regex-dev
      - libboost-system-dev
      - libboost-thread-dev
      - libcrack2-dev
      - libcurl4-openssl-dev
      - libdbd-mysql
      - libedit-dev
      - libjemalloc-dev
      - libjudy-dev
      - libkrb5-dev
      - liblz4-dev
      - libncurses5-dev
      - libnuma-dev
      - libpam0g-dev
      - libpcre2-dev
      - libreadline-gplv2-dev
      - libsnappy-dev
      - libssl-dev
      - libxml2-dev
      - lsb-release
      - perl
      - psmisc
      - uuid-dev
      - zlib1g-dev
      # libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
  homebrew:
    # OSX builds are not properly maintained on Travis-CI nor buildbot and
    # thus this list of dependencies is likely to be inaccurate.
    packages:
      - bison
      - boost
      - ccache
      - cmake
      - cracklib
      - curl
      - gnutls
      - groonga
      - jemalloc
      - libxml2
      - lz4
      - lzo
      - ncurses
      - openssl@1.1
      - ossp-uuid
      - pcre2
      - perl
      - pkg-config
      - readline
      - snappy
      - xz
      - zlib
      - zstd

## Build jobs matrix
# The jobs matrix consists of all the combinations of 'arch', 'os', 'compiler'
# and 'env'. Ensure there is a good variation of architectures and at least the
# main suite is run on all architectures, as the main test suite needs to pass
# on all architectures (amd64, arm64, ppc64le, s390x) before a release is made.
#
# In gcc and clang use a fairly old version and one very recent and assume that
# if both of them built successfully all the intermediate version work as well.
arch: amd64
os: linux
compiler:
  - gcc
  - clang
env:
  - CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
  - CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,rocksdb,versioning,rpl
  - CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles,encryption
  - CC_VERSION=10 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main

jobs:
  # Define extra jobs that are run in addition to the main jobs matrix
  include:
    - os: linux
      compiler: gcc
      env: DebPackages=focal
      addons: &deb-addons
        apt:
          sources: *add-sources
          # make sure these match debian/control contents
          packages:
            - *common-packages
            - debhelper
            - devscripts
            - dh-apparmor
            - dh-exec
            - dh-systemd
            - fakeroot
            - libsystemd-dev
            - libzstd-dev
            - po-debconf
            - unixodbc-dev
      script: &deb-script
        - ${CC} --version ; ${CXX} --version
        - apt-cache policy
        - env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
    - os: linux
      dist: bionic
      arch: s390x
      compiler: gcc
      env: DebPackages=bionic
      addons: *deb-addons
      script: *deb-script
      # Just one OS X build is enough
    - os: osx
      osx_image: xcode12u
      compiler: clang
      env: CC_VERSION=10 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
      # Some chosen ones with s390x and gcc
    - os: linux
      arch: s390x
      compiler: gcc
      env: CC_VERSION=10 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
    - os: linux
      arch: s390x
      compiler: gcc
      env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb,versioning,rpl
      # Some chosen ones with s390x and clang
    - os: linux
      arch: s390x
      compiler: clang
      env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
    - os: linux
      arch: s390x
      compiler: clang
      env: CC_VERSION=10 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
    # Extra tests to ensure IBM Power and ARM 64 work
    - os: linux
      arch: ppc64le
      compiler: gcc
      env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
    - os: linux
      arch: arm64
      compiler: gcc
      env: CC_VERSION=7 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main

  allow_failures:
    # Permanently fails on main.column_compression 'innodb' test (MDEV-23954)
    - os: linux
      arch: s390x
      compiler: gcc
      env: CC_VERSION=10 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
    # Until OSX becomes a bit more stable
    - os: osx
    # ppc64el builder frequently runs out of memory
    - arch: ppc64le

before_install:
  - if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
      brew update;
      brew install gnutls lz4 lzo xz snappy ccache jemalloc curl ossp-uuid pcre zstd;
      brew link ccache;
      export PATH="/usr/local/opt/ccache/libexec:$PATH";
    fi

before_script:
  - df -h
  - ccache --version
  - ccache --show-stats
  - ccache --max-size=5G

script:
# following modules are disabled after sourcing .travis.compiler.sh:
# clang disabled: mroonga just generates too many warnings with clang and travis stops the job
# cland disabled: tokudb has fatal warnings
# gcc/rpl: tokudb and mroonga
  - source .travis.compiler.sh
  - cmake .
           -DCMAKE_BUILD_TYPE=${TYPE}
           ${CMAKE_OPT}
           -DWITH_SSL=system -DWITH_ZLIB=system
  - make -j 4
  - cd mysql-test
  - travis_wait 30 ./mtr --force --max-test-fail=20 --parallel=4 --testcase-timeout=${TEST_CASE_TIMEOUT}
         --suite=${MYSQL_TEST_SUITES}
         --skip-test-list=unstable-tests
         --skip-test=binlog.binlog_unsafe

after_script:
  - ccache --show-stats
  - df -h

notifications:
  irc:
    channels:
      - "chat.freenode.net#maria"
    on_success: never # [always|never|change]
    on_failure: never
    template:
      - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"