-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[RDY] ci: Travis: improve/revisit caching #10358
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
Conversation
Does not work like this..
Would also need to move/handle this in |
b7eb31e
to
04ce175
Compare
I've left |
I'd say (a) for now. git clone can be slow, and very noisy in the logs... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This is required to (re)build e.g. libluv when the version changes (which triggers a new download). With `make deps`, changing the `LUV_URL`/`LUV_SHA256`, and `make deps` again: Before: > Up-to-date: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a After: > Installing: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a See with neovim#10358 - where .deps contained libluv 1.29, the merge updates it to 1.30, but then it failed to link because `libluv.a` is considered to be up-to-date (after downloading the new version). Note that header files get installed, since they have the original time stamp, but `libluv.a` is being generated (does not use the timestamp from the archive here, but needs to get rebuild). It could be argued that the build system of the included project should catch/handle this, but it seems to be good practice to clean the binary / build dir with a new download to start from scratch. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19452 Also fixes cmake/BuildLuv / luv-static: use name with -DTARGET for download command, and pass (shared) `SRC_DIR` explicitly instead.
This is required to (re)build e.g. libluv when the version changes (which triggers a new download). With `make deps`, changing the `LUV_URL`/`LUV_SHA256`, and `make deps` again: Before: > Up-to-date: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a After: > Installing: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a See with neovim#10358 - where .deps contained libluv 1.29, the merge updates it to 1.30, but then it failed to link because `libluv.a` is considered to be up-to-date (after downloading the new version). Note that header files get installed, since they have the original time stamp, but `libluv.a` is being generated (does not use the timestamp from the archive here, but needs to get rebuild). It could be argued that the build system of the included project should catch/handle this, but it seems to be good practice to clean the binary / build dir with a new download to start from scratch. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19452 Also fixes cmake/BuildLuv / luv-static: use name with -DTARGET for download command, and pass (shared) `SRC_DIR` explicitly instead.
This is required to (re)build e.g. libluv when the version changes (which triggers a new download). With `make deps`, changing the `LUV_URL`/`LUV_SHA256`, and `make deps` again: Before: > Up-to-date: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a After: > Installing: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a See with #10358 - where .deps contained libluv 1.29, the merge updates it to 1.30, but then it failed to link because `libluv.a` is considered to be up-to-date (after downloading the new version). Note that header files get installed, since they have the original time stamp, but `libluv.a` is being generated (does not use the timestamp from the archive here, but needs to get rebuild). It could be argued that the build system of the included project should catch/handle this, but it seems to be good practice to clean the binary / build dir with a new download to start from scratch. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19452 Also fixes cmake/BuildLuv / luv-static: use name with -DTARGET for download command, and pass (shared) `SRC_DIR` explicitly instead.
27b4a8b
to
bffec1c
Compare
bffec1c
to
874d80c
Compare
Should be good. Will compare logs after rebuild. |
- use CACHE_NVIM_DEPS - do not cache pip This is handled through http caches in general/better, and it is not used much anyway. - do not cache DEPS_DOWNLOAD_DIR / nvim-deps-downloads Built deps are cached, downloads are not needed then. - display ccache stats before clearing - ci/before_cache.sh: do not cache ccache stats - improve du (do not list pages of output for "/home/travis/.cache/go-build")
dd608cd
to
e107f94
Compare
.travis.yml
Outdated
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" | ||
# Environment variables for Valgrind. | ||
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log" | ||
- CACHE_NVIM_DEPS="$HOME/.cache/nvim-deps" |
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.
should have a _DIR
suffix, like BUILD_DIR etc.
# Do not fall back to cache for "master" for PR on "release" branch: | ||
# adds the target branch to the cache key. | ||
FOR_TRAVIS_CACHE=$TRAVIS_BRANCH | ||
FOR_TRAVIS_CACHE=v1-$TRAVIS_BRANCH |
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.
what does "v1" mean?
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.
"version 1" - I've used it to bump/discard the existing cache(s).
- use CACHE_NVIM_DEPS_DIR - do not cache pip This is handled through http caches in general/better, and it is not used much anyway. - do not cache DEPS_DOWNLOAD_DIR Built deps are cached, downloads are not needed then. - display ccache stats before clearing - do not cache ccache stats - improve output of `du` (do not list pages of output for "/home/travis/.cache/go-build")
This is meant to not fall back to using the cache for the "master"
target branch, for release pull requests (targeting not "master").
TODO:
/home/travis/.cache/nvim-deps/build/downloads