Re-enable bazel without bazelisk and with scoped build/test targets (#1109)

* See if bazel "just works" now (almost)

* Add cache and better bazel test command line

* Narrow focus of bazel build
This commit is contained in:
Dominic Hamon 2021-04-19 10:51:12 +01:00 committed by GitHub
parent 39b5a298a7
commit 2dad9aef78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 18 deletions

View File

@ -11,23 +11,20 @@ jobs:
steps:
- uses: actions/checkout@v1
# - name: mount bazel cache
# uses: actions/cache@v1
# with:
# path: "/home/runner/.cache/bazel"
# key: bazel
- name: mount bazel cache
uses: actions/cache@v2.0.0
env:
cache-name: bazel-cache
with:
path: "~/.cache/bazel"
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.ref }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-master
# - 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: build
run: |
bazel build //:benchmark //:benchmark_main //test/...
# - name: test
# run: |
# "${GITHUB_WORKSPACE}/bin/bazel" test //test/...
- name: test
run: |
bazel test --test_output=errors //test/...