The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hyperlane-monorepo/.github/actions/yarn-build-with-cache/action.yml

24 lines
475 B

feat: remove extraneous caching (#4469) feat: remove yarn build cache - saves 600MB of cache space PER COMMIT - doesn't impact overall per-commit CI time - better CI time in the general case due to fewer cache evictions on the e2e matrix job - [with caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797745470) vs [no caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797213927?pr=4469) drive-by: disable docker caching for agent build - currently cache has no impact on build time of the agent image - rerunning builds for a commit or pushing empty commits should in theory lead to quicker builds with layer caching, but the main problem is that the `RUN` step of building the agents is not cached by the docker action - only RUNs with bind mounts get a checksum computed [(reference)](https://docs.docker.com/build/cache/invalidation/#general-rules) - disabling docker build caching could help save a bunch of cache space - best way to 4x speed here is moving this job to a buildjet 8vcpu runner (read [here](https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4445) for more info) drive-by: TLC - update to latest docker build action - provides a nice build summary and can generate artifacts that help break down where build time is spent - update check-env before build, given the current deprecation annotations - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - coverage step doesn't need to wait for `yarn-test` anymore
2 months ago
name: 'Yarn Build with Cache'
description: 'Run yarn build using yarn cache'
inputs:
ref:
description: 'The Git ref to checkout'
required: true
runs:
using: "composite"
steps:
- name: Cache
uses: buildjet/cache@v4
feat: remove extraneous caching (#4469) feat: remove yarn build cache - saves 600MB of cache space PER COMMIT - doesn't impact overall per-commit CI time - better CI time in the general case due to fewer cache evictions on the e2e matrix job - [with caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797745470) vs [no caching](https://github.com/hyperlane-xyz/hyperlane-monorepo/actions/runs/10797213927?pr=4469) drive-by: disable docker caching for agent build - currently cache has no impact on build time of the agent image - rerunning builds for a commit or pushing empty commits should in theory lead to quicker builds with layer caching, but the main problem is that the `RUN` step of building the agents is not cached by the docker action - only RUNs with bind mounts get a checksum computed [(reference)](https://docs.docker.com/build/cache/invalidation/#general-rules) - disabling docker build caching could help save a bunch of cache space - best way to 4x speed here is moving this job to a buildjet 8vcpu runner (read [here](https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4445) for more info) drive-by: TLC - update to latest docker build action - provides a nice build summary and can generate artifacts that help break down where build time is spent - update check-env before build, given the current deprecation annotations - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - coverage step doesn't need to wait for `yarn-test` anymore
2 months ago
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
fail-on-cache-miss: true
- name: Build
shell: bash
run: yarn build