feat: add phase 8 ci matrix workflow

This commit is contained in:
Eriyc
2026-03-04 08:01:05 +00:00
committed by copilot-swe-agent[bot]
parent b7adaa9080
commit f10584cad7
5 changed files with 57 additions and 0 deletions

3
.github/workflows/BUILD.bazel vendored Normal file
View File

@@ -0,0 +1,3 @@
package(default_visibility = ["//visibility:public"])
exports_files(["ci.yml"])

27
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: CI
on:
push:
branches: ["main"]
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
phase8_target: linux-x64
- os: macos-14
phase8_target: darwin-arm64
- os: windows-latest
phase8_target: windows
runs-on: ${{ matrix.os }}
env:
USE_BAZEL_VERSION: 9.0.0
steps:
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.15.0
- name: Run tests (${{ matrix.phase8_target }})
run: bazel test //tests/...

View File

@@ -45,3 +45,9 @@ Phase 7 bootstrap is in place:
- Bzlmod `bun_install` module extension (`/bun/extensions.bzl`) using Bazel 9-compatible extension/tag syntax - Bzlmod `bun_install` module extension (`/bun/extensions.bzl`) using Bazel 9-compatible extension/tag syntax
- Focused module-extension shape test (`//tests/install_extension_test:all`) - Focused module-extension shape test (`//tests/install_extension_test:all`)
Phase 8 bootstrap is in place:
- CI matrix workflow for linux-x64, darwin-arm64, and windows (`/.github/workflows/ci.yml`)
- Bazel 9 pin in CI via `USE_BAZEL_VERSION=9.0.0`
- Focused CI matrix shape test (`//tests/ci_test:all`)

View File

@@ -0,0 +1,8 @@
load("@rules_shell//shell:sh_test.bzl", "sh_test")
sh_test(
name = "phase8_ci_matrix_shape_test",
srcs = ["phase8_ci_matrix_shape_test.sh"],
args = ["$(location //.github/workflows:ci.yml)"],
data = ["//.github/workflows:ci.yml"],
)

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
workflow_file="$1"
grep -Eq '^name:[[:space:]]+CI$' "${workflow_file}"
grep -Eq 'USE_BAZEL_VERSION:[[:space:]]+9\.0\.0' "${workflow_file}"
grep -Eq 'os:[[:space:]]+ubuntu-latest' "${workflow_file}"
grep -Eq 'phase8_target:[[:space:]]+linux-x64' "${workflow_file}"
grep -Eq 'os:[[:space:]]+macos-14' "${workflow_file}"
grep -Eq 'phase8_target:[[:space:]]+darwin-arm64' "${workflow_file}"
grep -Eq 'os:[[:space:]]+windows-latest' "${workflow_file}"
grep -Eq 'phase8_target:[[:space:]]+windows' "${workflow_file}"