forked from macvim-dev/macvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
135 lines (125 loc) · 6.49 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
language: c
os: osx
compiler: clang
env:
global:
- MACOSX_DEPLOYMENT_TARGET=10.9
VERSIONER_PERL_VERSION=5.18
VERSIONER_PYTHON_VERSION=2.7
vi_cv_path_python=/usr/bin/python
vi_cv_path_python3=/usr/local/bin/python3
vi_cv_path_plain_lua=/usr/local/bin/lua
vi_cv_path_ruby=/usr/local/opt/ruby/bin/ruby
vi_cv_dll_name_perl=/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/libperl.dylib
vi_cv_dll_name_python=/System/Library/Frameworks/Python.framework/Versions/2.7/Python
vi_cv_dll_name_python3=/usr/local/Frameworks/Python.framework/Versions/3.9/Python
vi_cv_dll_name_ruby=/usr/local/opt/ruby/lib/libruby.dylib
VIMCMD=src/MacVim/build/Release/MacVim.app/Contents/MacOS/Vim
MACVIM_BIN=src/MacVim/build/Release/MacVim.app/Contents/MacOS/MacVim
CONFOPT="--with-features=huge --enable-netbeans --with-tlib=ncurses --enable-cscope --enable-gui=macvim --with-macarchs=x86_64"
BASH_SILENCE_DEPRECATION_WARNING=1
_anchors:
- &lang_env
env:
- LANGOPT="--enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --with-lua-prefix=/usr/local"
HAS_GETTEXT=1
- &homebrew
addons:
homebrew:
packages:
- gettext
- lua
- python
- ruby
update: true
- &caches
cache:
directories:
- /usr/local/Homebrew/Library/Homebrew/vendor/
- /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
- ${TRAVIS_BUILD_DIR}/src/MacVim/build/Release/MacVim.app/
script:
- set -o errexit
- echo -e "\\033[33;1mConfiguring MacVim\\033[0m" && echo -en "travis_fold:start:configure\\r\\033[0K"
- NPROC=$(getconf _NPROCESSORS_ONLN)
- make distclean
- ./configure ${CONFOPT} ${LANGOPT} --enable-fail-if-missing
- sed -i.bak -f ci/config.mk.sed -f ci/config.mk.clang.sed src/auto/config.mk
# Ruby is keg-only in Homebrew, so need to manually link in the path so Vim will know where to look for the binaries.
- perl -p -i -e "s#(?<=-DDYNAMIC_RUBY_DLL=\\\\\").*?(?=\\\\\")#${vi_cv_dll_name_ruby}#" src/auto/config.mk
- cat src/auto/config.mk
- cat src/auto/config.h
- |
if [[ -n "${LANGOPT}" ]]; then
grep -q -- "-DDYNAMIC_PERL_DLL=\\\\\"${vi_cv_dll_name_perl}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_PYTHON_DLL=\\\\\"${vi_cv_dll_name_python}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_PYTHON3_DLL=\\\\\"${vi_cv_dll_name_python3}\\\\\"" src/auto/config.mk
grep -q -- "-DDYNAMIC_RUBY_DLL=\\\\\"${vi_cv_dll_name_ruby}\\\\\"" src/auto/config.mk
fi
- echo -en "travis_fold:end:configure\\r\\033[0K"
- echo -e "\\033[33;1mBuilding MacVim\\033[0m" && echo -en "travis_fold:start:build\\r\\033[0K"
- make -j${NPROC}
- echo -en "travis_fold:end:build\\r\\033[0K"
- ${VIMCMD} --version
# Disable errexit so flaky tests won't immediately exit to allow us to see all the errors.
- set +o errexit
# Smoketest scripting languages
- echo -e "\\033[33;1mSmoketest\\033[0m" && echo -en "travis_fold:start:smoketest\\r\\033[0K"
- |
macvim_excmd() {
${VIMCMD} -u NONE -i NONE -g -f -X -V1 -es "$@" -c 'echo ""' -c 'qall!' 2>&1
}
- if [[ -n "${LANGOPT}" ]]; then macvim_excmd -c 'lua print("Test")'; fi
- if [[ -n "${LANGOPT}" ]]; then macvim_excmd -c 'perl VIM::Msg("Test")'; fi
- if [[ -n "${LANGOPT}" ]]; then macvim_excmd -c 'py import sys; print("Test")'; fi
- if [[ -n "${LANGOPT}" ]]; then macvim_excmd -c 'py3 import sys; print("Test")'; fi
- if [[ -n "${LANGOPT}" ]]; then macvim_excmd -c 'ruby puts("Test")'; fi
# Check that localized messages work by printing ':version' and checking against localized word
- if [[ -n "${HAS_GETTEXT}" ]]; then macvim_excmd -c 'lang es_ES' -c 'version' | grep Enlazado; fi
# Make sure there isn't any dynamic linkage to third-party dependencies in the built binary, as we should only use
# static linkage to avoid dependency hell. Test that all those dylib's are in /usr/lib which is bundled with macOS and not third-party.
- (! otool -L ${VIMCMD} | grep '\.dylib\s' | grep -v '^\s*/usr/lib/')
# Make sure we are building x86_64 only. arm64 builds don't work properly now, so we don't want to accidentally build
# it as it will get prioritized by Apple Silicon Macs.
- (lipo -archs ${VIMCMD} | grep '^x86_64$')
- (lipo -archs ${MACVIM_BIN} | grep '^x86_64$')
- echo -en "travis_fold:end:smoketest\\r\\033[0K"
# Run standard test suites.
- echo -e "\\033[33;1mTesting MacVim\\033[0m" && echo -en "travis_fold:start:test\\r\\033[0K"
- make test
- make -C runtime/doc vimtags VIMEXE=../../src/MacVim/build/Release/MacVim.app/Contents/bin/vim
- echo -en "travis_fold:end:test\\r\\033[0K"
- echo -e "\\033[33;1mTesting MacVim (GUI)\\033[0m" && echo -en "travis_fold:start:test_gui\\r\\033[0K"
- make -C src/testdir clean
- make -C src testgui
- echo -en "travis_fold:end:test_gui\\r\\033[0K"
jobs:
include:
- osx_image: xcode12.2
<<: *lang_env
<<: *homebrew
<<: *caches
# Disable unnecessary builds to cut down on Travis usage due to billing changes for open-source projects.
#- osx_image: xcode11.6
#- osx_image: xcode9.4
#- osx_image: xcode7.3
- stage: deploy
osx_image: xcode12.2
<<: *lang_env
<<: *caches
script: skip
before_deploy:
# Use the --skip-jenkins flag to skip the prettify osascript calls which will fail due to permission issues in Travis CI's Mac environment.
- make -C src macvim-dmg CREATEDMG_FLAGS=--skip-jenkins
deploy:
provider: releases
token:
secure: ukjm+qbuNiTli25Ut2BoVpeBCV+JyVbRUwPqjTKrJxfHz34bpr38eSbryIB8BgKBItgzE876Yoqa3CD0k8mqGClis1+98MtrYFpAkO97juJmHpcZZZB7ausbHGf7Z7VdMT4jBjjVGcBeaNj0mio0hwem0/S4WyJK3M/3Fym995CltCUtJKRfMvRiGkWZqUs8K7EZf53DFR6CXUn38rq/3B88SeK51OZuCkMsiDWLGYCdayH19vJfFrTF8MYMQYDYxz16Q/Kf21PVhwia7HEhOzqnXS8RXS+vLkZw8mzIxowX+w6NT90q7Sj0ENdR7YaS27QPfDdhZEnOgpgqj+za63lpiyIdRcgSBkGxNYrM6B5KhiwC1VocBxCBdCxT5WXlx9rA9+k4CASdsxAW/MtQOK6PRMfZEnAB+ShFvshM2H/iE5Jch+o/SIjCXhdkeASD5qov2x6eXcsEVu8PIxvEUptCpHeqJTN5/26nfKsvOdrsqbwJbDluwISOKfEPhohb8Hn7JqOJNTS2aJr3jfvU+egE1NS0eLqKPXecu7MOOsOq1CQL6WxblphG2JCCmAOuNMYrJx9+w28ekMDRDAbI9r5nWcPLZtBqjFUyuBXXM7UknMar0FZ2fd7YTi/Gki3n56UN0lKaSAKaJB9EXlneDSKp/1ogsETr9/b7jz0s6lI=
file: src/MacVim/build/Release/MacVim.dmg
skip_cleanup: true
draft: true
on:
all_branches: true
tags: true
repo: macvim-dev/macvim
# vim:set sts=2 sw=2 tw=0 et: