fix: sysroot build libraries with position independent code (#174) #283
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: | |
# 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: | |
concurrency: | |
# Cancel previous actions from the same PR: https://stackoverflow.com/a/72408109 | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
distros: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-22.04 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- name: Test | |
run: | | |
./.github/workflows/configurebb.sh | |
bazel test --config ci //... | |
env: | |
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |
compilation_modes: | |
strategy: | |
matrix: | |
compilation_mode: | |
- fastbuild | |
- dbg | |
- opt | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- name: Test | |
run: | | |
./.github/workflows/configurebb.sh | |
bazel test --config ci --compilation_mode ${{ matrix.compilation_mode }} //... | |
env: | |
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |
sanitizers: | |
strategy: | |
matrix: | |
sanitizer: | |
- asan | |
- lsan | |
- tsan | |
- ubsan | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- name: Test ${{ matrix.sanitizer }} | |
run: | | |
./.github/workflows/configurebb.sh | |
bazel test --config ci --config ${{ matrix.sanitizer }} //tests/sanitizers:${{ matrix.sanitizer }}_test | |
env: | |
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |
coverage: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- name: Test Coverage | |
run: | | |
./.github/workflows/configurebb.sh | |
bazel coverage --config ci //examples/hello_world_cpp:hello_world_cpp_test | |
env: | |
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} | |
rbe: | |
if: (github.ref == 'refs/heads/main' || contains(github.head_ref, 'rbe')) | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- macos-11 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bazelbuild/setup-bazelisk@v2 | |
- name: Test with RBE | |
run: | | |
./.github/workflows/configurebb.sh | |
bazel test --config ci --config rbe //... | |
env: | |
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }} |