-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (50 loc) · 1.63 KB
/
static_tests.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
58
59
60
#
# detailed syntax defined in
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
name: "Static Tests"
on: [push, pull_request]
jobs:
clang-format:
runs-on: "ubuntu-20.04"
env:
CLANG_REQUIRE_VERSION: 17.0.4
CLANG_FORMAT_FILE: ".clang-format"
steps:
- name: "Checkout repository content"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: "Install dependencies"
run: |
python -m pip install --force-reinstall clang-format==${{ env.CLANG_REQUIRE_VERSION }}
- name: "Run clang-format..."
run: |
files=$(find . -iname "*.h" -o -iname "*.cu" -o -iname "*.cpp")
diff -u <(cat ${files}) <(clang-format ${files})
black:
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout repository content"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: "Run black..."
uses: psf/black@2a1c67e0b2f81df602ec1f6e7aeb030b9709dc7c # 23.11.0
flake8:
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout repository content"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: "Set up Python 3.x"
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: 3.9
- name: "Install dependencies"
run: |
pip install flake8
- name: "Run flake8..."
run: |
flake8 .