Skip to content

Commit 5c5fa5c

Browse files
ci: push the dev shell's closure to the cache (#54)
The cache push builds the workspace packages and the pnpm store, but not the dev shell every CI job enters. A cold hosted runner therefore built the shell's tools (the release tools, the dependency sandbox and the comment checker) from source before any check ran, which took minutes. The push now also builds the dev shell and pushes its closure, as the other repositories' cache pushes already do. Co-authored-by: systemfsoftware-bot <318394648+systemfsoftware-bot@users.noreply.github.com>
1 parent 8b08888 commit 5c5fa5c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎.github/workflows/nix-cache-push.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ jobs:
8585
echo "::error title=nix-build-failed::${attr} did not build"
8686
fi
8787
done
88+
# The dev shell every CI job enters: pushed with its closure, so a cold runner downloads it instead of building it.
89+
if out=$(nix build --no-link --print-out-paths -L "${ref}#devShells.${SYSTEM}.default"); then
90+
printf '%s\n' "$out" >> "$RUNNER_TEMP/out-paths"
91+
else
92+
echo "dev-shell" >> "$RUNNER_TEMP/build-failures"
93+
echo "::error title=nix-build-failed::the dev shell did not build"
94+
fi
8895
8996
- name: Push the closures
9097
env:

0 commit comments

Comments
 (0)