Move to github bundle cache

This commit is contained in:
Channing Conger
2026-03-14 07:21:55 +00:00
parent 70ead086a7
commit c91fc32b4a
2 changed files with 139 additions and 5 deletions
+52 -1
View File
@@ -1,10 +1,36 @@
name: rusty-v8-bazel-build
on:
pull_request: {}
pull_request:
paths:
- ".bazelrc"
- ".bazelversion"
- ".github/workflows/ci.bazelrc"
- ".github/workflows/rusty-v8-bazel-build.yml"
- ".github/scripts/rusty_v8_bazel.py"
- "MODULE.bazel"
- "MODULE.bazel.lock"
- "patches/**"
- "third_party/v8/**"
- "**/*.bzl"
- "**/BUILD"
- "**/BUILD.bazel"
push:
branches:
- main
paths:
- ".bazelrc"
- ".bazelversion"
- ".github/workflows/ci.bazelrc"
- ".github/workflows/rusty-v8-bazel-build.yml"
- ".github/scripts/rusty_v8_bazel.py"
- "MODULE.bazel"
- "MODULE.bazel.lock"
- "patches/**"
- "third_party/v8/**"
- "**/*.bzl"
- "**/BUILD"
- "**/BUILD.bazel"
workflow_dispatch:
concurrency:
@@ -42,7 +68,22 @@ jobs:
with:
targets: ${{ matrix.target }}
- name: Compute V8 bundle cache key
id: cache_key
shell: bash
run: |
set -euo pipefail
echo "key=rusty-v8-bundle-v1-${{ matrix.target }}-$(python3 .github/scripts/rusty_v8_bazel.py print-cache-key)" >> "$GITHUB_OUTPUT"
- name: Restore staged V8 bundle cache
id: bundle_cache_restore
uses: actions/cache/restore@v5
with:
path: dist/${{ matrix.target }}
key: ${{ steps.cache_key.outputs.key }}
- name: Build Bazel V8 musl artifacts
if: ${{ steps.bundle_cache_restore.outputs.cache-hit != 'true' }}
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
PLATFORM: ${{ matrix.platform }}
@@ -83,6 +124,7 @@ jobs:
fi
- name: Stage rusty_v8 release assets
if: ${{ steps.bundle_cache_restore.outputs.cache-hit != 'true' }}
env:
PLATFORM: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
@@ -97,6 +139,7 @@ jobs:
--output-dir "${output_dir}"
- name: Validate staged bundle outside Bazel
if: ${{ steps.bundle_cache_restore.outputs.cache-hit != 'true' }}
env:
PLATFORM: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
@@ -110,6 +153,7 @@ jobs:
--bundle-path "dist/${TARGET}/rusty_v8_bundle_${TARGET}.tar.gz"
- name: Validate staged bundle with Cargo
if: ${{ steps.bundle_cache_restore.outputs.cache-hit != 'true' }}
env:
PLATFORM: ${{ matrix.platform }}
TARGET: ${{ matrix.target }}
@@ -122,6 +166,13 @@ jobs:
--target "${TARGET}" \
--bundle-path "dist/${TARGET}/rusty_v8_bundle_${TARGET}.tar.gz"
- name: Save staged V8 bundle cache
if: ${{ steps.bundle_cache_restore.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v5
with:
path: dist/${{ matrix.target }}
key: ${{ steps.cache_key.outputs.key }}
- name: Upload staged artifacts
uses: actions/upload-artifact@v7
with: