forked from p4lang/p4c
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.08 KB
/
ci-lint.yaml
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
45
46
47
48
49
50
name: "p4c-lint"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
p4c-lint:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
IMAGE_TYPE: test
CMAKE_ONLY: ON
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: apply-linters-${{ runner.os }}
max-size: 1000M
# TODO: This check is disabled because git on the Github serves behaves differently. Unclear why.
# - name: Check submodule ref points.
# run: |
# ./tools/check-git-submodules.sh
- name: Build (Ubuntu 20.04)
run: |
tools/ci-build.sh
- name: Run cpplint on C/C++ files.
run: make cpplint
working-directory: ./build
- name: Run clang-format on C/C++ files.
run: make clang-format
working-directory: ./build
- name: Run black and isort on Python files.
run: |
make black
make isort
working-directory: ./build