mirror of
https://github.com/google/benchmark.git
synced 2024-12-27 13:00:36 +08:00
e2556df80f
* Downgrade bazel to windows-2019 Windows 2022 is not well supported by bazel yet: https://github.com/bazelbuild/bazel/issues/18592 * no windows-latest, only windows-2019 (for bazel)
36 lines
968 B
YAML
36 lines
968 B
YAML
name: bazel
|
|
|
|
on:
|
|
push: {}
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
build_and_test_default:
|
|
name: bazel.${{ matrix.os }}.${{ matrix.bzlmod && 'bzlmod' || 'no_bzlmod' }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, windows-2019]
|
|
bzlmod: [false, true]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: mount bazel cache
|
|
uses: actions/cache@v3
|
|
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 ${{ matrix.bzlmod && '--enable_bzlmod' || '--noenable_bzlmod' }} //:benchmark //:benchmark_main //test/...
|
|
|
|
- name: test
|
|
run: |
|
|
bazel test ${{ matrix.bzlmod && '--enable_bzlmod' || '--noenable_bzlmod' }} --test_output=all //test/...
|