They’ve changed how caching works a bit in version 2 (which wasn’t intuitive for me btw) but even so I hardly get past one and a half minutes to compile test and dev, run dialyzer, ex unit, and then credo as well for a demo phx + ecto project … but yeah, I’ve never reached sub-minute runs.
I’ll upload that demo project with semaphore config on github, maybe someone would find it useful.
For comparison, the same project with mix release but without dialyzer (so it’s a relatively fair comparison, one compiles dev, the other prod, then both run a “task”) takes 5 minutes on free-tier public gitlab-ci.
Just checked, by stages:
- get deps: 12 seconds (cached)
# these two run in parallel
- compile for test: 13 seconds (cached)
- compile for dev, build plts: 16 seconds (cached)
# these four run in parallel
- ex unit: 21 seconds
- credo: 16 seconds
- dialyzer: 18 seconds
- formatter: 11 seconds
exited after 66 seconds
Our team lead managed to make it work… only not 100% of the time, with some symlink and copying and touch trickery, but it’s finicky. Can’t blame him, Semaphore didn’t make this obvious.
Anyway, the default pipeline for this particular project finishes in one minute and twenty seconds, it runs ~60 dummy tests, as well as some credo and dialyzer checks.
That looks very handy. It would be great if there was a public repo with examples for a simple project like that but for all the major CI vendors/setups.