-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make CI faster #587
Make CI faster #587
Conversation
because it is not necessary for running CI
Removing --with-override-system-vim can install MacVim with a binary package (bottle).
because running linters takes the longest time among CI jobs
Great work! I'll leave proper review for someone who knows CIs better than me, but I like these changes 👍
Good catch! 👍 |
@ujihisa Thank you. I assigned you since you're more familiar with macOS than me. From macOS (Homebrew) user point of view, I'd be happy if you check the changes. |
(I used to be a professional MacVim user. Currently I have no MacBooks/iMacs...) |
- covimerage write_coverage $THEMIS_PROFILE | ||
- coverage xml | ||
- bash <(curl -s https://codecov.io/bash) | ||
- bash scripts/coverage.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional] i slightly prefer moving this line after themis line.
it doesn't need to be run with RUN_LINT=true, so it's a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me confirm: 'themis line' means the line which runs unit tests with themis.vim, am I correct?
If so, we can't move this line to script
section because coverage should be taken only if CI was successfully done.
The guard $RUN_LINT == ""
is in coverage.sh
, but separating scripts into another file may make understanding what is done harder.
Do you think we should write the script directly in .travis.yml
as follows?
- |
if [[ "${RUN_LINT}" == "" ]]; then
covimerage write_coverage $THEMIS_PROFILE
coverage xml
bash <(curl -s https://codecov.io/bash)
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot we run like this?
Another option is use &&
to run coverage scripts.
- if [[ "${RUN_LINT}" != "true" ]]; then
/tmp/vim-themis/bin/themis --runtimepath /tmp/vimproc --exclude ConcurrentProcess --reporter dot
bash scripts/coverage.sh
fi
One additional good point to do this is that we can upload coverage scripts when another commands failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also ok. I'll choose it. Thank you for your advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that the fix for this causes some problem on macOS: https://travis-ci.org/vim-jp/vital.vim/jobs/391106600
I don't have enough time to investigate so let me skip this for now (since it's just an option).
scripts/install-vim.sh
Outdated
git clone --depth 1 --branch "${VIM_VERSION}" https://github.com/vim/vim /tmp/vim | ||
cd /tmp/vim | ||
./configure --prefix="${HOME}/vim" --with-features=huge \ | ||
--enable-perlinterp --enable-pythoninterp --enable-python3interp \ | ||
--enable-rubyinterp --enable-luainterp --enable-fail-if-missing | ||
--enable-rubyinterp --enable-fail-if-missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just curious how it would speed up if --enable-rubyinterp
was removed,
if it is not too much to ask...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not consider that. Let me try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyru I tried removing if_perl
and if_ruby
, but could not see performance improvements https://travis-ci.org/rhysd/vital.vim/builds/390581618
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhysd Thanks!!
Then I think if_perl
and if_ruby
should be left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmmmm, @lambdalisue told me that if_perl
and if_ruby
sometimes causes build error... (on vim-jp #vital-dev slack)
So now I feel removing language interfaces as possible is the right policy then...
Now I remember language interfaces sometimes doesn't follow the latest language's change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, fixed.
❌ if_perl and if_ruby causes build error
⭕ if_perl and if_ruby sometimes causes build error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think --enable-luainterp
should be removed while some codes in vital.vim relies on that feature.
https://github.com/vim-jp/vital.vim/search?p=1&q=lua&unscoped_q=lua
I'm very welcome to remove --enable-rubyinterp
or --enable-perlinterp
while no codes in vital.vim uses that features and it sometime cause build errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think vital needs +lua/dyn
for Text/Sexp
Note: It's a bit beyond this PR but I've found that using Docker is quite useful to test on Linux. https://github.com/lambdalisue/gina.vim/blob/master/.travis.yml#L40-L43 |
Definitely. Moving to Docker container might be a future work to improve this further. |
scripts/install-vim.sh
Outdated
git clone --depth 1 --branch "${VIM_VERSION}" https://github.com/vim/vim /tmp/vim | ||
cd /tmp/vim | ||
./configure --prefix="${HOME}/vim" --with-features=huge \ | ||
--enable-perlinterp --enable-pythoninterp --enable-python3interp \ | ||
--enable-rubyinterp --enable-luainterp --enable-fail-if-missing | ||
--enable-rubyinterp --enable-fail-if-missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think --enable-luainterp
should be removed while some codes in vital.vim relies on that feature.
https://github.com/vim-jp/vital.vim/search?p=1&q=lua&unscoped_q=lua
I'm very welcome to remove --enable-rubyinterp
or --enable-perlinterp
while no codes in vital.vim uses that features and it sometime cause build errors.
scripts/install-vim.sh
Outdated
brew install macvim | ||
# Instead of --with-override-system-vim, manually link the executable because | ||
# it prevents MacVim installation with a bottle. | ||
ln -s "$(brew --prefix macvim)/bin/mvim" "/usr/local/bin/vim" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
export THEMIS_VIM="$(brew --prefix macvim)/bin/mvim"
instead?
Outdated but
|
Test using Lua is only |
Please ignore Text.Sexp. I'm planning to deprecate its lua version, along with #582 (Text.Sexp and brainf**k modules depended on it) (I'll make another pullreq to deprecate them.) |
👍 for ignore |
👏 let's merge 👏 |
Still remaining issue exists #587 (comment) |
d5c6616
to
4e9a28e
Compare
@tyru @ujihisa @haya14busa @lambdalisue @raa0121 @thinca Thank you for your reviews |
🎉🎉🎉 |
I made running CI faster.
Before: https://travis-ci.org/vim-jp/vital.vim/builds/390362502
After: https://travis-ci.org/rhysd/vital.vim/builds/390389523
Total: 5min 47sec -> 4min 2sec (1min 45sec faster)
Optimizations:
--with-lua
could be omitted by this change)vim
executable directly (--with-override-system-vim
could be omitted by this change)I assigned people as reviewers who would be familiar with
Fix #534