We want our build environment to:
- Build libraries, executables, test and benchmarks in a single job
- Run test suites in a separate job
- Run benchmark suites in a separate job
Is it possible with either stack (preference as we use it already) or cabal to easily pull the built tests/benchmarks out of the artifacts?
Currently with stack we have to download both of:
- Dependency cache (~/.stack) [global dependency cache]
- Local build artifacts (repo/.stack-work) [generated from the build job]
in order to run the tests/benchmarks without rebuilding anything. If (1) isn’t present stack --test ...
breaks and if (2) isn’t present we have to rebuild everything again. I’d like to simply make the tests and benchmarks available to the next job rather than everything from the previous build.
Is there a better way? I don’t have a problem switching to cabal if there’s a better story there but I do hope there’s a way to separate out building and running tests/benchmarks with minimal caching overheads.