-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (38 loc) · 1.22 KB
/
ubuntu-clang-tidy.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
name: Clang-tidy
on:
push:
branches:
- main
pull_request:
jobs:
ubuntu-clang-tidy-build:
name: Build on Ubuntu with clang-tidy checks
runs-on: ubuntu-latest
strategy:
matrix:
clang-version: [19]
buildmode: [Debug]
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake libssl-dev libcurl4-openssl-dev ninja-build -y --no-install-recommends
- name: Install clang (with clang-tidy)
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{matrix.clang-version}}
sudo apt install clang-tidy-${{matrix.clang-version}}
sudo ln -s /usr/bin/clang-tidy-${{matrix.clang-version}} /usr/local/bin/clang-tidy
- name: Configure CMake
run: |
clang-tidy --dump-config
cmake -S . -B build -DCCT_ENABLE_CLANG_TIDY=ON -DCCT_ENABLE_ASAN=OFF -GNinja
env:
CC: clang-${{matrix.clang-version}}
CXX: clang++-${{matrix.clang-version}}
CMAKE_BUILD_TYPE: ${{matrix.buildmode}}
- name: Build
run: cmake --build build