If building dependencies takes too long for Travis job timeout, https://docs.travis-ci.com/user/build-stages/warm-cache/ suggests making a “starter” job that builds just them, while others use its cached results.
However, Travis jobs run concurrently. How do I ensure that other jobs run after the “warm-up” job?
There don’t seem to be any features to mark job interdependencies or anything. The example is using some feature that seems to be specific to bundler
for that.
Moreover, a project I have in mind may require multiple cache warm-ups 'cuz the net time for building all dependencies is currently about 50 minutes – so the build is going to be not 2- but 3-stage – which is something the example doesn’t cover.
Limiting concurrent jobs to one is not an option because there are many jobs, so the build will be complete faster if I instead write logic that terminates the build if it takes too long and continues from cache after I restart the build in Travis UI.