Skip to content

ci optimizations - #8881

Draft
kanej wants to merge 3 commits into
mainfrom
ci-low-hanging-fruit
Draft

kanej wants to merge 3 commits into
mainfrom
ci-low-hanging-fruit

Conversation

@kanej

@kanej kanej commented Nov 24, 2026

Copy link
Copy Markdown
Member

A small set of CI optimizations to improve CI performance.

@changeset-bot

changeset-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b4032c5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

hardhat

Total size of the bundle: 42M
Total number of dependencies (including transitive): 38

List of dependencies (sorted by size)
33M	total
7.3M	@sentry/core
5.2M	zod
3.8M	micro-eth-signer
2.2M	undici
2.2M	@noble/curves
1.8M	@noble/hashes
1.5M	@nomicfoundation/hardhat-utils
1.1M	@noble/ciphers
884K	@nomicfoundation/hardhat-vendored
792K	@streamparser/json
700K	@nomicfoundation/hardhat-errors
536K	@scure/bip39
508K	ethereum-cryptography
504K	tsx
468K	micro-packed
408K	json-stream-stringify
320K	enquirer
320K	@nomicfoundation/hardhat-zod-utils
312K	semver
216K	adm-zip
208K	@scure/base
204K	ws
188K	@streamparser/json-node
168K	esbuild
160K	fast-equals
156K	@nomicfoundation/edr
108K	@scure/bip32
100K	chokidar
80K	p-map
72K	@nomicfoundation/solidity-analyzer
56K	rfdc
48K	ansi-colors
44K	resolve.exports
44K	readdirp
24K	strip-ansi
24K	is-safe-filename
24K	env-paths
24K	ansi-regex

@kanej kanej added no changeset needed This PR doesn't require a changeset no docs needed This PR doesn't require links to documentation no peer bump needed labels Nov 24, 2026
@kanej
kanej force-pushed the ci-low-hanging-fruit branch from 80f9375 to 1272294 Compare November 25, 2026 10:26
The merge queue fast-forwards `main` to a commit its `merge_group` run
has already tested, so the push run repeated that run on the same SHA.
It was 186 of the last 195 pushes to `main`, and about 18% of the
workflow's runner time.

The other 9 pushes went past the queue. `main` now refuses direct
pushes, so every commit on it has passed the queue first, and the push
run has nothing left to check. `workflow_dispatch` still allows a manual
run on `main`.
The restore in `setup-env` looked up `node-cache-<os>-pnpm-<hash>`,
while `cache.yml` saved through `actions/setup-node` under
`node-cache-<os>-<arch>-pnpm-<hash>`. The keys never matched, so every
`ci.yml` job logged "Cache not found" and installed cold, while the
saved caches filled the repository's 10 GB cache store.

Fixing the key made things slower. Timed over eight jobs per runner,
restoring the store and then installing took 7.5-10 s on Linux against
a 6 s cold install, 32-45 s on macOS and 22-37 s on Windows against
17-25 s. Downloading a 175-340 MB store costs more than pnpm fetching
what a package needs.

We remove the cache instead: `cache.yml` goes, along with `setup-env`'s
restore step and its `cache-save` input and `cache-hit` output, which
only `cache.yml` used.
…ages

Every Linux job installs `libusb-1.0-0-dev` and `libudev-dev`, which
`node-hid` needs when its prebuilt binary cannot be downloaded. On the
ARM runners `libudev-dev` pulls in a systemd upgrade, and dpkg's
triggers then rebuild the initramfs: about 13 of the step's 25 seconds,
on a machine that is discarded after the job and never boots it. On x64
the man-db trigger costs another second or so.

We now turn both off before installing, and skip the recommended
`libusb-1.0-doc`. The packages themselves are still installed.
@kanej
kanej force-pushed the ci-low-hanging-fruit branch from 1272294 to b4032c5 Compare November 25, 2026 11:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changeset needed This PR doesn't require a changeset no docs needed This PR doesn't require links to documentation no peer bump needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant