2020-12-22 11:47:52 +00:00
|
|
|
name: bazel
|
|
|
|
|
|
|
|
on:
|
|
|
|
push: {}
|
|
|
|
pull_request: {}
|
|
|
|
|
|
|
|
jobs:
|
2022-06-13 16:45:20 +00:00
|
|
|
job:
|
|
|
|
name: bazel.${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-2022]
|
|
|
|
|
2020-12-22 11:47:52 +00:00
|
|
|
steps:
|
2023-02-09 15:52:03 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-12-22 11:47:52 +00:00
|
|
|
|
2021-04-19 09:51:12 +00:00
|
|
|
- name: mount bazel cache
|
2023-02-09 15:52:03 +00:00
|
|
|
uses: actions/cache@v3
|
2021-04-19 09:51:12 +00:00
|
|
|
env:
|
|
|
|
cache-name: bazel-cache
|
|
|
|
with:
|
|
|
|
path: "~/.cache/bazel"
|
2022-06-13 16:45:20 +00:00
|
|
|
key: ${{ env.cache-name }}-${{ matrix.os }}-${{ github.ref }}
|
2021-04-19 09:51:12 +00:00
|
|
|
restore-keys: |
|
2022-06-13 16:45:20 +00:00
|
|
|
${{ env.cache-name }}-${{ matrix.os }}-main
|
2020-12-22 11:47:52 +00:00
|
|
|
|
2021-04-19 09:51:12 +00:00
|
|
|
- name: build
|
|
|
|
run: |
|
|
|
|
bazel build //:benchmark //:benchmark_main //test/...
|
2021-04-26 17:26:33 +00:00
|
|
|
|
2021-04-19 09:51:12 +00:00
|
|
|
- name: test
|
|
|
|
run: |
|
2021-04-26 17:26:33 +00:00
|
|
|
bazel test --test_output=all //test/...
|