-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cache dependencies (e.g. YARP) in Travis #48
Comments
Another example of caching (CMake + YARP): roboticslab-uc3m/project-generator. BTW those larger blocks of YAML code (example) could be better placed as standalone shell scripts in |
Build times have been cut by a half thanks to roboticslab-uc3m/kinematics-dynamics@9bc689c...e21895c (cache YARP + KDL deps). Two issues arise:
|
I'd like to solve roboticslab-uc3m/installation-guides#13 first, but not marking as blocked until further investigation. As spoken with @jgvictores, let's add another shell script for use by Travis that would extract/deduce the time of creation of the latest cache, then invalidate an regenerate it if older than, say, one week. A new cron job launched once per week would perform this sequence again so that we don't need to wait for the next push build (which may or may not happen in a long time). Also, let's clone and store latest YARP master in this cache instead of a specific release. |
Regarding dependencies, caching and containerization: robotology/yarp#1625. |
Fixed at roboticslab-uc3m/kinematics-dynamics@ebcfb55.
No more ACE, and the only relevant |
Alternatively, check the latest remote commit against a cached copy, then only invalidate and regenerate the cache if not the last one. Would need a clone operation (other option involves a SSH connection per this SO answer), but it could improve times significantly when working with non-tagged dependencies such as OpenRAVE. Edit: not so straightforward with GitHub, requires adding SSH keys. Edit 2 (note to self): clone only specific branches (e.g. |
Notes:
|
Per https://blog.travis-ci.com/2017-09-12-build-stages-order-and-conditions:
|
I have refactored the caching script (now it's a single .sh file that accepts several options via CLI) and applied it to all kin-dyn's dependencies at roboticslab-uc3m/kinematics-dynamics@fe405d3. Notes:
|
In fact, YARP's master branch builds would make sense once per week, so keep them. Perhaps I could configure Travis in such a way that release builds (e.g. YARP 2.3.70.2, 2.3.72.1, etc.) are added with Edit: however, other dependencies (e.g. KDL, OpenRAVE, our RL projects...) might respond differently to distinct YARP releases. It would make sense to test everything on weekly cron builds, then. |
Idea: move Travis-related bash scripts (in |
Remark: ccache (official page) does not seem to improve build times. In fact, they are significantly worse on the first (cold) run, and perhaps a bit longer than usual on successive (warm) runs. |
Some updates on this:
|
Alternatively, use git submodules that point to a branch (usually, they point at a specific commit): https://www.activestate.com/blog/2014/05/getting-git-submodule-track-branch. See also https://git-scm.com/docs/gitmodules. |
In recent versions of Git, specific branches can be tracked - there is a convenient On the other hand, gists can be either cloned (full history) or downloaded (specific or latest commit). However, they must live in a user account. Edit: check my submodule experiments at roboticslab-uc3m/kinematics-dynamics@f7f22f2 (Travis CI). |
Looking at roboticslab-uc3m/kinematics-dynamics@f7f22f2 and not fully understanding everything... I guess https://github.com/PeterBowman/travis-scripts is something that existed at some time? |
Yes, I just moved the contents of Let's speak about this f2f tomorrow. |
As spoken with @jgvictores, and as a better alternative to using Gists, we could move those scripts to a separate repo (just as I did) and treat it as another hard dependency. Then, Travis would process it in the Since this is not a priority, (harmless) duplicates of said scripts will be created for now. |
See implementation at roboticslab-uc3m/kinematics-dynamics@c597f7a. |
For future reference (on using |
@jgvictores would you like to have this enabled on xgnitive, too? (30 minutes per job ATOW) |
That would be very very nice! |
Done at roboticslab-uc3m/xgnitive@8c2f26c. BTW the |
Done on all Travis-enabled repos except gait. Final notes:
|
The cache is invalidated after 28 days (ref):
Anyway, that policy is enforced for dangling/old branches, I'm not sure whether the cache files for an active branch (say, develop) would be deleted if not changed - even if used regularly (cron jobs). Manual invalidation is still recommended in the aforementioned case, see #83. |
Thanks to #17, weekly cron jobs automatically test latest commits on production against YARP's
devel
branch. Currently, YARP needs to be cloned and built on every push action, and so do other dependencies (e.g. KDL, PCL, OpenRAVE).Proposal: for non-cron jobs (perhaps cron too if it makes sense), store YARP (and other dependencies if present) in the Travis cache (docs) in order to speed up things. It's preferrable to hold a global variable with the targeted version so that it can be easily bumped in the YAML file with every new release. Speaking of YARP, current
master
is tagged at 2.3.72.Caching has been extensively tested on https://github.com/asrob-uc3m/robotDevastation, see .travis.yml and latest builds.
The text was updated successfully, but these errors were encountered: