Skip to content

Commit 6ba1936

Browse files
Run the hosted Go flow on real Bazel in CI (#2107)
* Run the hosted Go flow on real Bazel in CI socket-patch has no Bazel-specific code, and until now no test ran it in a Bazel workspace. This adds a test target that does, and a workflow that runs it on pinned Bazel releases. No file under crates/*/src changes. The first tests hold hosted mode for a Go module that comes through gazelle's go_deps.from_file under Bzlmod, on Bazel 9.3.2, 8.8.2 and 7.7.2. Each one, in a fresh output base: - builds the fixture workspace and reads "OUT: PRISTINE" from `bazel run //:consumer`; - runs `scan --mode hosted --yes`, which rewrites go.mod and go.sum and nothing else; - runs the same two Bazel commands and reads the patched marker, which holds an id made for the run: the Socket module came from the stand-in patch host, Bazel changed no file of the checkout, and a `--lockfile_mode=error` build passes; - runs `rollback --yes`: every file of the checkout is the one of before, byte for byte, and the build prints "OUT: PRISTINE" again; - builds the rewritten checkout in a second output base against a patch host that serves other bytes: the build fails on the sum. The Socket API, the Go proxy, the patch host and the checksum-database lookup are one loopback wiremock server, and `go` is given no public proxy. The Bazel registry, the ruleset archives, the Go release list and the Go SDK come from the network. Bazel 9's repository contents cache stays on, as a user has it, with one cache per workspace copy. - crates/socket-patch-cli/tests/e2e_bazel_build/: harness.rs keeps every Bazel write inside a per-test scratch root (startup options, environment, repository cache, contents cache, server shutdown) and runs the socket-patch child; go.rs builds the two modules, the stand-in and the flow. The tests are #[ignore]d and print SKIP without a Bazel, or fail when SOCKET_PATCH_BAZEL_E2E_REQUIRED is set. Two hermetic tests run on every Unix runner. - crates/socket-patch-cli/tests/fixtures/bazel/gazelle/bzlmod/{e9,e7}: the two workspaces (gazelle 0.54.0 with rules_go 0.65.0, and gazelle 0.45.0 with rules_go 0.53.0 for Bazel 7). - scripts/install-bazel.sh and scripts/bazel-pins.txt: one Bazel release binary, checked against a pinned sha256 before it is installed. - .github/workflows/bazel-compatibility.yml: one Linux leg per Bazel release on a pull request that touches these files or a Go file the tests run through, on a main push that also touches the shared engine code and test helpers, nightly and on dispatch; one macOS leg nightly and on dispatch. Not required for merge. A later test of the same flow is one fixture directory and one test function. A new Bazel major adds its pin lines and one matrix line; a new ecosystem adds its module and one matrix line per release. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * Tighten the Bazel end-to-end harness after review The real-Bazel test of the hosted Go flow asserts what it asserted. This changes how a leg selects it, what it takes from the machine it runs on, and how its Bazel is installed. - A flow is one `#[ignore]` test, `go::hosted_go_deps`. It takes its release from the Bazel it is given (`bazel --version`) and its fixture era from one table in the test code, `go::FIXTURE`; a release the table does not hold fails with a message that names the table. The workflow passes the module filter `go::`: no name prefix derived from the release, no assert on test names, no scrape of the log. `SOCKET_PATCH_BAZEL_E2E_VERSION` fails a leg whose Bazel is not its release, as `SOCKET_PATCH_GO_E2E_VERSION` does for Go. - The fixture is one `common` directory and one `MODULE.bazel` per era, in place of two full copies. A hermetic test holds the directories to the table and the one `go.sum` to the module the test serves. - The Go fetch settings that gazelle hands to `go mod download` (`GOPRIVATE`, `GONOPROXY`, `GONOSUMDB`, `GOSUMDB`, `GOAUTH`), and `GOFLAGS` and `GOINSECURE`, are pinned beside `GOPROXY`, as variables of the Bazel client and as `--repo_env`. An exported `GOPRIVATE=patch.socket.dev` used to send the fetch past the loopback stand-ins to the real host. - `XDG_CONFIG_HOME`, `XDG_DATA_HOME` and `XDG_STATE_HOME` are removed from every Bazel child, so on Linux the telemetry counters of the Go SDK land under the scratch home. `GOTELEMETRY` is not set: `go env` reports it, and Go does not read it from the environment. - A bazelisk launcher gets one `BAZELISK_HOME`, the caller's own cache, so it downloads a release at most once, not once per workspace copy. - A relative `SOCKET_PATCH_BAZEL_E2E_BAZEL` or `SOCKET_PATCH_BAZEL_E2E_SOCKET_BIN` fails at once with a message that names the variable, with or without `SOCKET_PATCH_BAZEL_E2E_REQUIRED`. - `scripts/install-bazel.sh` gives curl a connect timeout, a low-speed limit and a total time, and retries only transient failures: a 404 goes to the second origin at once and a stalled transfer ends. It prints one line on stdout, and the documented recipe is `export "$(scripts/install-bazel.sh <version> <dir>)"`, which keeps a space in the path. - The workflow's jobs have no `name:`. GitHub showed the matrix expressions of the name as text for a job that its `if` skipped. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * Share the Bazel test harness across ecosystems, one workflow each The Go flow kept to itself what any flow on a real Bazel needs, and the workflow had one path list and one matrix for every ecosystem. A second ecosystem would copy the first, and each would start its legs on every change to the other. harness.rs now holds what the flows share: - StandIn, the loopback server behind the hosts of a flow (start, origin, serve, api, requests, asked), and the steps a flow is made of: the unpatched build with Bazel's lock, the envelope and the files of a hosted scan, the patched build that changes no file and passes with a frozen lock, and the undo. go.rs uses them and asserts what it asserted before. - Cell::route_downloads and rewrite, for a ruleset that fetches with Bazel's own downloader: a downloader config beside the workspace copy, named on every later command of the cell and of its twin by the option of the release (--experimental_downloader_config before Bazel 8.2.0, --downloader_config from there on; 8.2.0 and later still take the old name, with a warning). A rule quotes its URL prefix, so a `.` or a `+` in a file name is no pattern. Cell::numbers gives a flow the parsed release. - The environment of every Bazel child. The tool settings of a developer's shell no longer reach the repository rules and `bazel run`: GEM_HOME, GEM_PATH, NODE_OPTIONS, NODE_PATH, PYTHONHOME, PYTHONPATH, PYTHONSTARTUP, PIP_* and UV_*, and through the scrubs of tests/common/hermetic.rs BUNDLE_*, RUBYOPT, RUBYLIB, npm_config_*, PNPM_* and VIRTUAL_ENV, beside the Go settings removed before. The proxy of the machine stays, because a build may need it to reach the Bazel registry, and loopback is added to no_proxy and NO_PROXY: without it Bazel's downloader asks the proxy for a stand-in's URL. Two hermetic tests hold this. One checks the option name, and the config a cell and its twin name. The other starts the test binary again with every removed variable and a proxy set, and reads the environment of a child spawned there. .github/workflows/bazel-compatibility.yml becomes a reusable workflow that holds the legs: the Linux matrix, the macOS job, the installer, the caches, the REQUIRED and VERSION settings and the BAZEL_COMPAT_DISABLED switch. .github/workflows/bazel-go.yml calls it with the Go module, fixture and releases, under its own triggers, path lists and concurrency group. Another ecosystem adds a caller and touches neither file. A pull request run covers the ecosystem's own flow and fixture, the harness, the installer with its pins and the two workflows; shared engine code is covered on the push to main and nightly, as before. The repository cache is one per ecosystem and fixture era now, not one per Bazel release: the legs of one era share it. A caller names the era of each release it runs, and Fixture::check fails when that is not the era the test code's table gives the release. The run step fails when its module filter matches no test, which would pass with nothing run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * Hold the scrubbed environment list in its test, and pick Bazel tests by exact name The test that a Bazel child sees none of a shell's tool settings read its names from the two lists it was meant to guard, so a name dropped from either still passed. The names are now written out in the test, and the test also fails when a list gains a name it does not cover. Dropping GEM_HOME, the PIP_ prefix or the virtualenv scrub each fails it. The run step chose an ecosystem's tests with a libtest filter, which is a substring: `go::` is also inside `cargo::`. It now lists the ignored tests, keeps the names that start with the module, and runs those by exact name; it still fails when the module has no test. The header of bazel-pins.txt names the callers as the place that says which releases run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * Give the nightly Bazel run of the Go caller a concurrency group of its own A concurrency group holds one pending run. In the group of main's pushes, a second push replaces a nightly run that waits behind the first, and the nightly is the only run with the macOS leg and the only run for a main change outside the push path list. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
1 parent 3b14afc commit 6ba1936

13 files changed

Lines changed: 2078 additions & 0 deletions

File tree

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
name: Bazel patch compatibility (legs)
2+
3+
# socket-patch in a Bazel workspace, on a real Bazel: the legs of one
4+
# ecosystem. One leg per Bazel release runs the `#[ignore]` tests of the
5+
# ecosystem's module of `e2e_bazel_build` (`go::`) on the release it
6+
# installed. A test builds a fixture workspace, runs the built binary in it
7+
# and reads the result from what Bazel builds next; the test code says which
8+
# fixture files go with which release.
9+
#
10+
# This is a reusable workflow, and nothing starts it but a caller. Each
11+
# ecosystem has one (bazel-go.yml), which says when its legs run (its
12+
# triggers and path lists, its concurrency group) and on which Bazel
13+
# releases (the inputs below). Another ecosystem is one more caller, and no
14+
# change here or in another ecosystem's caller. A called workflow runs with
15+
# the event, the ref and the token of its caller: every `github.*` below is
16+
# the caller's, the token is the `contents: read` the caller grants, and the
17+
# file is the one of the caller's commit, so a pull request that changes it
18+
# runs its own version.
19+
#
20+
# The package under test and every Socket host are loopback stand-ins. A leg
21+
# still needs the network for the ruleset and the toolchain: github.com and
22+
# release-assets.githubusercontent.com (the Bazel release, cached per
23+
# release, and the ruleset archives), bcr.bazel.build (the registry) on
24+
# every run, and the hosts of the ecosystem's toolchain, which its caller
25+
# names. A repository cache saved from main holds the archives and the
26+
# toolchain.
27+
#
28+
# Not required for merge: no caller has a `merge_group` trigger, and no job
29+
# here is a `needs` of ci.yml's `ci-ok`. Setting the repository variable
30+
# BAZEL_COMPAT_DISABLED to `true` turns every leg of every ecosystem off
31+
# without a merge.
32+
#
33+
# To add a Bazel release: one line per platform in scripts/bazel-pins.txt
34+
# and one line of `releases` in each caller that runs it.
35+
#
36+
# No job has a `name:`. GitHub does not expand a matrix expression in the
37+
# name of a job that its `if` skips, so such a name shows up as its source
38+
# text in a pull request's checks. The default title of a leg is the
39+
# caller's job, the job's id here and its matrix values:
40+
# `go / bazel (9.3.2, e9)`.
41+
42+
on:
43+
workflow_call:
44+
inputs:
45+
eco:
46+
description: >-
47+
The ecosystem's module of the `e2e_bazel_build` test target
48+
(`go`). A leg runs the `#[ignore]` tests of that module.
49+
required: true
50+
type: string
51+
fixtures:
52+
description: >-
53+
The ecosystem's fixture, a directory under
54+
crates/socket-patch-cli/tests/fixtures/bazel (`gazelle/bzlmod`).
55+
required: true
56+
type: string
57+
releases:
58+
description: >-
59+
The Linux legs, as a JSON list with one
60+
{"bazel": "<release>", "era": "<directory>"} per leg: a Bazel
61+
release that scripts/bazel-pins.txt pins, and the directory of the
62+
fixture that holds the `MODULE.bazel` this release builds. The
63+
test code decides the era of a release, and the hermetic test of
64+
the ecosystem's module fails when a leg names another.
65+
required: true
66+
type: string
67+
macos:
68+
description: >-
69+
The macOS legs, in the same form. They run nightly and on demand
70+
only.
71+
required: true
72+
type: string
73+
74+
permissions:
75+
contents: read
76+
77+
env:
78+
SOCKET_NO_CONFIG: '1'
79+
SOCKET_NO_UPDATE_CHECK: '1'
80+
SOCKET_TELEMETRY_DISABLED: '1'
81+
82+
jobs:
83+
bazel:
84+
if: github.event.pull_request.draft != true && vars.BAZEL_COMPAT_DISABLED != 'true'
85+
strategy:
86+
fail-fast: false
87+
matrix:
88+
include: ${{ fromJSON(inputs.releases) }}
89+
runs-on: ${{ vars.DISABLE_DEPOT_RUNNERS == 'true' && 'ubuntu-latest' || 'depot-ubuntu-24.04-4' }}
90+
timeout-minutes: 45
91+
steps: &bazel-steps
92+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
93+
with:
94+
persist-credentials: false
95+
96+
- name: Shellcheck the Bazel installer
97+
# shellcheck is pre-installed on the Linux runners only.
98+
if: runner.os == 'Linux'
99+
run: shellcheck scripts/install-bazel.sh
100+
101+
- run: rustup show
102+
103+
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
104+
with:
105+
# The key the other workflows give the runner image of this job.
106+
shared-key: dev-${{ runner.os == 'macOS' && 'macos-latest' || 'ubuntu-latest' }}
107+
save-if: ${{ github.ref == 'refs/heads/main' }}
108+
109+
- name: Restore the Bazel ${{ matrix.bazel }} binary
110+
# The installer checks a restored file against its pin too, so a
111+
# miss or a stale entry only means a download. Saved from main, and
112+
# shared by every ecosystem that runs the release.
113+
id: bazel-dist
114+
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
115+
timeout-minutes: 5
116+
continue-on-error: true
117+
with:
118+
path: ${{ runner.temp }}/bazel-dist
119+
key: bazel-dist-${{ matrix.bazel }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/bazel-pins.txt', 'scripts/install-bazel.sh') }}
120+
121+
- name: Install Bazel ${{ matrix.bazel }}
122+
env:
123+
BAZEL_VERSION: ${{ matrix.bazel }}
124+
# Prints one line, SOCKET_PATCH_BAZEL_E2E_BAZEL=<the pinned and
125+
# verified binary>. A line of $GITHUB_ENV is a name, `=` and the
126+
# value up to the end of the line, so a space in the path is kept.
127+
run: scripts/install-bazel.sh "$BAZEL_VERSION" "$RUNNER_TEMP/bazel-dist" >> "$GITHUB_ENV"
128+
129+
- name: Save the Bazel ${{ matrix.bazel }} binary
130+
if: >-
131+
github.ref == 'refs/heads/main'
132+
&& steps.bazel-dist.outputs.cache-hit != 'true'
133+
&& steps.bazel-dist.outcome == 'success'
134+
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
135+
with:
136+
path: ${{ runner.temp }}/bazel-dist
137+
key: ${{ steps.bazel-dist.outputs.cache-primary-key }}
138+
139+
- name: Restore the repository cache
140+
# What Bazel downloads for the fixture: the ruleset archives and the
141+
# language toolchain. One cache per ecosystem and fixture era, keyed
142+
# by the files that pin all of it: `common` and the era's
143+
# directory. The legs of one era share it, whatever their Bazel
144+
# release, and another era or another ecosystem never makes a leg
145+
# save a new copy. A run whose fixture changed starts from the
146+
# newest cache of its era. The cache is content-addressed, so an
147+
# older one, or one that another release of the era saved, is still
148+
# correct, only incomplete: a leg downloads what it lacks, which for
149+
# a second release of an era is what that Bazel resolves for its own
150+
# built-in modules. Whether the package under test can come from it
151+
# is the ecosystem's matter, and its test says how it rules that out.
152+
id: bazel-repos
153+
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
154+
timeout-minutes: 5
155+
continue-on-error: true
156+
with:
157+
path: ${{ runner.temp }}/bazel-repos
158+
key: bazel-repos-${{ inputs.eco }}-${{ matrix.era }}-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles(format('crates/socket-patch-cli/tests/fixtures/bazel/{0}/common/**', inputs.fixtures), format('crates/socket-patch-cli/tests/fixtures/bazel/{0}/{1}/**', inputs.fixtures, matrix.era)) }}
159+
restore-keys: |
160+
bazel-repos-${{ inputs.eco }}-${{ matrix.era }}-${{ runner.os }}-${{ runner.arch }}-
161+
162+
- name: Run the ${{ inputs.eco }} tests on Bazel ${{ matrix.bazel }}
163+
env:
164+
# A missing Bazel fails the leg instead of printing SKIP, and so
165+
# does a Bazel that is not the release of this leg.
166+
SOCKET_PATCH_BAZEL_E2E_REQUIRED: '1'
167+
SOCKET_PATCH_BAZEL_E2E_VERSION: ${{ matrix.bazel }}
168+
SOCKET_PATCH_BAZEL_E2E_REPO_CACHE: ${{ runner.temp }}/bazel-repos
169+
ECO: ${{ inputs.eco }}
170+
# The ecosystem's module holds one `#[ignore]` test per flow, and a
171+
# test takes its release from the Bazel installed above, so the
172+
# filter is the module's name and nothing is derived from the
173+
# release. The tests are chosen by the module's name as a prefix and
174+
# run by their exact names: a test filter is a substring, and `go::`
175+
# is also inside `cargo::`. The step fails when the module has no
176+
# test: a name that matches nothing would run no test and pass. Two
177+
# tests at a time: each runs a Bazel server of its own.
178+
run: |
179+
names=$(cargo test --locked -p socket-patch-cli --test e2e_bazel_build -- \
180+
--ignored --list | sed -n "s/^\(${ECO}::.*\): test\$/\1/p")
181+
test -n "$names"
182+
echo "$names"
183+
# shellcheck disable=SC2086 # one test name per word
184+
cargo test --locked -p socket-patch-cli --test e2e_bazel_build -- \
185+
--ignored --exact $names --test-threads=2 --nocapture
186+
187+
- name: Save the repository cache
188+
# The first leg of an era to finish on main saves it. Another leg
189+
# of the era that also missed finds the key taken, which the action
190+
# logs without failing the step.
191+
if: >-
192+
github.ref == 'refs/heads/main'
193+
&& steps.bazel-repos.outputs.cache-hit != 'true'
194+
&& steps.bazel-repos.outcome == 'success'
195+
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
196+
with:
197+
path: ${{ runner.temp }}/bazel-repos
198+
key: ${{ steps.bazel-repos.outputs.cache-primary-key }}
199+
200+
# The macOS legs: nightly and on demand, never on a pull request or a
201+
# push, so they do not queue on the small macOS runner pool.
202+
bazel-macos:
203+
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && vars.BAZEL_COMPAT_DISABLED != 'true'
204+
strategy:
205+
fail-fast: false
206+
matrix:
207+
include: ${{ fromJSON(inputs.macos) }}
208+
runs-on: macos-latest
209+
timeout-minutes: 45
210+
steps: *bazel-steps

‎.github/workflows/bazel-go.yml‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Bazel patch compatibility (Go)
2+
3+
# The Go flow of the real-Bazel tests (`go::` in `e2e_bazel_build`): hosted
4+
# mode for a module that gazelle's `go_deps` resolves from `go.mod`, on
5+
# each Bazel release below. bazel-compatibility.yml holds the legs and what
6+
# every ecosystem shares; this file says when the Go legs run and on which
7+
# releases.
8+
#
9+
# Beyond what every leg needs, a Go leg downloads the Go SDK from
10+
# dl.google.com (about 100 MB, held by its repository cache) and asks go.dev
11+
# for the Go release list on every run. A Go module under test never comes
12+
# from the repository cache: `go` fetches a module into the output base,
13+
# which every test makes anew.
14+
#
15+
# Not required for merge: no `merge_group` trigger, and no job here is a
16+
# `needs` of ci.yml's `ci-ok`.
17+
18+
on:
19+
pull_request:
20+
types: [opened, synchronize, reopened, ready_for_review]
21+
# What a pull request run covers: the Go flow and its fixture, the
22+
# harness and the workflows that run it, the Bazel installer and its
23+
# pins, and the Go files the flow runs through, as go-compatibility.yml
24+
# lists them. Nothing another ecosystem's flow owns is here, so a change
25+
# to one ecosystem starts that ecosystem's legs only.
26+
#
27+
# What it does not cover: shared engine code (patch/redirect/mod.rs,
28+
# hosted/, commands/), the shared test helpers and the toolchain files.
29+
# A change there gets its run on the push to main (when the file is in
30+
# the list below) or in the nightly run, not on the pull request: that
31+
# is the price of not running every ecosystem's legs on every shared
32+
# change. On demand, workflow_dispatch runs the legs on any branch.
33+
paths:
34+
- '.github/workflows/bazel-go.yml'
35+
- '.github/workflows/bazel-compatibility.yml'
36+
- 'scripts/install-bazel.sh'
37+
- 'scripts/bazel-pins.txt'
38+
- 'crates/socket-patch-cli/tests/e2e_bazel_build/go.rs'
39+
- 'crates/socket-patch-cli/tests/e2e_bazel_build/harness.rs'
40+
- 'crates/socket-patch-cli/tests/fixtures/bazel/gazelle/**'
41+
- 'crates/*/src/**/*golang*'
42+
- 'crates/*/src/**/*golang*/**'
43+
- 'crates/socket-patch-core/src/vendor/go*.rs'
44+
push:
45+
branches: [main]
46+
# The pull request paths, and what only a push to main covers: the
47+
# root of the test target (it changes when an ecosystem's module is
48+
# added; ci.yml builds the target and runs its hermetic tests on every
49+
# pull request), the shared engine code and test helpers the flow runs
50+
# through, and the toolchain files. A main push outside this list waits
51+
# for the nightly run below.
52+
paths:
53+
- '.github/workflows/bazel-go.yml'
54+
- '.github/workflows/bazel-compatibility.yml'
55+
- 'scripts/install-bazel.sh'
56+
- 'scripts/bazel-pins.txt'
57+
- 'crates/socket-patch-cli/tests/e2e_bazel_build/go.rs'
58+
- 'crates/socket-patch-cli/tests/e2e_bazel_build/harness.rs'
59+
- 'crates/socket-patch-cli/tests/fixtures/bazel/gazelle/**'
60+
- 'crates/*/src/**/*golang*'
61+
- 'crates/*/src/**/*golang*/**'
62+
- 'crates/socket-patch-core/src/vendor/go*.rs'
63+
- 'crates/socket-patch-cli/tests/e2e_bazel_build/main.rs'
64+
- 'crates/socket-patch-core/src/patch/redirect/**'
65+
- 'crates/socket-patch-core/src/hosted/**'
66+
- 'crates/socket-patch-cli/src/commands/**'
67+
- 'crates/socket-patch-cli/tests/common/**'
68+
- 'crates/socket-patch-cli/tests/hosted_memory_common/**'
69+
- 'Cargo.lock'
70+
- 'Cargo.toml'
71+
- 'crates/*/Cargo.toml'
72+
- 'rust-toolchain.toml'
73+
- '.cargo/**'
74+
schedule:
75+
# Nightly, so a main change outside the push list still gets a run
76+
# within a day. The macOS leg runs here and on demand only.
77+
- cron: '17 4 * * *'
78+
workflow_dispatch:
79+
80+
permissions:
81+
contents: read
82+
83+
# The nightly run has a group of its own. A group holds one pending run, so
84+
# in the group of main's pushes a second push would replace a nightly that
85+
# waits behind the first, and the nightly is the only run with the macOS leg.
86+
concurrency:
87+
group: bazel-go-${{ github.event.pull_request.number || github.ref }}${{ github.event_name == 'schedule' && '-nightly' || '' }}
88+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
89+
90+
jobs:
91+
go:
92+
uses: ./.github/workflows/bazel-compatibility.yml
93+
with:
94+
eco: go
95+
fixtures: gazelle/bzlmod
96+
# One leg per line: a Bazel release, and the era of the fixture that
97+
# `go::FIXTURE` gives it.
98+
releases: >-
99+
[
100+
{"bazel": "9.3.2", "era": "e9"},
101+
{"bazel": "8.8.2", "era": "e9"},
102+
{"bazel": "7.7.2", "era": "e7"}
103+
]
104+
macos: >-
105+
[
106+
{"bazel": "9.3.2", "era": "e9"}
107+
]

0 commit comments

Comments
 (0)