blob: 038a1d64216eac1c0428c1b013d3611a2e7b5948 [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 Moolenaar0600f352015-09-15 19:18:18 +0200118
Bram Moolenaare3505df2016-11-11 21:57:45 +0100119before_script:
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100120 # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
121 - |
122 if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
123 export DISPLAY=:99.0
124 sh -e /etc/init.d/xvfb start && sleep 3
125 fi
Bram Moolenaare3505df2016-11-11 21:57:45 +0100126
Bram Moolenaar0600f352015-09-15 19:18:18 +0200127script:
128 - NPROC=$(getconf _NPROCESSORS_ONLN)
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100129 - |
130 if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
131 make -C src autoconf
132 fi
133 - |
134 if [[ -n "${SHADOWOPT}" ]]; then
135 make -C src shadow
136 fi
137 - |
138 (
139 cd "${SRCDIR}" \
140 && ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
141 ) && if [[ "${BUILD}" = "yes" ]]; then
142 make ${SHADOWOPT} -j${NPROC}
143 fi
144 # Show Vim version and also if_xx versions.
145 - |
146 if [[ "${BUILD}" = "yes" ]]; then
147 "${SRCDIR}"/vim --version
148 "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-1.vim -c quit > /dev/null
149 "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
150 cat if_ver.txt
151 fi
152 - make ${SHADOWOPT} ${TEST}
153 - |
154 if [[ -n "${ASAN_OPTIONS}" ]]; then
155 while read log; do
156 asan_symbolize < "${log}"
157 done < <(find . -type f -name 'asan.*' -size +0)
158 [[ -z "${log}" ]] # exit 1 if there are ASAN logs
159 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200160
161after_success:
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100162 - |
163 if [[ "${COVERAGE}" = "yes" ]]; then
164 ~/.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
165 fi
166 - |
167 if [[ "${COVERAGE}" = "yes" ]]; then
168 (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
169 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200170
171# vim:set sts=2 sw=2 tw=0 et: