Skip to content
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

Optimize Bazel CI performance #312

Merged
merged 5 commits into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions .github/workflows/bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
ci:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
type: [legacy, bzlmod]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -23,10 +26,13 @@ jobs:
uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- name: Test Bazel targets with legacy WORKSPACE mode
run: bazel build --noenable_bzlmod --enable_workspace //... && bazel test --noenable_bzlmod --enable_workspace //...
- name: Test Bazel targets with bzlmod-only mode
run: bazel build --enable_bzlmod --noenable_workspace //... && bazel test --enable_bzlmod --noenable_workspace //...
- name: Test Bazel targets with hybrid incremental-migration mode
run: bazel build --enable_bzlmod --enable_workspace //... && bazel test --enable_bzlmod --enable_workspace //...
key: bazel-${{matrix.type}}
- if: matrix.type == 'legacy'
name: Test Bazel targets with legacy WORKSPACE mode
run: bazel build --reuse_sandbox_directories --noenable_bzlmod --enable_workspace //... && bazel test --noenable_bzlmod --enable_workspace //...
- if: matrix.type == 'bzlmod'
name: Test Bazel targets with bzlmod-only mode
run: bazel build --reuse_sandbox_directories --enable_bzlmod --noenable_workspace //... && bazel test --enable_bzlmod --noenable_workspace //...
- if: matrix.type == 'bzlmod'
name: Test Bazel targets with hybrid incremental-migration mode
run: bazel build --reuse_sandbox_directories --enable_bzlmod --enable_workspace //... && bazel test --enable_bzlmod --enable_workspace //...