-
Notifications
You must be signed in to change notification settings - Fork 52
66 lines (62 loc) · 1.81 KB
/
linters.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: linters
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
rubocop:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install dependencies
run: bundle install
- name: Run rubocop
run: bundle exec rubocop
clang_format:
runs-on: ubuntu-20.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 clang-format
- name: Run clang-format
run: ./bin/check-clang-format
clang_static_analyzer:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y libssl-dev cmake curl wget gnupg2
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo bash -c "echo 'deb https://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' >> /etc/apt/sources.list"
sudo apt-get update -y
sudo apt-get install -y clang-11 clang-tools-11
- name: Run scan build
run: ./bin/check-clang-static-analyzer
env:
CB_CC: /usr/bin/clang-11
CB_CXX: /usr/bin/clang++-11
CB_SCAN_BUILD: /usr/bin/scan-build-11
- name: Upload scan-build report
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: report
path: ext/cmake-build-report.tar.gz