-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add github workflows * Update select for grpcurl
- Loading branch information
Showing
5 changed files
with
157 additions
and
8 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,15 @@ | ||
# 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,48 @@ | ||
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 | ||
... |
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,69 @@ | ||
# Cut a release whenever a new tag is pushed to the repo. | ||
# You should use an annotated tag, like `git tag -a v1.2.3` | ||
# and put the release notes into the commit message for the tag. | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set output | ||
id: vars | ||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
|
||
- 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: build release binaries | ||
env: | ||
# Bazelisk will download bazel to here | ||
XDG_CACHE_HOME: ~/.cache/bazel-repo | ||
run: >- | ||
bazel | ||
--bazelrc=.github/workflows/ci.bazelrc | ||
--bazelrc=.bazelrc | ||
build | ||
//cmd/grpc-starlark:all | ||
- name: Prepare release assets | ||
env: | ||
# Bazelisk will download bazel to here | ||
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} | ||
run: >- | ||
cp bazel-bin/cmd/grpc-starlark/grpc-starlark_darwin_amd64.zip grpc-starlark_darwin_amd64.${{ env.RELEASE_VERSION }}.zip && | ||
cp bazel-bin/cmd/grpc-starlark/grpc-starlark_darwin_arm64.zip grpc-starlark_darwin_arm64.${{ env.RELEASE_VERSION }}.zip && | ||
cp bazel-bin/cmd/grpc-starlark/grpc-starlark_linux_amd64.zip grpc-starlark_linux_amd64.${{ env.RELEASE_VERSION }}.zip && | ||
cp bazel-bin/cmd/grpc-starlark/grpc-starlark_linux_arm64.zip grpc-starlark_linux_arm64.${{ env.RELEASE_VERSION }}.zip && | ||
cp bazel-bin/cmd/grpc-starlark/grpc-starlark_windows_amd64.zip grpc-starlark_windows_amd64.${{ env.RELEASE_VERSION }}.zip && | ||
echo "done" | ||
- name: Release | ||
env: | ||
RELEASE_VERSION: ${{ steps.vars.outputs.tag }} | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
grpc-starlark_darwin_amd64.${{ env.RELEASE_VERSION }}.zip | ||
grpc-starlark_darwin_arm64.${{ env.RELEASE_VERSION }}.zip | ||
grpc-starlark_linux_amd64.${{ env.RELEASE_VERSION }}.zip | ||
grpc-starlark_linux_arm64.${{ env.RELEASE_VERSION }}.zip | ||
grpc-starlark_windows_amd64.${{ env.RELEASE_VERSION }}.zip |
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