Skip to content

chore(ci): reduce number of jobs (#237) #439

chore(ci): reduce number of jobs (#237)

chore(ci): reduce number of jobs (#237) #439

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:
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-22.04
- ubuntu-24.04
bzlmod_config:
- bzlmod
- workspace
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Test
run: |
ln -s .github/workflows/.bazelrc.ci .bazelrc.ci
bazel test --config ${{ matrix.bzlmod_config }} //...
compilation_modes:
strategy:
matrix:
compilation_mode:
- fastbuild
- dbg
- opt
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Test
run: |
ln -s .github/workflows/.bazelrc.ci .bazelrc.ci
bazel test --compilation_mode ${{ matrix.compilation_mode }} //...
sanitizers:
strategy:
matrix:
sanitizer:
- asan
- lsan
- tsan
- ubsan
compilation_mode:
- fastbuild
- dbg
- opt
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Test ${{ matrix.sanitizer }} (${{ matrix.compilation_mode }})
run: |
ln -s .github/workflows/.bazelrc.ci .bazelrc.ci
bazel test --compilation_mode ${{ matrix.compilation_mode }} --config ${{ matrix.sanitizer }} //tests/sanitizers:${{ matrix.sanitizer }}_test
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Test Coverage
run: |
ln -s .github/workflows/.bazelrc.ci .bazelrc.ci
bazel coverage //examples/hello_world_cpp:hello_world_cpp_test //tests/coverage/...
bazel9:
runs-on: ubuntu-22.04
env:
USE_BAZEL_VERSION: 9.1.0
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-bazel9
repository-cache: true
- name: Test
run: |
ln -s .github/workflows/.bazelrc.ci .bazelrc.ci
bazel test -- //... -//docs/...
rbe:
strategy:
matrix:
os:
- ubuntu-22.04
- macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: bazel-contrib/setup-bazel@0.15.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- name: Test with RBE
run: |
ln -s .github/workflows/.bazelrc.ci .bazelrc.ci
bazel test --config rbe //...