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

Add bazel CI workflow #351

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test/bazel
21 changes: 21 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Bazel CI
on: [push, pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v7
with:
folders: |
[
".",
"test/bazel",
]
exclude: |
[
{"folder": ".", "bzlmodEnabled": false},
{"folder": "test/bazel", "bzlmodEnabled": false},
]
18 changes: 18 additions & 0 deletions .github/workflows/ci.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file contains Bazel settings to apply on CI only.
# It is referenced with a --bazelrc option in the call to bazel in ci.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find this reference. Can you please point me to the line in code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it used to be used as part of the upstream CI workflow, but when trying to find the reference, I find that it has been removed in https://github.com/bazel-contrib/.github/pull/11/files#diff-fcdc74e04f54e030b7b5cfde9bbcd1cc443162841efd9375481872e030b43a2bL153, which was reported upstream here: bazel-contrib/.github#23)


# Debug where options came from
build --announce_rc

# This directory is configured in GitHub actions to be persisted between runs.
# We do not enable the repository cache to cache downloaded external artifacts
# as these are generally faster to download again than to fetch them from the
# GitHub actions cache.
build --disk_cache=~/.cache/bazel

# Don't rely on test logs being easily accessible from the test runner,
# though it makes the log noisier.
test --test_output=errors

# Allows tests to run bazelisk-in-bazel, since this is the cache folder used
test --test_env=XDG_CACHE_HOME
1 change: 1 addition & 0 deletions test/bazel/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
load("@xacro//:build_defs.bzl", "xacro")
5 changes: 5 additions & 0 deletions test/bazel/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bazel_dep(name = "xacro")
local_path_override(
module_name = "xacro",
path = "../..",
)
Loading