Skip to content

Commit 0ac86c0

Browse files
authored
Add CI support for bzlmod (#683)
Signed-off-by: Ian Chen <[email protected]>
1 parent fc736ea commit 0ac86c0

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/bazel.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Bazel CI
2+
on:
3+
push:
4+
branches: [gz-common6, main]
5+
pull_request:
6+
branches: [gz-common6, main]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test:
14+
uses: bazel-contrib/.github/.github/workflows/[email protected]
15+
with:
16+
folders: |
17+
[
18+
".",
19+
]
20+
exclude: |
21+
[
22+
{"folder": ".", "bzlmodEnabled": false},
23+
]

.github/workflows/ci.bazelrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file contains Bazel settings to apply on CI only.
2+
# It is referenced with a --bazelrc option in the call to bazel in ci.yaml
3+
4+
# Debug where options came from
5+
build --announce_rc
6+
# This directory is configured in GitHub actions to be persisted between runs.
7+
# We do not enable the repository cache to cache downloaded external artifacts
8+
# as these are generally faster to download again than to fetch them from the
9+
# GitHub actions cache.
10+
build --disk_cache=~/.cache/bazel
11+
# Don't rely on test logs being easily accessible from the test runner,
12+
# though it makes the log noisier.
13+
test --test_output=errors
14+
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
15+
test --test_env=XDG_CACHE_HOME

0 commit comments

Comments
 (0)