forked from y-scope/clp-ffi-go
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.44 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
57
58
59
60
61
62
63
64
65
66
name: "lint"
on:
push:
pull_request:
workflow_call:
permissions:
contents: "read"
jobs:
go-lint:
strategy:
matrix:
go: ["1.23"]
os: ["ubuntu-latest", "macos-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup Go"
uses: "actions/setup-go@v5"
with:
go-version: "${{ matrix.go }}"
- name: "Lint go code"
uses: "golangci/golangci-lint-action@v6"
with:
version: "v1.59"
cpp-lint:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
submodules: "recursive"
- name: "Setup Go"
uses: "actions/setup-go@v5"
with:
go-version: "${{ matrix.go }}"
- name: "Macos: install clang/llvm"
if: |
matrix.os == "macos-latest"
run: |
brew update
brew install llvm
- name: "Linux: install clang/llvm"
if: |
matrix.os == "ubuntu-latest"
run: |
curl --proto "=https" --tlsv1.2 -sSf https://apt.llvm.org/llvm.sh | bash -s -- 16 all
- name: "Clang format"
run: |
find cpp/src -type f | xargs clang-format-16 -i
- name: "Clang tidy"
run: |
find cpp/src -type f | xargs clang-tidy-16