-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
travis: All GHCs use same cache; check whether that's OK #130
Comments
In general, it certainly seems that how Haskell is currently set up on Travis (see #127 for another investigation on the state of the world) kind of gives the feeling of "held together with duct tape". The external repository needed to get 7.10, the hack using the |
After we merge #128 , the distinct I propose we wait that to check if the cache problem goes away.. |
https://github.com/travis-ci/travis-build/blob/0cd467fff60472c85c9e81735ddeefebd1448b0d/lib/travis/build/script/c.rb#L33 / https://github.com/travis-ci/travis-build/blob/maser/lib/travis/build/script/c.rb#L33 seem to indicate that the cache used depends solely on the In either case, it's agreed we can wait. Another reason we can wait is I haven't observed cache problems with this particular project just yet. |
I checked Travis build 315's raw logs and looks like it is respecting the build matrix and using distinct cache files as expected.
In build 313.4, I guess it didn't find the cache, because it was the first build with GHC 8.0.1 in master:
I guess the cache problem is gone, right? Am I missing something here, @petertseng ? And thank you for all the PRs related to _Travis_. 👍 |
Excellent, since the presence of travis-ci/travis-build@89b5d3f#diff-2c4750a8306b986377ec52a74df7a87f , the problem I described is solved automatically and the |
Currently, our Travis builds use the same package cache for all three versions of GHC that we test, which could cause strange behaviors (but luckily has not, so far).
This bit me when I was setting up Travis on one of my own projects. This will not necessarily be an problem for this track (and this issue could be closed if we think that), but this issue will serve as documentation of what could happen and how to fix it.
If there are problems related to this, I predict symptoms will manifest in one of two ways:
This happened to me because a package was only being pulled in as a dependency in certain GHC versions. The inconsistency caused my different versions to fight with each other for which list of packages was correct to cache (It means I never got cache hits even when I should have).
If this becomes a problem, the remediation is to add a
compiler:
key in the matrix in travis.yml (https://github.com/hvr/multi-ghc-travis/blob/master/make_travis_yml.hs will generate an example yaml file, or take a look at https://github.com/ekmett/lens/blob/master/.travis.yml for a generated example). This will cause Travis to use separate caches for each GHC version, which should avoid both issues above.You can confirm the cache behavior by looking at the build logs and expand the arrow next to "Setting up build cache". You should see a line that looks like:
If all builds are using the same cache, that
tgz
name will be the same across all versions. If they are different, you might instead see something like:The text was updated successfully, but these errors were encountered: