41 lines
918 B
YAML
41 lines
918 B
YAML
name: bazel
|
|
|
|
on:
|
|
push: {}
|
|
pull_request: {}
|
|
|
|
env:
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build_and_test_default:
|
|
name: bazel.${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: mount bazel cache
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
env:
|
|
cache-name: bazel-cache
|
|
with:
|
|
path: "~/.cache/bazel"
|
|
key: ${{ env.cache-name }}-${{ matrix.os }}-${{ github.ref }}
|
|
restore-keys: |
|
|
${{ env.cache-name }}-${{ matrix.os }}-main
|
|
|
|
- name: build
|
|
run: |
|
|
bazel build //:benchmark //:benchmark_main //test/...
|
|
|
|
- name: test
|
|
run: |
|
|
bazel test --test_output=all //test/...
|