Basically what I want is that the Compile compiles everything (including test code, and run unit tests) and then both the next stage just picks up where the compilation left if that makes sense.
I managed to organize the build to do that but:
either the compilation is re-done in each step or (like restarts)
by caching the whole ./ the compilation is saved…but then it ignores every new change I push (obviously).
The caching config I am using comes from the sbt documentation:
You should try the Travis feature (in beta) that allows you to share files from one job with subsequent jobs in a build, so the flow doesn’t get disrupted. Have a look at workspaces.
Also, SBT 1.4 allows you to push build artifacts to a Maven server and fetch then again later, so not sure where exactly you’re having your issue at. sbt Reference Manual — Remote Caching.