Qqwy
We’re adding continuous integration to our application.
@sorentwo was able to give me some advice to split up the testing into separate stages, but the main issue: compilation time having a huge impact on CI-execution times, remains.
Currently, running the test takes about 20 seconds. However, compiling the project from scratch the first time takes a whopping 140 seconds. On Travis CI, this compilation is done on every test run, significantly slowing down the feedback loop.
I’ve tried to cache the compilation/build artefacts by adding the _build-directory to the Travis CI cache, but I’m not sure if I either made a mistake in how Travis’ caching configuration should be used, or in how Mix decides to re-compile your dependencies, because it is still compiling everything during every test run.
see for instance this test run
The Travis CI config that is currently being used can be found here.
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
You have not added
depsto the cache, so you have to re-download the dependencies again each time, and as you have recently downloaded them the compiler will recompile them. And as deps are recompiled, your own application will as well.Qqwy
Ah, I see!
Awesome! With this change, any build only takes about a minute, rather than almost four
.
sorentwo
Ah, of course, caching the deps makes total sense. In our CircleCI builds we cache the deps and _build directories using their powerful but highly obtuse build configuration. It didn’t occur to me to do the same for Travis.