summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 444c1c0d7903862f62ab813a25ad5b283128cfef (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
# vim ft=yaml
# travis-ci.org definition

sudo: false
dist: trusty

git:
  depth: 2

language: cpp
os:
  - linux
  - osx
osx_image: xcode9.1
compiler:
  - gcc
  - clang

cache:
  apt: true
  ccache: true # Does not currently work for clang builds: https://github.com/travis-ci/travis-ci/issues/6201
  directories:
    - /usr/local/Cellar # Fails do to permission error: https://github.com/travis-ci/travis-ci/issues/8092

env:
  matrix:
    - GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
    - GCC_VERSION=5   TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
    - GCC_VERSION=6   TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
    - GCC_VERSION=6   TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles

matrix:
  exclude:
    - os: osx
      compiler: gcc
  include:
    - os: linux
      compiler: gcc
      env:
        - DebPackages
      addons:
        apt:
          packages: # make sure these match debian/control contents
            - bison
            - chrpath
            - cmake
            - debhelper
            - dh-apparmor
            - dpatch
            - gdb
            - libaio-dev
            - libboost-dev
            - libcurl3-dev
            - libdbd-mysql
            - libjudy-dev
            - libncurses5-dev
            - libpam0g-dev
            - libpcre3-dev
            - libreadline-gplv2-dev
            - libstemmer-dev
            - libssl-dev
            - libnuma-dev
            - libxml2-dev
            - lsb-release
            - perl
            - po-debconf
            - psmisc
            - zlib1g-dev
            - libcrack2-dev
            - cracklib-runtime
            - libjemalloc-dev
            - libsnappy-dev
            - liblzma-dev
            - libzmq-dev
            - libdistro-info-perl
            - uuid-dev
            - devscripts
            - fakeroot
      script:
        - ${CC} --version ; ${CXX} --version
      # https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
      # in trusty containers
        - export MTR_MEM=/tmp
        - env DEB_BUILD_OPTIONS="parallel=6" debian/autobake-deb.sh;
        - ccache --show-stats
  # Until OSX becomes a bit more stable: MDEV-12435
  allow_failures:
    - os: osx
      compiler: clang
      env: GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
    - os: osx
      compiler: clang
      env: GCC_VERSION=5   TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
    - os: osx
      compiler: clang
      env: GCC_VERSION=6   TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
    - os: osx
      compiler: clang
      env: GCC_VERSION=6   TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
      - llvm-toolchain-trusty-4.0
      - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
    packages: # make sure these include all compilers and all build dependencies (see list above)
      - gcc-5
      - g++-5
      - gcc-6
      - g++-6
      - clang-4.0
      - llvm-4.0-dev
      - clang-5.0
      - llvm-5.0-dev
      - libasan0
      - bison
      - chrpath
      - cmake
      - gdb
      - libaio-dev
      - libboost-dev
      - libcurl3-dev
      - libdbd-mysql
      - libjudy-dev
      - libncurses5-dev
      - libpam0g-dev
      - libpcre3-dev
      - libreadline-gplv2-dev
      - libstemmer-dev
      - libssl-dev
      - libnuma-dev
      - libxml2-dev
      - lsb-release
      - perl
      - psmisc
      - zlib1g-dev
      - libcrack2-dev
      - cracklib-runtime
      - libjemalloc-dev
      - libsnappy-dev
      - liblzma-dev
      - libzmq-dev
      - uuid-dev

# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882

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

script:
  - ccache --version
# Clang:
#   mroonga just generates too many warnings with clang and travis stops the job
#   tokudb has fatal warnings
  - source .travis.compiler.sh
  - cmake .
           -DCMAKE_BUILD_TYPE=${TYPE}
           ${CMAKE_OPT}
           -DWITH_SSL=system -DWITH_ZLIB=system -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=ON
  - make -j 6
  - cd mysql-test
# With ASAN --thread-stack=400K to account for overhead
# Test timeout needs to be 10(minutes) or less due to travis out timeout
  - ./mtr --force --max-test-fail=20 --parallel=6 --testcase-timeout=2
         --suite=${MYSQL_TEST_SUITES}
         --skip-test-list=unstable-tests
         --skip-test=binlog.binlog_unsafe
  - ccache --show-stats

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