You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The copy-artifacts.yaml workflow takes ~11 minutes per run, which is the longest step on this repo's CI. Each push runs it. With the broader CI matrix queued behind it on shared Ubuntu runners, this is the dominant feedback-loop cost.
Breakdown
Each run performs:
Checkout
Nix install + cache restore
soldeer install
Meta regeneration via the rain CLI (the rainlang-meta task in flake.nix)
Pointer regeneration script
Solidity compile (src/ + script/ + test/)
ABI-copy script (jq-extract deterministic subset of 11 contracts)
Format check
git diff --exit-code
Each nix develop / nix run invocation pays some Nix evaluation overhead even when the store is warm.
Likely wins
Combine steps into a single nix develop session. Multiple separate nix develop invocations each re-evaluate the flake. Wrapping the 5 sol-shell steps in one session saves N-1 evaluations.
Skip the standalone build when the ABI-copy script can derive what it needs from the prior step. Pointer regeneration + ABI copy together touch all 11 target contracts; if those scripts trigger compilation of their imports, a separate build step is redundant.
Cache foundry artifacts across runs (~/.foundry/cache, cache/, out/) — currently cold every run.
Conditional execution — if the pushed commit doesn't touch any *.sol, *.toml, *.nix, meta/, or crates/abi/, skip the whole job.
Notes
rain.math.float's copy-artifacts.yaml is structurally similar but smaller (2 contracts vs 11) and has no meta-build step. The same fixes apply there.
The
copy-artifacts.yamlworkflow takes ~11 minutes per run, which is the longest step on this repo's CI. Each push runs it. With the broader CI matrix queued behind it on shared Ubuntu runners, this is the dominant feedback-loop cost.Breakdown
Each run performs:
git diff --exit-codeEach
nix develop/nix runinvocation pays some Nix evaluation overhead even when the store is warm.Likely wins
nix developsession. Multiple separatenix developinvocations each re-evaluate the flake. Wrapping the 5 sol-shell steps in one session saves N-1 evaluations.~/.foundry/cache,cache/,out/) — currently cold every run.*.sol,*.toml,*.nix,meta/, orcrates/abi/, skip the whole job.Notes
copy-artifacts.yamlis structurally similar but smaller (2 contracts vs 11) and has no meta-build step. The same fixes apply there.rainix-copy-artifacts.yamlreusable, these wins should land in the reusable rather than per-repo.