-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (47 loc) · 1.31 KB
/
ci-linting.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
name: "Linting"
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
jobs:
build:
runs-on: ubuntu-22.04
name: "Linux Linting"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Installing dependencies"
run: |
sudo apt-get update -y
sudo apt-get install -y
sudo apt-get install -y --no-install-recommends curl cmake pkg-config findutils wget
sudo apt-get remove -y clang-13 llvm-13 clang-format-13 clang-tidy-13 clang-12 llvm-12 clang-format-12 clang-tidy-12
sudo apt install -y --no-install-recommends clang-14 llvm-14 clang-format-14 clang-tidy-14
git submodule update --init --recursive
env:
CC: clang-14
CXX: clang++-14
- name: "Generating Compile Commands"
run: |
mkdir -p Debug
pushd Debug
cmake ..
popd
ln -s $PWD/Debug/compile_commands.json $PWD/compile_commands.json
env:
CC: clang-14
CXX: clang++-14
- name: Trunk cache
id: cache-trunk
uses: actions/[email protected]
with:
path: ~/.cache/trunk/
key: ${{ runner.os }}-trunk
- name: Trunk Check
uses: trunk-io/trunk-action@v1