-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (48 loc) · 1.31 KB
/
Lint.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
# Lint the project using cpplint
name: Lint
on:
push:
branches:
- '**'
paths:
- "**"
- "!.github/**"
- ".github/workflows/Lint.yml"
pull_request:
defaults:
run:
shell: bash
jobs:
cpplint:
runs-on: ${{ matrix.cudacxx.os }}
name: "cpplint (${{ matrix.cudacxx.cuda }}, ${{ matrix.cudacxx.os }})"
strategy:
fail-fast: false
# Multiplicative build matrix
# optional exclude: can be partial, include: must be specific
matrix:
cudacxx:
- cuda: "11.0"
os: ubuntu-20.04
env:
# Define constants
BUILD_DIR: "build"
BUILD_TESTS: "ON"
# Port matrix options to environment, for more portability.
CUDA: ${{ matrix.cudacxx.cuda }}
OS: ${{ matrix.cudacxx.os }}
steps:
- uses: actions/checkout@v3
- name: Install cpplint
run: |
python3 -m pip install cpplint
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Add custom problem matchers for annotations
run: echo "::add-matcher::.github/problem-matchers.json"
- name: Configure cmake
run: >
cmake . -B "${{ env.BUILD_DIR }}"
-DFLAMEGPU_ALLOW_LINT_ONLY=ON
- name: Lint
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target all_lint --verbose -j `nproc`