-
Notifications
You must be signed in to change notification settings - Fork 21
44 lines (35 loc) · 1.11 KB
/
lint.yml
File metadata and controls
44 lines (35 loc) · 1.11 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
44
name: Lint
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pre-commit
run: pip install pre-commit
- name: Install clang tools
run: |
sudo apt-get update
sudo apt-get install -y clang-format-14 clang-tidy-14 libssl-dev
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 100
- name: Show tool versions
run: |
echo "clang-format version:"
clang-format --version
echo "clang-tidy version:"
clang-tidy --version
- name: Configure CMake
run: cmake -B build -S . -DAGENT_CPP_BUILD_MCP=ON -DAGENT_CPP_BUILD_OAUTH=ON
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --verbose