Merge pull request #24828 from pgellert/crashlog/define-api #9806
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: Lint cpp | |
on: | |
push: | |
branches: [dev] | |
paths: | |
- '**.h' | |
- '**.cc' | |
- '**.cpp' | |
- '**.proto' | |
- '**.java' | |
- '.github/workflows/lint-cpp.yml' | |
tags-ignore: | |
- '**' | |
pull_request: | |
paths: | |
- '**.h' | |
- '**.cc' | |
- '**.cpp' | |
- '**.proto' | |
- '**.java' | |
- '.github/workflows/lint-cpp.yml' | |
jobs: | |
cpp: | |
name: Lint files with clang-format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Baselisk | |
run: | | |
mkdir -v -p $HOME/.local/bin | |
wget -O $HOME/.local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 | |
chmod +x $HOME/.local/bin/bazel | |
- name: Run clang-format | |
# Don't update the lockfile for this | |
run: | | |
bazel run --lockfile_mode=off //tools:clang_format | |
git diff --exit-code |