blob: 1c8cc2ebf2d86271c58a89278f3ef8d776303bdf [file] [log] [blame]
Bram Moolenaar0600f352015-09-15 19:18:18 +02001language: c
Bram Moolenaar02113ed2017-08-06 17:06:24 +02002dist: trusty
Bram Moolenaar0600f352015-09-15 19:18:18 +02003
Bram Moolenaarb20617b2016-07-30 17:41:49 +02004os:
5 - osx
6 - linux
7
Bram Moolenaar0600f352015-09-15 19:18:18 +02008compiler:
9 - clang
10 - gcc
11
12env:
Bram Moolenaar01a6c212019-02-03 13:13:18 +010013 - &tiny-nogui
14 BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
15 - &tiny
16 BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
17 - &asan # ASAN build
18 BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
Bram Moolenaare67a7d62018-09-05 22:25:50 +020019 FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
20 "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
Bram Moolenaar01a6c212019-02-03 13:13:18 +010021 - &linux-huge
22 BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarade55782018-07-01 21:12:55 +020023 "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
Bram Moolenaar01a6c212019-02-03 13:13:18 +010024 - &unittests
25 BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
26 - &normal
27 BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
28 - &small
29 BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
30 - &osx-huge # Mac OSX build
31 BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarade55782018-07-01 21:12:55 +020032 "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
Bram Moolenaar0600f352015-09-15 19:18:18 +020033
34sudo: false
35
Bram Moolenaar01a6c212019-02-03 13:13:18 +010036# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
Bram Moolenaarb20617b2016-07-30 17:41:49 +020037# exclude some builds on mac os x and linux
Bram Moolenaarb2e54b02019-01-19 13:46:50 +010038# on mac os x "tiny" is always without GUI
Bram Moolenaarb20617b2016-07-30 17:41:49 +020039# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
40matrix:
41 exclude:
42 - os: osx
Bram Moolenaar01a6c212019-02-03 13:13:18 +010043 env: *tiny
Bram Moolenaarb2e54b02019-01-19 13:46:50 +010044 - os: osx
Bram Moolenaar01a6c212019-02-03 13:13:18 +010045 env: *normal
Bram Moolenaarb20617b2016-07-30 17:41:49 +020046 - os: osx
Bram Moolenaar01a6c212019-02-03 13:13:18 +010047 env: *unittests
Bram Moolenaarb20617b2016-07-30 17:41:49 +020048 - os: osx
Bram Moolenaar01a6c212019-02-03 13:13:18 +010049 env: *small
Bram Moolenaarb20617b2016-07-30 17:41:49 +020050 - os: osx
Bram Moolenaar01a6c212019-02-03 13:13:18 +010051 env: *linux-huge
Bram Moolenaar1e076332017-01-26 20:11:12 +010052 - os: osx
Bram Moolenaar01a6c212019-02-03 13:13:18 +010053 env: *asan
Bram Moolenaar1e076332017-01-26 20:11:12 +010054 - os: linux
Bram Moolenaar02113ed2017-08-06 17:06:24 +020055 compiler: clang
Bram Moolenaar01a6c212019-02-03 13:13:18 +010056 env: *asan
Bram Moolenaarb20617b2016-07-30 17:41:49 +020057 - os: linux
58 compiler: clang
Bram Moolenaar01a6c212019-02-03 13:13:18 +010059 env: *unittests
Bram Moolenaarb20617b2016-07-30 17:41:49 +020060 - os: linux
61 compiler: clang
Bram Moolenaar01a6c212019-02-03 13:13:18 +010062 env: *small
Bram Moolenaarb20617b2016-07-30 17:41:49 +020063 - os: linux
Bram Moolenaar01a6c212019-02-03 13:13:18 +010064 env: *osx-huge
Bram Moolenaarb20617b2016-07-30 17:41:49 +020065
Bram Moolenaarc1d20992015-09-25 20:30:58 +020066branches:
67 except:
68 - /^v[0-9]/
69
Bram Moolenaar0600f352015-09-15 19:18:18 +020070addons:
71 apt:
72 packages:
Bram Moolenaar7b5f0a12015-12-30 17:40:43 +010073 - autoconf
Bram Moolenaar9e272172017-11-17 21:25:08 +010074 - clang
Bram Moolenaar0600f352015-09-15 19:18:18 +020075 - lcov
76 - libperl-dev
77 - python-dev
78 - python3-dev
Bram Moolenaarcb25d182017-07-27 21:29:31 +020079 - liblua5.2-dev
80 - lua5.2
Bram Moolenaar02113ed2017-08-06 17:06:24 +020081 - ruby-dev
Bram Moolenaarade55782018-07-01 21:12:55 +020082 - tcl-dev
Bram Moolenaar47247282016-08-02 22:36:02 +020083 - cscope
Bram Moolenaar02113ed2017-08-06 17:06:24 +020084 - libgtk2.0-dev
Bram Moolenaar2339fa32019-01-28 22:59:36 +010085 homebrew:
86 packages:
87 - lua
88 update: true
Bram Moolenaar0600f352015-09-15 19:18:18 +020089
90before_install:
Bram Moolenaar02113ed2017-08-06 17:06:24 +020091 - rvm reset
Bram Moolenaar01a6c212019-02-03 13:13:18 +010092 # Remove /opt/python/3.x.x/bin from $PATH for using system python3.
93 # ("pyenv global system" doesn't seem to work.)
94 - |
95 if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "$(which python3)" =~ ^/opt/python/ ]]; then
96 export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
97 fi
98 - |
99 if [[ "${COVERAGE}" = "yes" ]]; then
100 pip install --user cpp-coveralls
101 fi
102 # needed for https support for coveralls
103 # building cffi only works with gcc, not with clang
104 - |
105 if [[ "${COVERAGE}" = "yes" ]]; then
106 CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
107 fi
108 # Lua is not installed on Travis OSX
109 - |
110 if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
111 export LUA_PREFIX=/usr/local
112 fi
113 # Use llvm-cov instead of gcov when compiler is clang.
114 - |
115 if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
116 ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
117 fi
Bram Moolenaar29a9baa2019-04-11 15:49:11 +0200118 # Need msgfmt 0.19.8 to be able to generate .desktop files
119 - |
120 if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
121 sudo add-apt-repository ppa:ricotz/toolchain -y &&
122 sudo apt-get update -q &&
123 sudo apt-get install gettext=0.19.8.1-1ubuntu2~14.04~ricotz1 -y
124 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200125
Bram Moolenaare3505df2016-11-11 21:57:45 +0100126before_script:
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100127 # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
128 - |
129 if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
130 export DISPLAY=:99.0
131 sh -e /etc/init.d/xvfb start && sleep 3
132 fi
Bram Moolenaare3505df2016-11-11 21:57:45 +0100133
Bram Moolenaar0600f352015-09-15 19:18:18 +0200134script:
135 - NPROC=$(getconf _NPROCESSORS_ONLN)
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100136 - |
137 if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
138 make -C src autoconf
139 fi
140 - |
141 if [[ -n "${SHADOWOPT}" ]]; then
142 make -C src shadow
143 fi
144 - |
145 (
146 cd "${SRCDIR}" \
147 && ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
148 ) && if [[ "${BUILD}" = "yes" ]]; then
149 make ${SHADOWOPT} -j${NPROC}
150 fi
151 # Show Vim version and also if_xx versions.
152 - |
153 if [[ "${BUILD}" = "yes" ]]; then
154 "${SRCDIR}"/vim --version
155 "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-1.vim -c quit > /dev/null
156 "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
157 cat if_ver.txt
158 fi
159 - make ${SHADOWOPT} ${TEST}
160 - |
161 if [[ -n "${ASAN_OPTIONS}" ]]; then
162 while read log; do
163 asan_symbolize < "${log}"
164 done < <(find . -type f -name 'asan.*' -size +0)
165 [[ -z "${log}" ]] # exit 1 if there are ASAN logs
166 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200167
168after_success:
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100169 - |
170 if [[ "${COVERAGE}" = "yes" ]]; then
171 ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 latin-1 EUC-KR
172 fi
173 - |
174 if [[ "${COVERAGE}" = "yes" ]]; then
175 (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
176 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200177
178# vim:set sts=2 sw=2 tw=0 et: