-
Notifications
You must be signed in to change notification settings - Fork 21
77 lines (70 loc) · 2.15 KB
/
Copy pathcodestyle.yml
File metadata and controls
77 lines (70 loc) · 2.15 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: fVDB Code Style
on:
pull_request:
branches:
- main
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test-python-black-lint:
name: Check Python code style with black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose --target-version=py311 --line-length=120"
src: "./"
version: "~= 24.0"
# NOTE: Enable this when/if we have C++ code
# test-cpp-clang-format-lint:
# name: Check C++ code style with clang-format
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: DoozyX/clang-format-lint-action@v0.18.2
# with:
# extensions: 'h,cpp,cc,cu,cuh'
# clangFormatVersion: 18
# style: file
include-guards:
name: Check include guards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: swahtz/include-guards-check-action@master
check-spdx-identifiers:
name: Check SPDX identifiers
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: enarx/spdx@master
with:
licenses: |-
Apache-2.0
MIT
# Search the git repository for any trailing spaces excluding auto-generated wlt files
# NOTE: Migrated from openvdb whitespace.yml
trailingspaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test
run: |
set +e
git grep -n -I -E '^.+[ ]+$' -- ':!*.wlt'
test $? -eq 1
# Search for any tabs excluding meeting notes, image files and a few others
# NOTE: Migrated from openvdb whitespace.yml
spacesnottabs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test
run: |
set +e
git grep -n " " -- ':!*/codestyle.yml' ':!*.svg' ':!*.cmd' ':!*.png' ':!*.wlt' ':!*.jpg' ':!*.gif' ':!*.mp4' ':!*.pt' ':!*.pth' ':!*.nvdb' ':!*.npz' ':!*.gitmodules'
test $? -eq 1