Skip to content

Commit 1180a76

Browse files
committed
Add readme
1 parent 1cd6863 commit 1180a76

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# clang-tidy-cache for GitHub Actions
2+
This action downloads and sets up [clang-tidy-cache](https://github.com/matus-chochlik/ctcache) for use on GitHub Actions. This action has been inspired by [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action).
3+
4+
## Usage
5+
```yaml
6+
name: Lint
7+
8+
on:
9+
push:
10+
branches: [ "main" ]
11+
pull_request:
12+
branches: [ "main" ]
13+
14+
jobs:
15+
clang-tidy:
16+
name: clang-tidy
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- name: Clone the repository
20+
uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
24+
- name: Set up clang-tidy-cache
25+
uses: syyyr/clang-tidy-cache-action@v1
26+
27+
- name: Run the linter
28+
shell: bash
29+
run: |
30+
# create your build directory, e.g. `build`
31+
clang-tidy-cache clang-tidy -p build src/*
32+
```

0 commit comments

Comments
 (0)