Skip to content

update @bazel_clang_format and source file formatting #536

update @bazel_clang_format and source file formatting

update @bazel_clang_format and source file formatting #536

Workflow file for this run

name: check
on:
push:
branches: [ main ]
pull_request:
branches: [ "*" ]
types: [synchronize, opened, reopened, edited]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flag:
- '--config=clang-format'
- '--config=clang-tidy'
- '--config=verbose-clang-tidy'
- '--compilation_mode=opt'
exclude:
- flag: ${{ github.event_name == 'pull_request' && '--config=verbose-clang-tidy' || 'dummy' }}
env:
PROFILE: profile-${{ matrix.flag }}.gz
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel build --profile=$PROFILE ${{ matrix.flag }} //...
bazel analyze-profile $PROFILE
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PROFILE }}
path : ${{ env.PROFILE }}
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [gcc, clang]
feature: ['', asan, tsan, ubsan]
env:
PROFILE: profile-${{ matrix.toolchain }}-${{ matrix.feature }}.gz
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel \
test \
--profile=$PROFILE \
--config=${{ matrix.toolchain }} \
--features=${{ matrix.feature }} \
//...
bazel analyze-profile $PROFILE
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PROFILE }}
path : ${{ env.PROFILE }}
coverage:
runs-on: ubuntu-latest
env:
PROFILE: profile-coverage.gz
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel run --profile=$PROFILE //tools:lcov_list
bazel analyze-profile $PROFILE
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PROFILE }}
path : ${{ env.PROFILE }}
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./bazel-out/_coverage/_coverage_report.dat
fail_ci_if_error: true
buildifier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel run //tools:buildifier.check
all:
runs-on: ubuntu-latest
if: ${{ github.base_ref == 'main' }}
needs:
- build
- test
- coverage
- buildifier
steps:
- run: true