feat: migrate large runners to buildjet (#4424)

feat: migrate large runners to buildjet
- includes migration to buildjet's cache
- benefits:
https://buildjet.com/for-github-actions/blog/launch-buildjet-cache#buildjet-cache-benefits
	- 20GB/week free cache is 2x what GHA provides
- drive-by: add restore-keys for the yarn caches
- more buildjet investigation notes
[here](https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4445)
pull/4477/head
Paul Balaji 2 months ago committed by GitHub
parent b91e0f446a
commit 085e7d0463
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/actions/yarn-build-with-cache/action.yml
  2. 2
      .github/workflows/agent-release-artifacts.yml
  3. 2
      .github/workflows/codespell.yml
  4. 2
      .github/workflows/rust-docker.yml
  5. 16
      .github/workflows/rust.yml
  6. 4
      .github/workflows/static-analysis.yml
  7. 4
      .github/workflows/storage-analysis.yml
  8. 11
      .github/workflows/test.yml

@ -10,7 +10,7 @@ runs:
using: "composite"
steps:
- name: Cache
uses: actions/cache@v4
uses: buildjet/cache@v4
with:
path: |
**/node_modules

@ -16,7 +16,7 @@ env:
jobs:
prepare:
runs-on: larger-runner
runs-on: ubuntu-latest
outputs:
tag_date: ${{ steps.taggen.outputs.TAG_DATE }}
tag_sha: ${{ steps.taggen.outputs.TAG_SHA }}

@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v4
- name: pip cache
uses: actions/cache@v4
uses: buildjet/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

@ -27,7 +27,7 @@ jobs:
run: echo "defined=true" >> $GITHUB_OUTPUT
build-and-push-to-gcr:
runs-on: ubuntu-latest
runs-on: buildjet-8vcpu-ubuntu-2204
# uses check-env to determine if secrets.GCLOUD_SERVICE_KEY is defined
needs: [check-env]

@ -30,8 +30,7 @@ defaults:
jobs:
test-rs:
runs-on: larger-runner
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
@ -43,7 +42,10 @@ jobs:
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "v3-rust"
prefix-key: "v3"
shared-key: "rust"
cache-provider: "buildjet"
save-if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
workspaces: |
./rust
- name: Free disk space
@ -57,8 +59,7 @@ jobs:
run: cargo test
lint-rs:
runs-on: larger-runner
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
with:
@ -72,7 +73,10 @@ jobs:
- name: rust cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "v3-rust"
prefix-key: "v3"
shared-key: "rust"
cache-provider: "buildjet"
save-if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
workspaces: |
./rust
- name: Free disk space

@ -24,12 +24,14 @@ jobs:
submodules: recursive
- name: yarn-cache
uses: actions/cache@v4
uses: buildjet/cache@v4
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-
- name: yarn-install
run: yarn install

@ -24,12 +24,14 @@ jobs:
node-version: 18
- name: yarn-cache
uses: actions/cache@v4
uses: buildjet/cache@v4
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-
- name: yarn-install
run: yarn install

@ -37,12 +37,14 @@ jobs:
submodules: recursive
- name: yarn-cache
uses: actions/cache@v4
uses: buildjet/cache@v4
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-
- name: yarn-install
run: |
@ -65,12 +67,13 @@ jobs:
fetch-depth: 0
- name: yarn-cache
uses: actions/cache@v4
uses: buildjet/cache@v4
with:
path: |
**/node_modules
.yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('./yarn.lock') }}
fail-on-cache-miss: true
- name: lint
run: yarn lint
@ -140,7 +143,7 @@ jobs:
fi
e2e-matrix:
runs-on: larger-runner
runs-on: buildjet-8vcpu-ubuntu-2204
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.base_ref == 'main' || github.base_ref == 'cli-2.0') || github.event_name == 'merge_group'
needs: [yarn-install]
strategy:
@ -171,6 +174,8 @@ jobs:
with:
prefix-key: "v1-${{ runner.os }}-rust-cache"
shared-key: ${{ matrix.e2e-type }}
cache-provider: "buildjet"
save-if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }}
workspaces: |
./rust

Loading…
Cancel
Save