feat(sxproto): to write yaml #754
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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: 'latest' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Remove WORKSPACE.bazel content. | |
run: sed -i -E -e 's/^.*$//' WORKSPACE.bazel | |
- name: Build | |
run: > | |
bazel build --config=${{ matrix.platform }}_test_platform | |
//... | |
- name: Test | |
# --enable_runfiles is for Windows tests to access data deps. | |
run: > | |
bazel test --config=${{ matrix.platform }}_test_platform | |
--enable_runfiles | |
--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*/src/* | |
bazel-bin*/test/* | |
bazel-bin*/tool/* | |
!bazel-bin*/test/syntax/ | |
!bazel-bin*/**/_objs/ | |
!bazel-bin*/**/*.cppmap | |
!bazel-bin*/**/*.params | |
!bazel-bin*/**/*.runfiles* | |
benchmark: | |
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: 'latest' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
run: > | |
bazel build --config=linux_test_platform | |
--jobs=auto | |
--config=benchmark //test/benchmark/... | |
- name: Benchmark | |
run: > | |
bazel test --config=linux_test_platform | |
--config=benchmark //test/benchmark/... | |
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: Setup bazel | |
uses: jwlawson/actions-setup-bazel@v2 | |
with: | |
# Bazel 7 coverage output looks low to Coveralls, so use Bazel 6. | |
bazel-version: '6' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Coverage | |
run: > | |
bazel coverage --config=linux_test_platform | |
--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 | |
fuzz: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Bazel Setup | |
uses: jwlawson/actions-setup-bazel@v2 | |
with: | |
bazel-version: 'latest' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fuzz | |
run: > | |
bazel test --config=linux_test_platform | |
--config=asan-libfuzzer | |
//test/fuzz/... | |
test_without_bzlmod: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Bazel Setup | |
uses: jwlawson/actions-setup-bazel@v2 | |
with: | |
bazel-version: '4.2.2' | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test | |
run: bazel test --test_timeout 10 //... |