-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: test bzlmod usage on CI (#16319)
Closes #16319 COPYBARA_INTEGRATE_REVIEW=#16319 from protocolbuffers:bcr d66845c PiperOrigin-RevId: 619939078
- Loading branch information
1 parent
6262097
commit 71e4061
Showing
9 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Bazel | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# Cancel previous actions from the same PR or branch except 'main' branch. | ||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. | ||
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}} | ||
cancel-in-progress: ${{ github.ref_name != 'main' }} | ||
|
||
jobs: | ||
test: | ||
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v6 | ||
with: | ||
folders: '["examples"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel | ||
# https://github.com/protocolbuffers/protobuf/issues/14313 | ||
module( | ||
name = "protobuf", | ||
compatibility_level = 1, | ||
version = "27.0", | ||
) | ||
|
||
# LOWER BOUND dependency versions. | ||
# Bzlmod follows MVS: | ||
# https://bazel.build/versions/6.0.0/build/bzlmod#version-resolution | ||
# Thus the highest version in their module graph is resolved. | ||
bazel_dep(name = "abseil-cpp", repo_name = "com_google_absl", version = "20230802.0.bcr.1") | ||
bazel_dep(name = "bazel_skylib", version = "1.4.1") | ||
bazel_dep(name = "jsoncpp", version = "1.9.5") | ||
bazel_dep(name = "rules_cc", version = "0.0.9") | ||
bazel_dep(name = "rules_java", version = "4.0.0") | ||
bazel_dep(name = "rules_jvm_external", version = "5.1") | ||
bazel_dep(name = "rules_pkg", version = "0.7.0") | ||
bazel_dep(name = "rules_proto", version = "4.0.0") | ||
bazel_dep(name = "rules_python", version = "0.10.2") | ||
bazel_dep(name = "platforms", version = "0.0.8") | ||
bazel_dep(name = "zlib", version = "1.2.11") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Bazel module dependencies""" | ||
bazel_dep(name = "protobuf", version = "0.0.0", dev_dependency = True, repo_name = "com_google_protobuf") | ||
|
||
local_path_override( | ||
module_name = "protobuf", | ||
path = "..", | ||
) | ||
|
||
bazel_dep(name = "bazel_skylib", version = "1.0.3") | ||
bazel_dep(name = "rules_cc", version = "0.0.1") | ||
bazel_dep(name = "rules_java", version = "7.3.0") | ||
bazel_dep(name = "rules_pkg", version = "0.7.0") | ||
bazel_dep(name = "rules_proto", version = "4.0.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file shadows WORKSPACE in builds with `--enable_bzlmod` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters