Using `$CI_COMMIT_REF_NAME` means we get `master` for every image build,
which is not very useful/informative. Using `$CI_COMMIT_SHORT_SHA`,
on the other hand, makes it possible to see exactly from which commit an
image was built.
The average german man has a life expectancy of 78.7 years, or 689884.2 hours.
Assuming that Timo is 20 years old, he has rougly 514564.2 hours left on planet earth.
Also assuming that cross release builds took him 25 minutes before,
but 2-2.5x of that with the current release compilation config he wasted roughly an hour waiting for it to complete.
If he continued to work on Conduit for 20 more years (or 175320 hours),
and makes a release compilation about once per day, this means 7305 hours or 304 days wasted waiting for the rust compiler.
By cutting that back down to the original settings, he get's 182 days of his life back.
That's about 0.63% of his remaining life.
182 joyful days he can spend with family and loved ones.
Testing needs compilation and is slow. Format checking is quick.
As format checking fails more often than tests,
switching them should result in faster failure and feedback
Setting cargo to run incremental builds means partial build results should be cached. This is not enabled by default in release mode.
Incremental builds use 256 codegen units by default [1].
We set them to 16 (release default) again for somewhat faster code but slightly slower builds.
[1]: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
By default, jobs without tags only run on CI runners configured to do so [1].
Conduit can use famedly runners, which are more powerfull than gitlab's runners, but require a tag on the job to run it there.
This commit tags each job with the "docker" tag.
On the famedly/conduit repo this means faster CI.
On other gitlab.com forks the normal ci.
Selfhosted gitlab's might need to add a "docker" tag to their runner.
[1]: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#use-tags-to-limit-the-number-of-jobs-using-the-runner