Skip to content

chore(deps): update jwlawson/actions-setup-bazel action to v2 #88

chore(deps): update jwlawson/actions-setup-bazel action to v2

chore(deps): update jwlawson/actions-setup-bazel action to v2 #88

Workflow file for this run

---
name: Bazel
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Cache Setup
uses: actions/cache@v4
id: cache-bazel
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel
- name: Bazel Setup
uses: jwlawson/actions-setup-bazel@v2
with:
bazel-version: '6'
- name: Bazel Version
run: bazel --version
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: bazel build --disk_cache ~/.cache/bazel //...
- name: Test
run: bazel test --disk_cache ~/.cache/bazel --test_timeout 10 //...
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: failure()
with:
name: Test Results (${{ matrix.platform }})
path: |
bazel-testlogs*/**/test.log
bazel-bin*/example/*
bazel-bin*/src/*
!bazel-bin*/**/_objs/
!bazel-bin*/**/*.cppmap
!bazel-bin*/**/*.params
!bazel-bin*/**/*.runfiles*
coverage:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Cache Setup
uses: actions/cache@v4
id: cache-bazel
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel
- name: Bazel Setup
uses: jwlawson/actions-setup-bazel@v2
with:
bazel-version: '6'
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: >
bazel build
--disk_cache ~/.cache/bazel
--collect_code_coverage
--instrument_test_targets
--instrumentation_filter="^//..."
--
//...
- name: Coverage
run: >
bazel coverage
--disk_cache ~/.cache/bazel
--instrument_test_targets
--instrumentation_filter="^//..."
--combined_report=lcov
--
//...
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: bazel-out/_coverage/_coverage_report.dat