blob: a8acd3ade6c2c595f9cc2437f24338ce1e5de7e8 [file] [log] [blame]
Bram Moolenaar0600f352015-09-15 19:18:18 +02001language: c
2
Bram Moolenaarde6804d2020-08-07 18:33:19 +02003env:
4 global:
5 - BUILD=yes TEST=test CONFOPT= LEAK_CFLAGS="-DEXITFREE" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
6
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +01007_anchors:
Bram Moolenaarf42397c2019-06-14 20:47:49 +02008 envs:
9 - &tiny-nogui
Bram Moolenaarb96a32e2020-08-13 18:59:55 +020010 FEATURES=tiny TEST=testtiny CONFOPT="--disable-gui"
Bram Moolenaarf42397c2019-06-14 20:47:49 +020011 - &tiny
Bram Moolenaarb96a32e2020-08-13 18:59:55 +020012 FEATURES=tiny TEST=testtiny
Bram Moolenaarf42397c2019-06-14 20:47:49 +020013 - &small
Bram Moolenaarb96a32e2020-08-13 18:59:55 +020014 FEATURES=small TEST=testtiny
Bram Moolenaarf42397c2019-06-14 20:47:49 +020015 - &normal
Bram Moolenaarde6804d2020-08-07 18:33:19 +020016 FEATURES=normal
Bram Moolenaarf42397c2019-06-14 20:47:49 +020017 - &linux-huge
Bram Moolenaarde6804d2020-08-07 18:33:19 +020018 FEATURES=huge TEST="scripttests test_libvterm"
Bram Moolenaar81ea1df2020-04-11 18:01:41 +020019 CONFOPT="--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
Bram Moolenaarf42397c2019-06-14 20:47:49 +020020 - &osx-huge # macOS build
Bram Moolenaarde6804d2020-08-07 18:33:19 +020021 FEATURES=huge
22 CONFOPT="--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
Bram Moolenaarf42397c2019-06-14 20:47:49 +020023 - &unittests
Bram Moolenaarde6804d2020-08-07 18:33:19 +020024 BUILD=no TEST=unittests FEATURES=huge CHECK_AUTOCONF=yes
25 - &coverage
26 CFLAGS="--coverage -DUSE_GCOV_FLUSH" LDFLAGS=--coverage
Bram Moolenaarf42397c2019-06-14 20:47:49 +020027 - &asan # ASAN build
28 SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
29 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 +010030 - &shadowopt
Bram Moolenaar8d5f6af2020-07-23 15:50:40 +020031 SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow
Bram Moolenaarb20617b2016-07-30 17:41:49 +020032
Bram Moolenaarf42397c2019-06-14 20:47:49 +020033 linux: &linux
34 os: linux
Bram Moolenaar7d333a92020-03-30 19:13:29 +020035 dist: bionic
Bram Moolenaarf42397c2019-06-14 20:47:49 +020036 addons:
37 apt:
Bram Moolenaar7d333a92020-03-30 19:13:29 +020038 packages:
Bram Moolenaarf42397c2019-06-14 20:47:49 +020039 - autoconf
40 - clang
41 - lcov
42 - gettext
43 - libcanberra-dev
44 - libperl-dev
45 - python-dev
46 - python3-dev
Bram Moolenaar7d333a92020-03-30 19:13:29 +020047 - liblua5.3-dev
48 - lua5.3
Bram Moolenaarf42397c2019-06-14 20:47:49 +020049 - ruby-dev
50 - tcl-dev
51 - cscope
52 - libgtk2.0-dev
53 - desktop-file-utils
Bram Moolenaar7d333a92020-03-30 19:13:29 +020054 - libtool-bin
55 services:
56 - xvfb
Bram Moolenaarf42397c2019-06-14 20:47:49 +020057 before_install:
58 - rvm reset
Bram Moolenaarf42397c2019-06-14 20:47:49 +020059 # Use llvm-cov instead of gcov when compiler is clang.
60 - |
61 if [[ "${CC}" = "clang" ]]; then
Bram Moolenaar7d333a92020-03-30 19:13:29 +020062 ln -sf "$(command -v llvm-cov)" /home/travis/bin/gcov
63 fi
64 # Setup lua5.3 manually since its package doesn't provide alternative.
65 # https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
66 - |
67 if [[ "${CONFOPT}" =~ luainterp ]]; then
68 sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
Bram Moolenaarf42397c2019-06-14 20:47:49 +020069 fi
70 before_script:
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +020071 - sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010072 - sudo bash ci/load-snd-dummy.sh || true
Bram Moolenaarf42397c2019-06-14 20:47:49 +020073 - sudo usermod -a -G audio $USER
Bram Moolenaar5b19e5b2019-07-07 15:12:12 +020074 - do_test() { sg audio "sg $(id -gn) '$*'"; }
Bram Moolenaar0600f352015-09-15 19:18:18 +020075
Bram Moolenaarf42397c2019-06-14 20:47:49 +020076 osx: &osx
77 os: osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +010078 before_script:
79 - do_test() { "$@"; }
80
81 homebrew: &osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +020082 addons:
83 homebrew:
84 packages:
85 - lua
86 update: true
87 cache:
88 directories:
89 - /usr/local/Homebrew/Library/Homebrew/vendor/
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +010090 - /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
Bram Moolenaarf42397c2019-06-14 20:47:49 +020091 before_install:
92 - rvm reset
Bram Moolenaar7d333a92020-03-30 19:13:29 +020093 # Lua is not installed on macOS
Bram Moolenaarf42397c2019-06-14 20:47:49 +020094 - export LUA_PREFIX=/usr/local
95
Bram Moolenaarde6804d2020-08-07 18:33:19 +020096 coverage: &eval-coverage
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010097 # needed for https support for coveralls building cffi only works with gcc,
98 # not with clang
99 - CC=gcc pip install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
Bram Moolenaar41193092019-08-24 21:53:31 +0200100 - ~/.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 +0200101 - (cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
102
103 asan_symbolize: &asan_symbolize
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200104 # Update pyenv to fix the error "/opt/pyenv/libexec/pyenv: line 43: cd: asan_symbolize-6.0: Not a directory".
105 # https://github.com/pyenv/pyenv/issues/580
106 - (cd "${PYENV_ROOT}" && git fetch -p origin && git checkout "$(git rev-list --tags -n1)") &>/dev/null || true
Bram Moolenaare5bae132020-04-02 15:17:32 +0200107 - 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 +0200108
Bram Moolenaarc1d20992015-09-25 20:30:58 +0200109branches:
110 except:
111 - /^v[0-9]/
112
Bram Moolenaar0600f352015-09-15 19:18:18 +0200113script:
114 - NPROC=$(getconf _NPROCESSORS_ONLN)
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200115 - set -o errexit
116 - echo -e "\\033[33;1mConfiguring Vim\\033[0m" && echo -en "travis_fold:start:configure\\r\\033[0K"
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100117 - |
118 if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
119 make -C src autoconf
120 fi
121 - |
122 if [[ -n "${SHADOWOPT}" ]]; then
123 make -C src shadow
124 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200125 # "./configure" changes its working directory into "$SRCDIR".
126 - ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
127 - echo -en "travis_fold:end:configure\\r\\033[0K"
128 - echo -e "\\033[33;1mBuilding Vim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100129 - |
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200130 if [[ "${BUILD}" = "yes" ]]; then
Bram Moolenaar81ea1df2020-04-11 18:01:41 +0200131 # Append various warning flags to CFLAGS.
132 # BSD sed needs backup extension specified.
133 sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
Bram Moolenaar92c098d2020-05-26 20:09:11 +0200134 if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
135 # On macOS, the entity of gcc is clang.
136 sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
137 else
138 sed -i.bak -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
139 fi
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100140 make ${SHADOWOPT} -j${NPROC}
141 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200142 - echo -en "travis_fold:end:build\\r\\033[0K"
143 - set +o errexit
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100144 # Show Vim version and also if_xx versions.
145 - |
146 if [[ "${BUILD}" = "yes" ]]; then
147 "${SRCDIR}"/vim --version
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100148 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
149 "${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 +0100150 fi
Bram Moolenaar23877732020-01-21 22:13:42 +0100151 - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
152 - do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
Bram Moolenaar2b43f7f2019-09-04 14:11:16 +0200153 - echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
Bram Moolenaarefef9fe2019-07-12 18:45:40 +0200154
Bram Moolenaar92c098d2020-05-26 20:09:11 +0200155# Instead of using all environments with both compilers on both systems,
156# exclude some builds on mac os x and linux.
157# On mac os x "tiny" is always without GUI, use 2 compilers in 2 environments.
158# Linux: 2 compilers on some of the environments + gcc on os390
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100159jobs:
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200160 include:
161 - <<: *osx
162 name: tiny-nogui/clang
163 compiler: clang
164 env: *tiny-nogui
165 - <<: *osx
166 name: tiny-nogui/gcc
167 compiler: gcc
168 env: *tiny-nogui
169 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100170 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200171 name: huge/clang
172 compiler: clang
173 env: *osx-huge
174 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100175 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200176 name: huge/gcc
177 compiler: gcc
178 env: *osx-huge
179 - <<: *linux
180 name: tiny-nogui/clang
181 compiler: clang
182 env: *tiny-nogui
183 - <<: *linux
184 name: tiny-nogui/gcc
185 compiler: gcc
186 env: *tiny-nogui
187 - <<: *linux
188 name: tiny/clang
189 compiler: clang
190 env: *tiny
191 - <<: *linux
192 name: tiny/gcc
193 compiler: gcc
194 env: *tiny
195 - <<: *linux
196 name: small/gcc
197 compiler: gcc
198 env: *small
199 - <<: *linux
Bram Moolenaar8d5f6af2020-07-23 15:50:40 +0200200 name: normal+shadow/clang
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200201 compiler: clang
Bram Moolenaar23877732020-01-21 22:13:42 +0100202 env:
203 - *normal
204 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200205 - <<: *linux
Bram Moolenaar8d5f6af2020-07-23 15:50:40 +0200206 name: normal+shadow/gcc
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200207 compiler: gcc
Bram Moolenaar23877732020-01-21 22:13:42 +0100208 env:
209 - *normal
210 - *shadowopt
Bram Moolenaar94f6c062020-08-09 14:07:52 +0200211 # Temporarily disabled, always fails
212 #- <<: *linux
213 # arch: s390x
214 # name: huge/gcc-s390x
215 # compiler: gcc
216 # env: *linux-huge
217 # services: []
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100218 - <<: *linux
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200219 arch: arm64
220 name: huge/gcc-arm64
221 compiler: gcc
222 env: *linux-huge
223 services: []
224 - <<: *linux
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200225 name: huge+coverage/clang
226 compiler: clang
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200227 env:
228 - *linux-huge
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200229 - *coverage
Bram Moolenaar7d333a92020-03-30 19:13:29 +0200230 # Clang cannot compile test_libvterm with "--coverage" flag.
231 - TEST=scripttests
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200232 after_success: *eval-coverage
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200233 - <<: *linux
234 name: huge+coverage/gcc
235 compiler: gcc
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200236 env:
237 - *linux-huge
238 - *coverage
239 after_success: *eval-coverage
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200240 - <<: *linux # ASAN
241 name: huge+asan/gcc
242 compiler: gcc
243 env:
244 - *linux-huge
245 - *asan
246 after_failure: *asan_symbolize
Bram Moolenaar435f9f02019-07-03 21:40:16 +0200247 - <<: *linux
248 name: huge-testgui+coverage/gcc
249 compiler: gcc
250 env:
251 - *linux-huge
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200252 - *coverage
Bram Moolenaar435f9f02019-07-03 21:40:16 +0200253 - TEST="-C src testgui"
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200254 after_success: *eval-coverage
Bram Moolenaar23877732020-01-21 22:13:42 +0100255 - <<: *linux
Bram Moolenaar81ea1df2020-04-11 18:01:41 +0200256 name: unittests+coverage/gcc
257 compiler: gcc
Bram Moolenaarde6804d2020-08-07 18:33:19 +0200258 env:
259 - *unittests
260 - *coverage
261 after_success: *eval-coverage
Bram Moolenaar81ea1df2020-04-11 18:01:41 +0200262 - <<: *linux
Bram Moolenaar23877732020-01-21 22:13:42 +0100263 name: vimtags/gcc
264 compiler: gcc
265 env:
266 - *normal
267 - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
Bram Moolenaar0600f352015-09-15 19:18:18 +0200268
269# vim:set sts=2 sw=2 tw=0 et: