Skip to content

chore: add build_test targets to examples #188

chore: add build_test targets to examples

chore: add build_test targets to examples #188

Workflow file for this run

name: Default
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows manually triggering this workflow from the Actions tab.
workflow_dispatch:
jobs:
distros:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: Test
run: bazel test //...
compilation_modes:
strategy:
matrix:
compilation_mode:
- fastbuild
- dbg
- opt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: Test
run: bazel test --compilation_mode ${{ matrix.compilation_mode }} //...
sanitizers:
strategy:
matrix:
sanitizer:
- asan
- lsan
- tsan
- ubsan
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: Test ${{ matrix.sanitizer }}
run: bazel test --config ${{ matrix.sanitizer }} //tests/sanitizers:${{ matrix.sanitizer }}_test
rbe:
strategy:
matrix:
os:
- ubuntu-20.04
- macos-11
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- name: Test with RBE
run: |
touch $HOME/.bazelrc
chmod 0600 $HOME/.bazelrc
echo "build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" > $HOME/.bazelrc
bazel test --config rbe //...
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}