blob: ef96f084d0b3cd38cb90942477264f2301adf0ff [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 Moolenaarb4151682020-05-11 22:13:28 +020014 BUILD=yes TEST="scripttests test_libvterm" CFLAGS="--coverage -DUSE_GCOV_FLUSH" 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 Moolenaarb4151682020-05-11 22:13:28 +020020 BUILD=no TEST=unittests CFLAGS="--coverage -DUSE_GCOV_FLUSH" 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
Bram Moolenaar92c098d2020-05-26 20:09:11 +0200128 if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
129 # On macOS, the entity of gcc is clang.
130 sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
131 else
132 sed -i.bak -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
133 fi
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100134 make ${SHADOWOPT} -j${NPROC}
135 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200136 - echo -en "travis_fold:end:build\\r\\033[0K"
137 - set +o errexit
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100138 # Show Vim version and also if_xx versions.
139 - |
140 if [[ "${BUILD}" = "yes" ]]; then
141 "${SRCDIR}"/vim --version
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100142 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
143 "${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 +0100144 fi
Bram Moolenaar23877732020-01-21 22:13:42 +0100145 - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
146 - do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
Bram Moolenaar2b43f7f2019-09-04 14:11:16 +0200147 - echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
Bram Moolenaarefef9fe2019-07-12 18:45:40 +0200148
Bram Moolenaar92c098d2020-05-26 20:09:11 +0200149# Instead of using all environments with both compilers on both systems,
150# exclude some builds on mac os x and linux.
151# On mac os x "tiny" is always without GUI, use 2 compilers in 2 environments.
152# Linux: 2 compilers on some of the environments + gcc on os390
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100153jobs:
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200154 include:
155 - <<: *osx
156 name: tiny-nogui/clang
157 compiler: clang
158 env: *tiny-nogui
159 - <<: *osx
160 name: tiny-nogui/gcc
161 compiler: gcc
162 env: *tiny-nogui
163 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100164 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200165 name: huge/clang
166 compiler: clang
167 env: *osx-huge
168 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100169 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200170 name: huge/gcc
171 compiler: gcc
172 env: *osx-huge
173 - <<: *linux
174 name: tiny-nogui/clang
175 compiler: clang
176 env: *tiny-nogui
177 - <<: *linux
178 name: tiny-nogui/gcc
179 compiler: gcc
180 env: *tiny-nogui
181 - <<: *linux
182 name: tiny/clang
183 compiler: clang
184 env: *tiny
185 - <<: *linux
186 name: tiny/gcc
187 compiler: gcc
188 env: *tiny
189 - <<: *linux
190 name: small/gcc
191 compiler: gcc
192 env: *small
193 - <<: *linux
194 name: normal/clang
195 compiler: clang
Bram Moolenaar23877732020-01-21 22:13:42 +0100196 env:
197 - *normal
198 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200199 - <<: *linux
200 name: normal/gcc
201 compiler: gcc
Bram Moolenaar23877732020-01-21 22:13:42 +0100202 env:
203 - *normal
204 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200205 - <<: *linux
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100206 arch: s390x
207 name: huge/gcc-s390x
208 compiler: gcc
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100209 env: *linux-huge
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200210 services: []
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100211 - <<: *linux
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200212 name: huge+coverage/clang
213 compiler: clang
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200214 env:
215 - *linux-huge
216 # Clang cannot compile test_libvterm with "--coverage" flag.
217 - TEST=scripttests
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200218 after_success: *coverage
219 - <<: *linux
220 name: huge+coverage/gcc
221 compiler: gcc
222 env: *linux-huge
223 after_success: *coverage
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200224 - <<: *linux # ASAN
225 name: huge+asan/gcc
226 compiler: gcc
227 env:
228 - *linux-huge
229 - *asan
230 after_failure: *asan_symbolize
Bram Moolenaar435f9f02019-07-03 21:40:16 +0200231 - <<: *linux
232 name: huge-testgui+coverage/gcc
233 compiler: gcc
234 env:
235 - *linux-huge
236 - TEST="-C src testgui"
237 after_success: *coverage
Bram Moolenaar23877732020-01-21 22:13:42 +0100238 - <<: *linux
Bram Moolenaar81ea1df2020-04-11 18:01:41 +0200239 name: unittests+coverage/gcc
240 compiler: gcc
241 env: *unittests
242 after_success: *coverage
243 - <<: *linux
Bram Moolenaar23877732020-01-21 22:13:42 +0100244 name: vimtags/gcc
245 compiler: gcc
246 env:
247 - *normal
248 - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
Bram Moolenaar0600f352015-09-15 19:18:18 +0200249
250# vim:set sts=2 sw=2 tw=0 et: