-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI config and add bazel action.yml (#115)
Fixes #115
- Loading branch information
1 parent
fa25ce9
commit d5dd9cd
Showing
3 changed files
with
58 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 'Run Bazel Command' | ||
description: 'Ensures bazelisk, mounts Bazel Cache from artifacts and runs Bazel command' | ||
inputs: | ||
bazel-config: | ||
description: 'The bazel configuration to use.' | ||
required: false | ||
default: "--config=ci" | ||
bazel-command: | ||
description: 'The bazel command to run. Typically the arguments after bazelisk' | ||
required: true | ||
bazel-targets: | ||
description: 'The bazel targets' | ||
required: true | ||
cache-key: | ||
description: 'The cache key to uniquely identify this build' | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Bazelisk | ||
uses: bazelbuild/setup-bazelisk@v2 | ||
- name: Install JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: "11" | ||
|
||
- name: Mount bazel cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "bazel-cache" | ||
key: ${{ inputs.cache-key }} | ||
|
||
- name: Run bazel command | ||
shell: bash | ||
run: bazelisk ${{ inputs.bazel-command }} ${{ inputs.bazel-config }} ${{ inputs.bazel-targets }} |
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