-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[build] Migrate workflows to use centralized bazel.yml #16955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Compliance Guide 🔍(Compliance updated until commit 62af24c)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 26be08a
|
||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR consolidates GitHub Actions workflows to use a centralized bazel.yml reusable workflow, improving consistency and maintainability of Bazel operations across the repository. The migration separates concerns by running Bazel operations in a consistent environment while git operations run in lightweight jobs that consume artifacts.
Changes:
- Centralized Bazel workflow with new
refandartifact-pathinputs for flexible checkout and artifact handling - Migrated 7 workflows to use the reusable pattern (release, pre-release, nightly, ci, ci-lint, ci-renovate-rbe, update-documentation)
- Modified
check-bazel-targets.shto write targets to a file instead of GITHUB_OUTPUT for artifact-based communication
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/bazel.yml |
Added ref input for specific checkouts, replaced nightly-release-files with flexible artifact-path, improved artifact upload logic |
scripts/github-actions/check-bazel-targets.sh |
Changed output from GITHUB_OUTPUT to file-based (bazel-targets.txt) for artifact consumption |
.github/workflows/ci.yml |
Split check job into check (Bazel query) and read-targets (artifact reader) jobs |
.github/workflows/ci-lint.yml |
Migrated format checking to use centralized bazel.yml, separated protected file checking |
.github/workflows/ci-renovate-rbe.yml |
Migrated repin operations to centralized workflow with multi-line run commands |
.github/workflows/nightly.yml |
Separated grid build from release, moved release creation to dedicated job |
.github/workflows/pre-release.yml |
Restructured to use matrix-based parallel generation jobs with centralized patch application |
.github/workflows/release.yml |
Split into prepare/build/create-release jobs, added reset-version generation job |
.github/workflows/update-documentation.yml |
Separated into parse/generate-docs/commit-docs jobs using artifact flow |
PR Code Suggestions ✨Latest suggestions up to c819f09
Previous suggestions✅ Suggestions up to commit 62af24c
✅ Suggestions up to commit 28ce7c2
✅ Suggestions up to commit 26be08a
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
26be08a to
edcfdb7
Compare
edcfdb7 to
52bbd65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 14 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
User description
Our current usage of Bazel is inconsistent across workflows. We want one entry point to bazel from GitHub so everything
is consistent. The pattern is Bazel does things and stores artifacts that calling workflows consume
as needed in subsequent jobs.
💥 What does this PR do?
Migrates GitHub Actions workflows to use the centralized
bazel.ymlreusable workflow patternWorkflows migrated:
release.yml- Build packages jobupdate-documentation.yml- Documentation generationpre-release.yml- Rust version generation, matrix-based update generationci.yml- Check targets job with separate read-targets jobci-lint.yml- Format jobci-renovate-rbe.yml- Repin jobnightly.yml- use artifact-name/artifact-path instead of nightly-release-filesChanges to
bazel.yml:refinput for checking out specific tags/branchesartifact-pathinput for uploading specific files (vs git diff patches)nightly-release-filesand Release Nightly step🔧 Implementation Notes
Separates concerns: Bazel operations run in a consistent environment with proper caching,
while git operations run in lightweight jobs that download artifacts.
For
ci.yml, Bazel query results are written to a file artifact instead ofGITHUB_OUTPUTbecause reusable workflows can't pass outputs back directly.
A lightweight
read-targetsjob downloads and reads the artifact.💡 Additional Considerations
This consolidation makes it easier to update Bazel setup/caching in one place and maintain consistent build environments.
I have additional PRs that will make use of this consistent pattern.
🔄 Types of changes
PR Type
Enhancement, Tests
Description
Consolidates Bazel workflow execution into centralized
bazel.ymlreusable workflowMigrates 7 workflows to use consistent artifact-based pattern for build outputs
Replaces GitHub output mechanism with file artifacts for cross-job data passing
Separates Bazel operations from git operations into distinct lightweight jobs
Diagram Walkthrough
File Walkthrough
9 files
Replace GitHub output with file artifact for targetsAdd ref and artifact-path inputs, remove nightly-release-filesMigrate format job to use bazel.yml reusable workflowMigrate repin job to bazel.yml with separate commit jobSplit check targets into bazel.yml and lightweight read-targets jobMigrate grid job to bazel.yml, separate release into new jobMigrate all update jobs to bazel.yml with matrix-based generationSplit build and release into separate bazel.yml and git jobsMigrate docs generation to bazel.yml with separate commit job