blob: 419aeb11036b2889517b828ca25f738688974b10 [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
29 dist: trusty
30 addons:
31 apt:
32 sources:
33 # Need msgfmt 0.19.8 to be able to generate .desktop files
34 - sourceline: 'ppa:ricotz/toolchain'
Bram Moolenaard47e6f02020-03-13 15:44:49 +010035 packages: &linux-packages
Bram Moolenaarf42397c2019-06-14 20:47:49 +020036 - autoconf
37 - clang
38 - lcov
39 - gettext
40 - libcanberra-dev
41 - libperl-dev
42 - python-dev
43 - python3-dev
44 - liblua5.2-dev
45 - lua5.2
46 - ruby-dev
47 - tcl-dev
48 - cscope
49 - libgtk2.0-dev
50 - desktop-file-utils
51 before_install:
52 - rvm reset
53 # Remove /opt/python/3.x.x/bin from $PATH for using system python3.
54 # ("pyenv global system" doesn't seem to work.)
55 - |
56 if [[ "$(which python3)" =~ ^/opt/python/ ]]; then
57 export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
58 fi
Bram Moolenaarf42397c2019-06-14 20:47:49 +020059 # Use llvm-cov instead of gcov when compiler is clang.
60 - |
61 if [[ "${CC}" = "clang" ]]; then
62 ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
63 fi
64 before_script:
Bram Moolenaar98be7fe2020-03-20 18:12:59 +010065 # Start virtual framebuffer to be able to test the GUI. For dists newer
66 # than trusty, the "services: xvfb" setting should be used instead
Bram Moolenaard47e6f02020-03-13 15:44:49 +010067 - |
Bram Moolenaarb2e1f8a2020-03-16 12:09:30 +010068 if [[ ${TRAVIS_DIST} = trusty ]]; then
Bram Moolenaard47e6f02020-03-13 15:44:49 +010069 export DISPLAY=:99.0
70 sh -e /etc/init.d/xvfb start && sleep 3
71 fi
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
93 # Lua is not installed on Travis OSX
94 - export LUA_PREFIX=/usr/local
95
96 coverage: &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
104 - |
105 while read log; do
106 asan_symbolize < "${log}"
107 done < <(find . -type f -name 'asan.*' -size +0)
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 Moolenaar01a6c212019-02-03 13:13:18 +0100131 make ${SHADOWOPT} -j${NPROC}
132 fi
Bram Moolenaardc9f9e92019-05-11 14:34:13 +0200133 - echo -en "travis_fold:end:build\\r\\033[0K"
134 - set +o errexit
Bram Moolenaar01a6c212019-02-03 13:13:18 +0100135 # Show Vim version and also if_xx versions.
136 - |
137 if [[ "${BUILD}" = "yes" ]]; then
138 "${SRCDIR}"/vim --version
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100139 "${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
140 "${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 +0100141 fi
Bram Moolenaar23877732020-01-21 22:13:42 +0100142 - echo -e "\\033[33;1mTesting Vim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
143 - do_test make ${SHADOWOPT} ${TEST} && FOLD_MARKER=travis_fold
Bram Moolenaar2b43f7f2019-09-04 14:11:16 +0200144 - echo -en "${FOLD_MARKER}:end:test\\r\\033[0K"
Bram Moolenaarefef9fe2019-07-12 18:45:40 +0200145
Bram Moolenaar0600f352015-09-15 19:18:18 +0200146
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200147# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
148# exclude some builds on mac os x and linux
149# on mac os x "tiny" is always without GUI
150# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100151jobs:
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200152 include:
153 - <<: *osx
154 name: tiny-nogui/clang
155 compiler: clang
156 env: *tiny-nogui
157 - <<: *osx
158 name: tiny-nogui/gcc
159 compiler: gcc
160 env: *tiny-nogui
161 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100162 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200163 name: huge/clang
164 compiler: clang
165 env: *osx-huge
166 - <<: *osx
Bram Moolenaar5e4d1eb2020-03-15 15:10:11 +0100167 <<: *osx-homebrew
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200168 name: huge/gcc
169 compiler: gcc
170 env: *osx-huge
171 - <<: *linux
172 name: tiny-nogui/clang
173 compiler: clang
174 env: *tiny-nogui
175 - <<: *linux
176 name: tiny-nogui/gcc
177 compiler: gcc
178 env: *tiny-nogui
179 - <<: *linux
180 name: tiny/clang
181 compiler: clang
182 env: *tiny
183 - <<: *linux
184 name: tiny/gcc
185 compiler: gcc
186 env: *tiny
187 - <<: *linux
188 name: small/gcc
189 compiler: gcc
190 env: *small
191 - <<: *linux
192 name: normal/clang
193 compiler: clang
Bram Moolenaar23877732020-01-21 22:13:42 +0100194 env:
195 - *normal
196 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200197 - <<: *linux
198 name: normal/gcc
199 compiler: gcc
Bram Moolenaar23877732020-01-21 22:13:42 +0100200 env:
201 - *normal
202 - *shadowopt
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200203 - <<: *linux
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100204 arch: s390x
205 name: huge/gcc-s390x
206 compiler: gcc
Bram Moolenaar98be7fe2020-03-20 18:12:59 +0100207 env: *linux-huge
Bram Moolenaard47e6f02020-03-13 15:44:49 +0100208 addons:
209 apt:
210 packages:
211 - *linux-packages
212 - libtool-bin
213 - <<: *linux
Bram Moolenaarf42397c2019-06-14 20:47:49 +0200214 name: huge+coverage/clang
215 compiler: clang
216 env: *linux-huge
217 after_success: *coverage
218 - <<: *linux
219 name: huge+coverage/gcc
220 compiler: gcc
221 env: *linux-huge
222 after_success: *coverage
223 - <<: *linux
224 name: unittests+coverage/gcc
225 compiler: gcc
226 env: *unittests
227 after_success: *coverage
228 - <<: *linux # ASAN
229 name: huge+asan/gcc
230 compiler: gcc
231 env:
232 - *linux-huge
233 - *asan
234 after_failure: *asan_symbolize
Bram Moolenaar435f9f02019-07-03 21:40:16 +0200235 - <<: *linux
236 name: huge-testgui+coverage/gcc
237 compiler: gcc
238 env:
239 - *linux-huge
240 - TEST="-C src testgui"
241 after_success: *coverage
Bram Moolenaar23877732020-01-21 22:13:42 +0100242 - <<: *linux
243 name: vimtags/gcc
244 compiler: gcc
245 env:
246 - *normal
247 - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
Bram Moolenaar0600f352015-09-15 19:18:18 +0200248
249# vim:set sts=2 sw=2 tw=0 et: