forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.13 KB
/
Copy pathlint-cpp.yml
File metadata and controls
43 lines (43 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
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
env:
# Bazel uses this to enforce strict sandboxing - we can't do it in Github Actions,
# so set CI=false to disable the check we do in `//tools:bazel`
CI: false
# Don't update the lockfile for this
run: |
bazel run --lockfile_mode=off //tools:clang_format
git diff --exit-code