-
Notifications
You must be signed in to change notification settings - Fork 56
91 lines (85 loc) · 2.97 KB
/
linters.yml
File metadata and controls
91 lines (85 loc) · 2.97 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: linters
permissions: {}
on:
push:
branches:
- main
- release*
pull_request:
branches:
- main
- release*
env:
LLVM_VERSION: 20
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rubocop:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
- name: Install dependencies
run: bundle install
- name: Run rubocop
run: |
bundle exec rubocop -v
bundle exec rubocop
clang_format:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 2
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y wget gnupg2 git
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor --output /etc/apt/keyrings/llvm-snapshot.gpg
sudo bash -c "echo 'deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main' >> /etc/apt/sources.list"
sudo apt-get update -y
sudo apt-get install -y clang-format-${LLVM_VERSION}
- name: Run clang-format
env:
CB_GIT_CLANG_FORMAT: /usr/bin/git-clang-format-${{ env.LLVM_VERSION }}
CB_CLANG_FORMAT: /usr/bin/clang-format-${{ env.LLVM_VERSION }}
run: ./bin/check-clang-format
clang_static_analyzer:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libssl-dev cmake curl wget gnupg2 libcurl4-openssl-dev libprotobuf-dev libgrpc-dev gdb
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor --output /etc/apt/keyrings/llvm-snapshot.gpg
sudo bash -c "echo 'deb [signed-by=/etc/apt/keyrings/llvm-snapshot.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-${LLVM_VERSION} main' >> /etc/apt/sources.list"
sudo apt-get update -y
sudo apt-get install -y clang-${LLVM_VERSION} clang-tools-${LLVM_VERSION}
- uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 2G
key: ${{ github.job }}
- name: Run scan build
run: ./bin/check-clang-static-analyzer
env:
CB_CC: /usr/bin/clang-${{ env.LLVM_VERSION }}
CB_CXX: /usr/bin/clang++-${{ env.LLVM_VERSION }}
CB_SCAN_BUILD: /usr/bin/scan-build-${{ env.LLVM_VERSION }}
- name: Upload scan-build report
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: report
path: ext/cmake-build-report.tar.gz