Skip to content

Commit

Permalink
Merge pull request #475 from srid/ci-closure-size
Browse files Browse the repository at this point in the history
Fix closure size; check in CI to prevent future regressions
  • Loading branch information
srid authored Dec 10, 2023
2 parents 0829c75 + 47a2ea8 commit 2b53401
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ pipeline {
steps {
// https://github.com/srid/nixci
nixCI ()
// Ensure that closure size has not blown up.
sh '''
MAX_CLOSURE_SIZE=$(echo "600 * 1000000" | nix run nixpkgs#bc)
CLOSURE_SIZE=$(nix path-info --json -S .#default | nix run nixpkgs#jq '.[0]'.closureSize)
echo "Emanote closure size: $CLOSURE_SIZE"
echo " Max closure size: $MAX_CLOSURE_SIZE"
if [ "$CLOSURE_SIZE" -gt $MAX_CLOSURE_SIZE ]; then
echo "ERROR: Emanote's nix closure size has increased"
exit 3
fi
'''
}
}
stage ('Cachix push') {
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
justStaticExecutables = true;
removeReferencesTo = [
self.pandoc
self.pandoc_3_1_6
self.pandoc-types
self.warp
];
Expand Down

0 comments on commit 2b53401

Please sign in to comment.