blob: f3da2d10a9330cd0228904aeb877d7f6f3e1854f [file] [log] [blame]
Bram Moolenaar0600f352015-09-15 19:18:18 +02001language: c
2
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +01003_anchors:
Bram Moolenaarf42397c2019-06-14 20:47:49 +02004 envs:
5 - &tiny-nogui
Bram Moolenaar98be7fe2020-03-20 18:12:59 +01006 BUILD=yes TEST=test FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarf42397c2019-06-14 20:47:49 +02007 - &tiny
Bram Moolenaar98be7fe2020-03-20 18:12:59 +01008 BUILD=yes TEST=test FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarf42397c2019-06-14 20:47:49 +02009 - &small
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010010 BUILD=yes TEST=test FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarf42397c2019-06-14 20:47:49 +020011 - &normal
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010012 BUILD=yes TEST=test FEATURES=normal CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarf42397c2019-06-14 20:47:49 +020013 - &linux-huge
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010014 BUILD=yes TEST="scripttests test_libvterm" CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarf42397c2019-06-14 20:47:49 +020015 "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
16 - &osx-huge # macOS build
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010017 BUILD=yes TEST=test FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
Bram Moolenaarf42397c2019-06-14 20:47:49 +020018 "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
19 - &unittests
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010020 BUILD=no TEST=unittests CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
Bram Moolenaarf42397c2019-06-14 20:47:49 +020021 - &asan # ASAN build
22 SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
23 ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
Bram Moolenaar23877732020-01-21 22:13:42 +010024 - &shadowopt
25 SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow
Bram Moolenaarb20617b2016-07-30 17:41:49 +020026
Bram Moolenaarf42397c2019-06-14 20:47:49 +020027 linux: &linux
28 os: linux
Bram Moolenaar7d333a92020-03-30 19:13:29 +020029 dist: bionic
Bram Moolenaarf42397c2019-06-14 20:47:49 +020030 addons:
31 apt:
Bram Moolenaar7d333a92020-03-30 19:13:29 +020032 packages:
Bram Moolenaarf42397c2019-06-14 20:47:49 +020033 - autoconf
34 - clang
35 - lcov
36 - gettext
37 - libcanberra-dev
38 - libperl-dev
39 - python-dev
40 - python3-dev
Bram Moolenaar7d333a92020-03-30 19:13:29 +020041 - liblua5.3-dev
42 - lua5.3
Bram Moolenaarf42397c2019-06-14 20:47:49 +020043 - ruby-dev
44 - tcl-dev
45 - cscope
46 - libgtk2.0-dev
47 - desktop-file-utils
Bram Moolenaar7d333a92020-03-30 19:13:29 +020048 - libtool-bin
49 services:
50 - xvfb
Bram Moolenaarf42397c2019-06-14 20:47:49 +020051 before_install:
52 - rvm reset
Bram Moolenaarf42397c2019-06-14 20:47:49 +020053 # Use llvm-cov instead of gcov when compiler is clang.
54 - |
55 if [[ "${CC}" = "clang" ]]; then
Bram Moolenaar7d333a92020-03-30 19:13:29 +020056 ln -sf "$(command -v llvm-cov)" /home/travis/bin/gcov
57 fi
58 # Setup lua5.3 manually since its package doesn't provide alternative.
59 # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
60 - |
61 if [[ "${CONFOPT}" =~ luainterp ]]; then
62 sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
Bram Moolenaarf42397c2019-06-14 20:47:49 +020063 fi
64 before_script:
Bram Moolenaar7d333a92020-03-30 19:13:29 +020065 # On travis bionic-amd64 gethostbyname() resolves "localhost" to 127.0.1.1
66 # so that makes various channel tests fail.
67 - sudo sed -i '/^127\.0\.1\.1\s/s/\blocalhost\b//g' /etc/hosts
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010068 - sudo bash ci/load-snd-dummy.sh || true
Bram Moolenaarf42397c2019-06-14 20:47:49 +020069 - sudo usermod -a -G audio $USER
Bram Moolenaar5b19e5b2019-07-07 15:12:12 +020070 - do_test() { sg audio "sg $(id -gn) '$*'"; }
Bram Moolenaar0600f352015-09-15 19:18:18 +020071
Bram Moolenaarf42397c2019-06-14 20:47:49 +020072 osx: &osx
73 os: osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +010074 before_script:
75 - do_test() { "$@"; }
76
77 homebrew: &osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +020078 addons:
79 homebrew:
80 packages:
81 - lua
82 update: true
83 cache:
84 directories:
85 - /usr/local/Homebrew/Library/Homebrew/vendor/
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +010086 - /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
Bram Moolenaarf42397c2019-06-14 20:47:49 +020087 before_install:
88 - rvm reset
Bram Moolenaar7d333a92020-03-30 19:13:29 +020089 # Lua is not installed on macOS
Bram Moolenaarf42397c2019-06-14 20:47:49 +020090 - export LUA_PREFIX=/usr/local
91
92 coverage: &coverage
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010093 # needed for https support for coveralls building cffi only works with gcc,
94 # not with clang
95 - CC=gcc pip install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
Bram Moolenaar41193092019-08-24 21:53:31 +020096 - ~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
Bram Moolenaarf42397c2019-06-14 20:47:49 +020097 - (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
98
99 asan_symbolize: &asan_symbolize
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200100 # Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: asan_symbolize-6.0: Not a directory".
101 # https://github.com/pyenv/pyenv/issues/580
102 - (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git rev-list --tags -n1)") &>/dev/null || true
Bram Moolenaare5bae132020-04-02 15:17:32 +0200103 - find . -type f -name 'asan.*' -size +0 2>/dev/null | xargs grep -l '^==[[:digit:]]*==ERROR:' | xargs -I{} -n1 -t asan_symbolize -l{}
Bram Moolenaar0600f352015-09-15 19:18:18 +0200104
Bram Moolenaarc1d20992015-09-25 20:30:58 +0200105branches:
106 except:
107 - /^v[0-9]/
108
Bram Moolenaar0600f352015-09-15 19:18:18 +0200109script:
110 - NPROC=$(getconf _NPROCESSORS_ONLN)
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200111 - set -o errexit
112 - echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en "travis_fold:start:configure\\r\\033[0K"
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100113 - |
114 if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
115 make -C src autoconf
116 fi
117 - |
118 if [[ -n "${SHADOWOPT}" ]]; then
119 make -C src shadow
120 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200121 # "./configure" changes its working directory into "$SRCDIR".
122 - ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
123 - echo -en "travis_fold:end:configure\\r\\033[0K"
124 - echo -e "\\033[33;1mBuilding Vim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100125 - |
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200126 if [[ "${BUILD}" = "yes" ]]; then
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100127 make ${SHADOWOPT} -j${NPROC}
128 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200129 - echo -en "travis_fold:end:build\\r\\033[0K"
130 - set +o errexit
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100131 # Show Vim version and also if_xx versions.
132 - |
133 if [[ "${BUILD}" = "yes" ]]; then
134 "${SRCDIR}"/vim --version
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100135 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
136 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100137 fi
Bram Moolenaar23877732020-01-21 22:13:42 +0100138 - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
139 - do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
Bram Moolenaar2b43f7f2019-09-04 14:11:16 +0200140 - echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
Bram Moolenaarefef9fe2019-07-12 18:45:40 +0200141
Bram Moolenaar0600f352015-09-15 19:18:18 +0200142
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200143# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
144# exclude some builds on mac os x and linux
145# on mac os x "tiny" is always without GUI
146# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100147jobs:
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200148 include:
149 - <<: *osx
150 name: tiny-nogui/clang
151 compiler: clang
152 env: *tiny-nogui
153 - <<: *osx
154 name: tiny-nogui/gcc
155 compiler: gcc
156 env: *tiny-nogui
157 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100158 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200159 name: huge/clang
160 compiler: clang
161 env: *osx-huge
162 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100163 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200164 name: huge/gcc
165 compiler: gcc
166 env: *osx-huge
167 - <<: *linux
168 name: tiny-nogui/clang
169 compiler: clang
170 env: *tiny-nogui
171 - <<: *linux
172 name: tiny-nogui/gcc
173 compiler: gcc
174 env: *tiny-nogui
175 - <<: *linux
176 name: tiny/clang
177 compiler: clang
178 env: *tiny
179 - <<: *linux
180 name: tiny/gcc
181 compiler: gcc
182 env: *tiny
183 - <<: *linux
184 name: small/gcc
185 compiler: gcc
186 env: *small
187 - <<: *linux
188 name: normal/clang
189 compiler: clang
Bram Moolenaar23877732020-01-21 22:13:42 +0100190 env:
191 - *normal
192 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200193 - <<: *linux
194 name: normal/gcc
195 compiler: gcc
Bram Moolenaar23877732020-01-21 22:13:42 +0100196 env:
197 - *normal
198 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200199 - <<: *linux
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100200 arch: s390x
201 name: huge/gcc-s390x
202 compiler: gcc
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100203 env: *linux-huge
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200204 services: []
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100205 - <<: *linux
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200206 name: huge+coverage/clang
207 compiler: clang
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200208 env:
209 - *linux-huge
210 # Clang cannot compile test_libvterm with "--coverage" flag.
211 - TEST=scripttests
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200212 after_success: *coverage
213 - <<: *linux
214 name: huge+coverage/gcc
215 compiler: gcc
216 env: *linux-huge
217 after_success: *coverage
218 - <<: *linux
219 name: unittests+coverage/gcc
220 compiler: gcc
221 env: *unittests
222 after_success: *coverage
223 - <<: *linux # ASAN
224 name: huge+asan/gcc
225 compiler: gcc
226 env:
227 - *linux-huge
228 - *asan
229 after_failure: *asan_symbolize
Bram Moolenaar435f9f02019-07-03 21:40:16 +0200230 - <<: *linux
231 name: huge-testgui+coverage/gcc
232 compiler: gcc
233 env:
234 - *linux-huge
235 - TEST="-C src testgui"
236 after_success: *coverage
Bram Moolenaar23877732020-01-21 22:13:42 +0100237 - <<: *linux
238 name: vimtags/gcc
239 compiler: gcc
240 env:
241 - *normal
242 - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
Bram Moolenaar0600f352015-09-15 19:18:18 +0200243
244# vim:set sts=2 sw=2 tw=0 et: