-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
47 lines (37 loc) · 1.2 KB
/
pr-checks.yml
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
name: PR-Checks
on: [pull_request]
jobs:
pr-checks:
runs-on: ubuntu-20.04
steps:
- name: Install Python
run: sudo apt install python3
shell: bash
- uses: actions/checkout@v3
with:
# Assume that there are not >200 new commits that need checking
fetch-depth: 200
submodules: 'recursive'
# Don't create a merge commit
ref: ${{ github.event.pull_request.head.sha }}
- name: Check commit style
run: $GITHUB_WORKSPACE/.github/workflows/check_commit_style.py ${{ github.base_ref }}
shell: bash
- name: Check line endings
uses: erclu/check-crlf@v1
with:
exclude: '3rdparty/'
- uses: ./.github/actions/install-dependencies
with:
type: shared
os: ubuntu-20.04
arch: 64bit
- name: Generate compile-command DB
run: mkdir build; cd build; cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..; cd ..; ln -s build/compile_commands.json .
shell: bash
- name: Check code formatting
uses: jidicula/clang-format-action@v3.5.2
with:
clang-format-version: '10'
check-path: '.'
exclude-regex: '(3rdparty/*|build/*)'