Skip to content

Commit 34c9f0c

Browse files
committed
ci: Add a GitHub action for linting
1 parent a0bdf3c commit 34c9f0c

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/lint.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Lint
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
name: ClangTidy
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Install dependencies
13+
run: sudo apt-get install nasm clang-tidy python3-pip &&
14+
pip3 install compiledb
15+
16+
- name: Cache Dependencies
17+
id: cache-deps
18+
uses: actions/cache@v2
19+
with:
20+
path: .deps
21+
key: ${{ runner.os }}-${{ env.GCC_VERSION }}-${{ env.BINUTILS_VERSION }}-deps
22+
23+
- name: Install cross compiler dependencies
24+
if: steps.cache-deps.outputs.cache-hit != 'true'
25+
run: sudo apt-get install -y build-essential flex bison texinfo wget
26+
27+
- name: Build cross compiler
28+
if: steps.cache-deps.outputs.cache-hit != 'true'
29+
run: make deps
30+
31+
- name: Generate compile_commands.json
32+
run: cd kernel && compiledb make
33+
34+
- name: Lint
35+
run: make lint

0 commit comments

Comments
 (0)