-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bazel 6.4.0, rules_go v0.45, bazel-gazelle 0.35, more... (#355)
* Convert to yaml config * Vendor timestamp.proto (for ts_proto) * Switch to proto_gazelle rule * Fix missing NonEmptyAttrs * Reset baseline generated rules using proto_gazelle * Upgrade rules_go, gazelle, go_deps * Upgrade gazelle to v0.35.0 * Migrate resolver to accomodate bazel-contrib/bazel-gazelle#1687 * checkpoint migrate to protobuf-javascript * Use java 17, upgrade rules_scala, custom toolchain * sync scala version * Upgrade rules_python and add to WORKSPACE boilerplate files * Add :protobuf_python to example deps * ensure strings sorted for import labels * Upgrade rules_go to v0.45.1 * exclude grpc_test.go from default go_test rule * remove obsolete patch * Add "make golden_test" target * ensure reassign memory value * Update build status badge * preserve last-wins semantics of prior stackb/rules_proto behavior * Update release.yaml
- Loading branch information
Showing
476 changed files
with
7,544 additions
and
17,499 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
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 +1 @@ | ||
5.4.0 | ||
6.4.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 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 | ||
# Debug where options came from | ||
build --announce_rc | ||
# Don't rely on test logs being easily accessible from the test runner, | ||
# though it makes the log noisier. | ||
test --test_output=errors | ||
# This directory is configured in GitHub actions to be persisted between runs. | ||
build --disk_cache=$HOME/.cache/bazel | ||
build --repository_cache=$HOME/.cache/bazel-repo | ||
# Allows tests to run bazelisk-in-bazel, since this is the cache folder used | ||
test --test_env=XDG_CACHE_HOME | ||
# Keep until @io_bazel_rules_scala is upgraded | ||
build --incompatible_java_common_parameters=false |
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,54 @@ | ||
name: CI | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
- name: Mount bazel action cache | ||
uses: actions/cache@v3 | ||
if: always() | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Mount bazel repo cache | ||
uses: actions/cache@v3 | ||
if: always() | ||
with: | ||
path: "~/.cache/bazel-repo" | ||
key: bazel-repo | ||
|
||
- name: bazel test | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: >- | ||
bazel | ||
--bazelrc=.github/workflows/ci.bazelrc | ||
--bazelrc=.bazelrc | ||
test | ||
--deleted_packages=//plugin/grpc-ecosystem/grpc-gateway | ||
//example/... | ||
//pkg/... | ||
//plugin/... | ||
//language/... | ||
//rules/... | ||
//toolchain/... |
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,44 @@ | ||
name: Format | ||
|
||
# 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: | ||
|
||
jobs: | ||
test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: bazelbuild/setup-bazelisk@v2 | ||
|
||
- name: Mount bazel action cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/bazel" | ||
key: bazel | ||
|
||
- name: Mount bazel repo cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: "~/.cache/bazel-repo" | ||
key: bazel-repo | ||
|
||
- name: Run format | ||
env: | ||
# Bazelisk will download bazel to here, ensure it is cached between runs. | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: ./tools/format.sh | ||
|
||
- name: Check no changes | ||
run: bash -c "if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then echo >&2 'Please run \`./tools/format.sh\` - Found differences after formatting:' && git diff && exit 1; fi" |
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,31 @@ | ||
# Cut a release whenever a new tag is pushed to the repo. | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
# Allows owner to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Prepare workspace snippet | ||
run: .github/workflows/workspace_snippet.sh ${{ env.GITHUB_REF_NAME }} > release_notes.txt | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
prerelease: false | ||
# Use GH feature to populate the changelog automatically | ||
generate_release_notes: true | ||
body_path: release_notes.txt |
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,22 @@ | ||
#!/usr/bin/env bash | ||
set -eufo pipefail | ||
|
||
# Set by GH actions, see | ||
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables | ||
TAG=${GITHUB_REF_NAME} | ||
PREFIX="rules_proto-${TAG:1}" | ||
SHA=$(git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip | shasum -a 256 | awk '{print $1}') | ||
|
||
cat << EOF | ||
WORKSPACE snippet: | ||
\`\`\`starlark | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
http_archive( | ||
name = "build_stack_rules_proto", | ||
sha256 = "${SHA}", | ||
strip_prefix = "${PREFIX}", | ||
url = "https://github.com/stackb/rules_proto/archive/refs/tags/${TAG}.tar.gz", | ||
) | ||
\`\`\` | ||
EOF |
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
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
Oops, something went wrong.