-
Notifications
You must be signed in to change notification settings - Fork 14
57 lines (46 loc) · 1.19 KB
/
format.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
48
49
50
51
52
53
54
55
56
57
name: Format
on:
pull_request:
push:
branches:
- main
paths:
- "include/**"
- "python/**"
- "test/**"
jobs:
format-cpp:
name: Format (C++)
runs-on: ubuntu-20.04
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Install dependencies
run: sudo apt update && sudo apt -y install clang-format python3
- name: Checkout code
uses: actions/checkout@v2
- name: Run formatter
run: ./bin/format --check include python/src test
format-python:
name: Format (Python)
runs-on: ubuntu-20.04
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Install dependencies
run: sudo apt update && sudo apt -y install python3
- name: Checkout code
uses: actions/checkout@v2
- name: Create virtual environment
run: |
cd python
make setup
- name: Run formatter
run: |
cd python
make format check=1
make lint