forked from openucx/ucc
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.7 KB
/
clang-tidy.yaml
File metadata and controls
44 lines (42 loc) · 1.7 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
name: Linter
on: [push, pull_request]
env:
OPEN_UCX_LINK: https://github.com/openucx/ucx
OPEN_UCX_BRANCH: master
CLANG_VER: 17
jobs:
clang-tidy:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends wget gpg
# Setup LLVM repository
sudo mkdir -p /etc/apt/keyrings
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/llvm.gpg
echo "deb [signed-by=/etc/apt/keyrings/llvm.gpg] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${CLANG_VER} main" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang-tidy-${CLANG_VER} bear
- name: Get UCX
run: git clone ${OPEN_UCX_LINK} -b ${OPEN_UCX_BRANCH} /tmp/ucx
- name: Build UCX
run: |
cd /tmp/ucx && ./autogen.sh
CC=clang-${CLANG_VER} CXX=clang++-${CLANG_VER} ./contrib/configure-release --without-java --without-go --disable-numa --prefix $PWD/install
make -j install
- uses: actions/checkout@v1
- name: Build UCC
run: |
./autogen.sh
CC=clang-${CLANG_VER} CXX=clang++-${CLANG_VER} ./configure --prefix=/tmp/ucc/install --with-ucx=/tmp/ucx/install --enable-assert
bear --output /tmp/compile_commands.json -- make -j
- name: Run clang-tidy
run: |
echo "Workspace: ${GITHUB_WORKSPACE}"
cd ${GITHUB_WORKSPACE}
run-clang-tidy-${CLANG_VER} -p /tmp/ 2>&1 | tee /tmp/clang_tidy.log
nerrors=$(grep 'error:' /tmp/clang_tidy.log | wc -l)
if [ $nerrors -ne 0 ]; then
exit 125;
fi