Create workflow to exercise bazel build (#1079)

* Create workflow to exercise bazel build
This commit is contained in:
Dominic Hamon 2020-12-22 11:47:52 +00:00 committed by GitHub
parent d8254bb9eb
commit a6d08aea4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 0 deletions

33
.github/workflows/bazel.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: bazel
on:
push: {}
pull_request: {}
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: mount bazel cache
uses: actions/cache@v1
with:
path: "/home/runner/.cache/bazel"
key: bazel
- name: install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: build
run: |
"${GITHUB_WORKSPACE}/bin/bazel" build //...
- name: test
run: |
"${GITHUB_WORKSPACE}/bin/bazel" test //test/...