chore: add build_test targets to examples #186
Workflow file for this run
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: Default | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
# 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 --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 }} |