Merge origin/main: adopt v0.6.81 release metadata #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: v8-canary | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/scripts/rusty_v8_bazel.py" | |
| - ".github/workflows/rusty-v8-release.yml" | |
| - ".github/workflows/v8-canary.yml" | |
| - "MODULE.bazel" | |
| - "MODULE.bazel.lock" | |
| - "codex-rs/Cargo.toml" | |
| - "patches/BUILD.bazel" | |
| - "patches/v8_*.patch" | |
| - "third_party/v8/**" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/scripts/rusty_v8_bazel.py" | |
| - ".github/workflows/rusty-v8-release.yml" | |
| - ".github/workflows/v8-canary.yml" | |
| - "MODULE.bazel" | |
| - "MODULE.bazel.lock" | |
| - "codex-rs/Cargo.toml" | |
| - "patches/BUILD.bazel" | |
| - "patches/v8_*.patch" | |
| - "third_party/v8/**" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }} | |
| cancel-in-progress: ${{ github.ref_name != 'main' }} | |
| jobs: | |
| metadata: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| v8_version: ${{ steps.v8_version.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Resolve exact v8 crate version | |
| id: v8_version | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| version="$(python3 .github/scripts/rusty_v8_bazel.py resolved-v8-crate-version)" | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| build: | |
| name: Build ${{ matrix.target }} | |
| needs: metadata | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| contents: read | |
| actions: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| platform: linux_amd64_musl | |
| target: x86_64-unknown-linux-musl | |
| - runner: ubuntu-24.04-arm | |
| platform: linux_arm64_musl | |
| target: aarch64-unknown-linux-musl | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Bazel | |
| uses: bazelbuild/setup-bazelisk@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Build Bazel V8 release pair | |
| env: | |
| BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |
| PLATFORM: ${{ matrix.platform }} | |
| TARGET: ${{ matrix.target }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| target_suffix="${TARGET//-/_}" | |
| pair_target="//third_party/v8:rusty_v8_release_pair_${target_suffix}" | |
| extra_targets=( | |
| "@llvm//runtimes/libcxx:libcxx.static" | |
| "@llvm//runtimes/libcxx:libcxxabi.static" | |
| ) | |
| bazel_args=( | |
| build | |
| "--platforms=@llvm//platforms:${PLATFORM}" | |
| "${pair_target}" | |
| "${extra_targets[@]}" | |
| --build_metadata=COMMIT_SHA=$(git rev-parse HEAD) | |
| ) | |
| bazel_flags=( | |
| --noexperimental_remote_repo_contents_cache | |
| --bazelrc=.github/workflows/v8-ci.bazelrc | |
| ) | |
| if [[ -n "${BUILDBUDDY_API_KEY}" ]]; then | |
| bazel_flags+=("--remote_header=x-buildbuddy-api-key=${BUILDBUDDY_API_KEY}") | |
| else | |
| bazel_flags+=( | |
| --strategy=local | |
| --remote_executor= | |
| --remote_cache= | |
| --bes_backend= | |
| --bes_results_url= | |
| ) | |
| fi | |
| bazel "${bazel_flags[@]}" "${bazel_args[@]}" | |
| - name: Stage release pair | |
| env: | |
| PLATFORM: ${{ matrix.platform }} | |
| TARGET: ${{ matrix.target }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| python3 .github/scripts/rusty_v8_bazel.py stage-release-pair \ | |
| --platform "${PLATFORM}" \ | |
| --target "${TARGET}" \ | |
| --output-dir "dist/${TARGET}" | |
| - name: Upload staged musl artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: v8-canary-${{ needs.metadata.outputs.v8_version }}-${{ matrix.target }} | |
| path: dist/${{ matrix.target }}/* |