Skip to content

Commit 01a6c21

Browse files
committed
patch 8.1.0869: Travis CI script is too complicated
Problem: Travis CI script is too complicated. Solution: Add names to environments. Move appveyor script outside of src directory. (Ozaki Kiichi, closes vim#3890)
1 parent 889da2f commit 01a6c21

File tree

5 files changed

+102
-52
lines changed

5 files changed

+102
-52
lines changed

.travis.yml

Lines changed: 98 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,58 @@ compiler:
1010
- gcc
1111

1212
env:
13-
- BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
14-
- BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
15-
# ASAN build
16-
- BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
13+
- &tiny-nogui
14+
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny "CONFOPT='--disable-gui'" SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
15+
- &tiny
16+
BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
17+
- &asan # ASAN build
18+
BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
1719
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
1820
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
19-
- BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
21+
- &linux-huge
22+
BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
2023
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
21-
- BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
22-
- BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
23-
- BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
24-
# Mac OSX build
25-
- BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
24+
- &unittests
25+
BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
26+
- &normal
27+
BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
28+
- &small
29+
BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
30+
- &osx-huge # Mac OSX build
31+
BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
2632
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
2733

2834
sudo: false
2935

30-
# instead of a 2*2*7 matrix (2*os + 2*compiler + 7*env),
36+
# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
3137
# exclude some builds on mac os x and linux
3238
# on mac os x "tiny" is always without GUI
3339
# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env
3440
matrix:
3541
exclude:
3642
- os: osx
37-
env: BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
43+
env: *tiny
3844
- os: osx
39-
env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no
45+
env: *normal
4046
- os: osx
41-
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
47+
env: *unittests
4248
- os: osx
43-
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
49+
env: *small
4450
- os: osx
45-
env: BUILD=yes TEST="scripttests test_libvterm" COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
46-
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
51+
env: *linux-huge
4752
- os: osx
48-
env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
49-
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
50-
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
53+
env: *asan
5154
- os: linux
5255
compiler: clang
53-
env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer"
54-
FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/src/testdir/lsan-suppress.txt"
55-
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
56+
env: *asan
5657
- os: linux
5758
compiler: clang
58-
env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes
59+
env: *unittests
5960
- os: linux
6061
compiler: clang
61-
env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
62+
env: *small
6263
- os: linux
63-
env: BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no
64-
"CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp --enable-tclinterp'"
64+
env: *osx-huge
6565

6666
branches:
6767
except:
@@ -89,35 +89,83 @@ addons:
8989

9090
before_install:
9191
- rvm reset
92-
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
93-
# ("pyenv global system" doesn't seem to work.)
94-
- if [ "$TRAVIS_OS_NAME" = "linux" ] && which python3 | grep '/opt/python/' > /dev/null; then export PATH=$(echo $PATH | sed -e "s#$(echo $(which python3) | sed -e 's#/python3$##'):##"); fi
95-
- if [ "$COVERAGE" = "yes" ]; then pip install --user cpp-coveralls; fi
96-
# needed for https support for coveralls
97-
# building cffi only works with gcc, not with clang
98-
- if [ "$COVERAGE" = "yes" ]; then CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1; fi
99-
# Lua is not installed on Travis OSX
100-
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export LUA_PREFIX=/usr/local; fi
101-
# Use llvm-cov instead of gcov when compiler is clang.
102-
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" = "clang" ]; then ln -sf $(which llvm-cov) /home/travis/bin/gcov; fi
92+
# Remove /opt/python/3.x.x/bin from $PATH for using system python3.
93+
# ("pyenv global system" doesn't seem to work.)
94+
- |
95+
if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "$(which python3)" =~ ^/opt/python/ ]]; then
96+
export PATH=$(py3=$(which python3); echo ${PATH//${py3%/python3}:/})
97+
fi
98+
- |
99+
if [[ "${COVERAGE}" = "yes" ]]; then
100+
pip install --user cpp-coveralls
101+
fi
102+
# needed for https support for coveralls
103+
# building cffi only works with gcc, not with clang
104+
- |
105+
if [[ "${COVERAGE}" = "yes" ]]; then
106+
CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1
107+
fi
108+
# Lua is not installed on Travis OSX
109+
- |
110+
if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then
111+
export LUA_PREFIX=/usr/local
112+
fi
113+
# Use llvm-cov instead of gcov when compiler is clang.
114+
- |
115+
if [[ "${TRAVIS_OS_NAME}" = "linux" ]] && [[ "${CC}" = "clang" ]]; then
116+
ln -sf "$(which llvm-cov)" /home/travis/bin/gcov
117+
fi
103118
104-
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
105119
before_script:
106-
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3; fi
120+
# Start virtual framebuffer to be able to test the GUI. Does not work on OS X.
121+
- |
122+
if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
123+
export DISPLAY=:99.0
124+
sh -e /etc/init.d/xvfb start && sleep 3
125+
fi
107126
108127
script:
109128
- NPROC=$(getconf _NPROCESSORS_ONLN)
110-
- if [ "$CHECK_AUTOCONF" = "yes" -a "$CC" = "gcc" ]; then make -C src autoconf; fi
111-
- if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi
112-
- (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && if [ "$BUILD" = "yes" ]; then make -j$NPROC; fi)
113-
# Show Vim version and also if_xx versions.
114-
- if [ "$BUILD" = "yes" ]; then ${SRCDIR}/vim --version; ${SRCDIR}/vim --not-a-term -u NONE -S ${SRCDIR}/testdir/if_ver-1.vim -c quit > /dev/null; ${SRCDIR}/vim --not-a-term -u NONE -S ${SRCDIR}/testdir/if_ver-2.vim -c quit > /dev/null; cat if_ver.txt; fi
115-
- make $SHADOWOPT $TEST
116-
- if [ -n "$ASAN_OPTIONS" ]; then for log in $(find -type f -name 'asan.*' -size +0); do asan_symbolize < "$log"; err=1; done; fi
117-
- if [ -n "$err" ]; then exit 1; fi
129+
- |
130+
if [[ "${CHECK_AUTOCONF}" = "yes" ]] && [[ "${CC}" = "gcc" ]]; then
131+
make -C src autoconf
132+
fi
133+
- |
134+
if [[ -n "${SHADOWOPT}" ]]; then
135+
make -C src shadow
136+
fi
137+
- |
138+
(
139+
cd "${SRCDIR}" \
140+
&& ./configure --with-features=${FEATURES} ${CONFOPT} --enable-fail-if-missing
141+
) && if [[ "${BUILD}" = "yes" ]]; then
142+
make ${SHADOWOPT} -j${NPROC}
143+
fi
144+
# Show Vim version and also if_xx versions.
145+
- |
146+
if [[ "${BUILD}" = "yes" ]]; then
147+
"${SRCDIR}"/vim --version
148+
"${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-1.vim -c quit > /dev/null
149+
"${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
150+
cat if_ver.txt
151+
fi
152+
- make ${SHADOWOPT} ${TEST}
153+
- |
154+
if [[ -n "${ASAN_OPTIONS}" ]]; then
155+
while read log; do
156+
asan_symbolize < "${log}"
157+
done < <(find . -type f -name 'asan.*' -size +0)
158+
[[ -z "${log}" ]] # exit 1 if there are ASAN logs
159+
fi
118160
119161
after_success:
120-
- if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -e ${SRCDIR}/if_perl.c -e ${SRCDIR}/xxd -e ${SRCDIR}/libvterm --encodings utf-8 latin-1 EUC-KR; fi
121-
- if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi
162+
- |
163+
if [[ "${COVERAGE}" = "yes" ]]; then
164+
~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8 latin-1 EUC-KR
165+
fi
166+
- |
167+
if [[ "${COVERAGE}" = "yes" ]]; then
168+
(cd "${SRCDIR}" && bash <(curl -s https://codecov.io/bash))
169+
fi
122170
123171
# vim:set sts=2 sw=2 tw=0 et:

Filelist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ SRC_ALL = \
77
.lgtm.yml \
88
.travis.yml \
99
appveyor.yml \
10+
ci/appveyor.bat \
1011
src/Make_all.mak \
11-
src/appveyor.bat \
1212
src/README.txt \
1313
src/alloc.h \
1414
src/arabic.c \

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ before_build:
1919
- 'set INCLUDE=%INCLUDE%C:\Program Files (x86)\Windows Kits\8.1\Include\um'
2020

2121
build_script:
22-
- src/appveyor.bat
22+
- ci/appveyor.bat
2323

2424
test_script:
2525
- cd src/testdir
File renamed without changes.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,8 @@ static char *(features[]) =
783783

784784
static int included_patches[] =
785785
{ /* Add new patch number below this line */
786+
/**/
787+
869,
786788
/**/
787789
868,
788790
/**/

0 commit comments

Comments
 (0)