blob: d683b13ef3bca8d26a08bf39d83763b1c4a09757 [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:
Bram Moolenaar496555f2019-04-11 20:14:56 +020072 sources:
73 # Need msgfmt 0.19.8 to be able to generate .desktop files
74 - sourceline: 'ppa:ricotz/toolchain'
Bram Moolenaar0600f352015-09-15 19:18:18 +020075 packages:
Bram Moolenaar7b5f0a12015-12-30 17:40:43 +010076 - autoconf
Bram Moolenaar9e272172017-11-17 21:25:08 +010077 - clang
Bram Moolenaar0600f352015-09-15 19:18:18 +020078 - lcov
Bram Moolenaar496555f2019-04-11 20:14:56 +020079 - gettext
Bram Moolenaar0600f352015-09-15 19:18:18 +020080 - libperl-dev
81 - python-dev
82 - python3-dev
Bram Moolenaarcb25d182017-07-27 21:29:31 +020083 - liblua5.2-dev
84 - lua5.2
Bram Moolenaar02113ed2017-08-06 17:06:24 +020085 - ruby-dev
Bram Moolenaarade55782018-07-01 21:12:55 +020086 - tcl-dev
Bram Moolenaar47247282016-08-02 22:36:02 +020087 - cscope
Bram Moolenaar02113ed2017-08-06 17:06:24 +020088 - libgtk2.0-dev
Bram Moolenaar2339fa32019-01-28 22:59:36 +010089 homebrew:
90 packages:
91 - lua
92 update: true
Bram Moolenaar0600f352015-09-15 19:18:18 +020093
94before_install:
Bram Moolenaar02113ed2017-08-06 17:06:24 +020095 - rvm reset
Bram Moolenaar01a6c212019-02-03 13:13:18 +010096 # Remove /opt/python/3.x.x/bin from $PATH for using system python3.
97 # ("pyenv global system" doesn't seem to work.)
98 - |
99 if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "$(which python3)" =~ ^/opt/python/ ]]; then
100 export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
101 fi
102 - |
103 if [[ "${COVERAGE}" = "yes" ]]; then
104 pip install --user cpp-coveralls
105 fi
106 # needed for https support for coveralls
107 # building cffi only works with gcc, not with clang
108 - |
109 if [[ "${COVERAGE}" = "yes" ]]; then
110 CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
111 fi
112 # Lua is not installed on Travis OSX
113 - |
114 if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
115 export LUA_PREFIX=/usr/local
116 fi
117 # Use llvm-cov instead of gcov when compiler is clang.
118 - |
119 if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
120 ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
121 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200122
Bram Moolenaare3505df2016-11-11 21:57:45 +0100123before_script:
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100124 # Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
125 - |
126 if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
127 export DISPLAY=:99.0
128 sh -e /etc/init.d/xvfb start && sleep 3
129 fi
Bram Moolenaare3505df2016-11-11 21:57:45 +0100130
Bram Moolenaar0600f352015-09-15 19:18:18 +0200131script:
132 - NPROC=$(getconf _NPROCESSORS_ONLN)
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100133 - |
134 if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
135 make -C src autoconf
136 fi
137 - |
138 if [[ -n "${SHADOWOPT}" ]]; then
139 make -C src shadow
140 fi
141 - |
142 (
143 cd "${SRCDIR}" \
144 && ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
145 ) && if [[ "${BUILD}" = "yes" ]]; then
146 make ${SHADOWOPT} -j${NPROC}
147 fi
148 # Show Vim version and also if_xx versions.
149 - |
150 if [[ "${BUILD}" = "yes" ]]; then
151 "${SRCDIR}"/vim --version
152 "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-1.vim -c quit > /dev/null
153 "${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
154 cat if_ver.txt
155 fi
156 - make ${SHADOWOPT} ${TEST}
157 - |
158 if [[ -n "${ASAN_OPTIONS}" ]]; then
159 while read log; do
160 asan_symbolize < "${log}"
161 done < <(find . -type f -name 'asan.*' -size +0)
162 [[ -z "${log}" ]] # exit 1 if there are ASAN logs
163 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200164
165after_success:
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100166 - |
167 if [[ "${COVERAGE}" = "yes" ]]; then
168 ~/.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
169 fi
170 - |
171 if [[ "${COVERAGE}" = "yes" ]]; then
172 (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
173 fi
Bram Moolenaar0600f352015-09-15 19:18:18 +0200174
175# vim:set sts=2 sw=2 tw=0 et: