Speed up Nix-based CI - #5
Merged
Merged
Conversation
gmile
marked this pull request as ready for review
July 14, 2026 15:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.#ciNix shell usingbeamMinimal29Packagesflake.nixin build and PLT cache invalidationWhy
The 6m15s release-commit CI run spent 3m12s building an empty Dialyzer PLT, 38s compiling without a build cache, and 33s realizing the full Nix shell. The full OTP/Elixir closure is 1.1 GiB because it includes wx, WebKitGTK, GStreamer, and systemd; the locked minimal OTP 29 package set is 222.6 MiB and still provides Elixir 1.20.2, OTP 29.0.3, Hex 2.5.1, and Rebar 3.27.0.
Exact cache keys remain authoritative. Restore prefixes only reuse artifacts built with the same
flake.nix/flake.locktoolchain, allowing Mix and Dialyxir to incrementally update them after dependency changes instead of rebuilding from zero.Measured GitHub Actions results
The cold run is 1m53s (30%) faster than the baseline. Once the toolchain-aware caches are populated, the workflow is 5m02s (80%) faster than the cold baseline and 1m00s (45%) faster than the prior 2m13s warm path.
Impact
_buildtreeLocal validation
nix flake checkdefaultandcishell derivations evaluatednix develop .#cinix develop .#cimix hex.buildsucceeded through the minimal shell