blob: 2c5f5ff304492b23817d00ba54414ccc1c99e00f [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 Moolenaar81ea1df2020-04-11 18:01:41 +02006 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 Moolenaar81ea1df2020-04-11 18:01:41 +020015 CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
Bram Moolenaarf42397c2019-06-14 20:47:49 +020016 - &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 Moolenaar81ea1df2020-04-11 18:01:41 +020018 CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
Bram Moolenaarf42397c2019-06-14 20:47:49 +020019 - &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 Moolenaarbfe13cc2020-04-12 17:53:12 +020065 - sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010066 - sudo bash ci/load-snd-dummy.sh || true
Bram Moolenaarf42397c2019-06-14 20:47:49 +020067 - sudo usermod -a -G audio $USER
Bram Moolenaar5b19e5b2019-07-07 15:12:12 +020068 - do_test() { sg audio "sg $(id -gn) '$*'"; }
Bram Moolenaar0600f352015-09-15 19:18:18 +020069
Bram Moolenaarf42397c2019-06-14 20:47:49 +020070 osx: &osx
71 os: osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +010072 before_script:
73 - do_test() { "$@"; }
74
75 homebrew: &osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +020076 addons:
77 homebrew:
78 packages:
79 - lua
80 update: true
81 cache:
82 directories:
83 - /usr/local/Homebrew/Library/Homebrew/vendor/
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +010084 - /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
Bram Moolenaarf42397c2019-06-14 20:47:49 +020085 before_install:
86 - rvm reset
Bram Moolenaar7d333a92020-03-30 19:13:29 +020087 # Lua is not installed on macOS
Bram Moolenaarf42397c2019-06-14 20:47:49 +020088 - export LUA_PREFIX=/usr/local
89
90 coverage: &coverage
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010091 # needed for https support for coveralls building cffi only works with gcc,
92 # not with clang
93 - CC=gcc pip install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
Bram Moolenaar41193092019-08-24 21:53:31 +020094 - ~/.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 +020095 - (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
96
97 asan_symbolize: &asan_symbolize
Bram Moolenaar7d333a92020-03-30 19:13:29 +020098 # Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: asan_symbolize-6.0: Not a directory".
99 # https://github.com/pyenv/pyenv/issues/580
100 - (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git rev-list --tags -n1)") &>/dev/null || true
Bram Moolenaare5bae132020-04-02 15:17:32 +0200101 - 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 +0200102
Bram Moolenaarc1d20992015-09-25 20:30:58 +0200103branches:
104 except:
105 - /^v[0-9]/
106
Bram Moolenaar0600f352015-09-15 19:18:18 +0200107script:
108 - NPROC=$(getconf _NPROCESSORS_ONLN)
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200109 - set -o errexit
110 - echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en "travis_fold:start:configure\\r\\033[0K"
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100111 - |
112 if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
113 make -C src autoconf
114 fi
115 - |
116 if [[ -n "${SHADOWOPT}" ]]; then
117 make -C src shadow
118 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200119 # "./configure" changes its working directory into "$SRCDIR".
120 - ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
121 - echo -en "travis_fold:end:configure\\r\\033[0K"
122 - echo -e "\\033[33;1mBuilding Vim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100123 - |
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200124 if [[ "${BUILD}" = "yes" ]]; then
Bram Moolenaar81ea1df2020-04-11 18:01:41 +0200125 # Append various warning flags to CFLAGS.
126 # BSD sed needs backup extension specified.
127 sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
128 sed -i.bak -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100129 make ${SHADOWOPT} -j${NPROC}
130 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200131 - echo -en "travis_fold:end:build\\r\\033[0K"
132 - set +o errexit
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100133 # Show Vim version and also if_xx versions.
134 - |
135 if [[ "${BUILD}" = "yes" ]]; then
136 "${SRCDIR}"/vim --version
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100137 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
138 "${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 +0100139 fi
Bram Moolenaar23877732020-01-21 22:13:42 +0100140 - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
141 - do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
Bram Moolenaar2b43f7f2019-09-04 14:11:16 +0200142 - echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
Bram Moolenaarefef9fe2019-07-12 18:45:40 +0200143
Bram Moolenaar0600f352015-09-15 19:18:18 +0200144
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200145# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
146# exclude some builds on mac os x and linux
147# on mac os x "tiny" is always without GUI
148# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100149jobs:
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200150 include:
151 - <<: *osx
152 name: tiny-nogui/clang
153 compiler: clang
154 env: *tiny-nogui
155 - <<: *osx
156 name: tiny-nogui/gcc
157 compiler: gcc
158 env: *tiny-nogui
159 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100160 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200161 name: huge/clang
162 compiler: clang
163 env: *osx-huge
164 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100165 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200166 name: huge/gcc
167 compiler: gcc
168 env: *osx-huge
169 - <<: *linux
170 name: tiny-nogui/clang
171 compiler: clang
172 env: *tiny-nogui
173 - <<: *linux
174 name: tiny-nogui/gcc
175 compiler: gcc
176 env: *tiny-nogui
177 - <<: *linux
178 name: tiny/clang
179 compiler: clang
180 env: *tiny
181 - <<: *linux
182 name: tiny/gcc
183 compiler: gcc
184 env: *tiny
185 - <<: *linux
186 name: small/gcc
187 compiler: gcc
188 env: *small
189 - <<: *linux
190 name: normal/clang
191 compiler: clang
Bram Moolenaar23877732020-01-21 22:13:42 +0100192 env:
193 - *normal
194 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200195 - <<: *linux
196 name: normal/gcc
197 compiler: gcc
Bram Moolenaar23877732020-01-21 22:13:42 +0100198 env:
199 - *normal
200 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200201 - <<: *linux
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100202 arch: s390x
203 name: huge/gcc-s390x
204 compiler: gcc
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100205 env: *linux-huge
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200206 services: []
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100207 - <<: *linux
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200208 name: huge+coverage/clang
209 compiler: clang
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200210 env:
211 - *linux-huge
212 # Clang cannot compile test_libvterm with "--coverage" flag.
213 - TEST=scripttests
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200214 after_success: *coverage
215 - <<: *linux
216 name: huge+coverage/gcc
217 compiler: gcc
218 env: *linux-huge
219 after_success: *coverage
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200220 - <<: *linux # ASAN
221 name: huge+asan/gcc
222 compiler: gcc
223 env:
224 - *linux-huge
225 - *asan
226 after_failure: *asan_symbolize
Bram Moolenaar435f9f02019-07-03 21:40:16 +0200227 - <<: *linux
228 name: huge-testgui+coverage/gcc
229 compiler: gcc
230 env:
231 - *linux-huge
232 - TEST="-C src testgui"
233 after_success: *coverage
Bram Moolenaar23877732020-01-21 22:13:42 +0100234 - <<: *linux
Bram Moolenaar81ea1df2020-04-11 18:01:41 +0200235 name: unittests+coverage/gcc
236 compiler: gcc
237 env: *unittests
238 after_success: *coverage
239 - <<: *linux
Bram Moolenaar23877732020-01-21 22:13:42 +0100240 name: vimtags/gcc
241 compiler: gcc
242 env:
243 - *normal
244 - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
Bram Moolenaar0600f352015-09-15 19:18:18 +0200245
246# vim:set sts=2 sw=2 tw=0 et: