Bazel test #103
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 test | |
on: | |
schedule: | |
- cron: "0 1 * * *" | |
push: | |
branches: [main] | |
paths-ignore: | |
- CODEOWNERS | |
- requirements.txt | |
- LICENSE.txt | |
- .pre-commit-config.yaml | |
- '**/*.md' | |
- '**/*.yml' | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- CODEOWNERS | |
- requirements.txt | |
- LICENSE.txt | |
- .pre-commit-config.yaml | |
- '**/*.md' | |
- '**/*.yml' | |
jobs: | |
build: | |
name: ${{ matrix.settings.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
settings: | |
- { | |
name: "Bazel test: debug", | |
flags: "-c dbg", | |
} | |
- { | |
name: "Bazel test: optimized", | |
flags: "-c opt", | |
} | |
- { | |
name: "Bazel test: address sanitizer", | |
flags: "--config=asan", | |
} | |
- { | |
name: "Bazel test: undefined behaviour sanitizer", | |
flags: "--config=ubsan", | |
} | |
- { | |
name: "Bazel test: thread sanitizer", | |
flags: "--config=tsan", | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- name: Mount bazel cache # Optional | |
uses: actions/cache@v3 | |
with: | |
path: "~/.cache/bazel" | |
key: bazel | |
- run: bazel test --action_env=BAZEL_CXXOPTS="-std=c++20" ${{matrix.settings.flags}} //... |