forked from boostorg/ublas
-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (34 loc) · 1.34 KB
/
clangtidy_review.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
# Copyright (c) 2020 Mohammad Ashar Khan
# Distributed under Boost Software License, Version 1.0
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
name: Clang tidy Review
on: [pull_request]
jobs:
check:
name: Clang tidy Review
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: "Install dependencies"
run: |
sudo apt-get install -y clang-10 clang-tidy-10
- name: "Install Boost from Source"
run: |
cd ..
git clone --depth 1 https://github.com/boostorg/boost.git --recursive --shallow-submodules
cd boost
./bootstrap.sh
./b2 headers
sudo cp -r -L boost /usr/include
rm -rf boost
- uses: actions/setup-python@v2
- name: "Run clang-tidy check"
run: |
clang-tidy-10 examples/tensor/*.cpp -- -Iinclude -std=c++17 > reports.txt
- name: "Post review comments"
if: always()
run: |
pip3 install 'unidiff~=0.6.0' --force-reinstall
pip3 install 'PyGithub~=1.51' --force-reinstall
pip3 install 'requests~=2.23' --force-reinstall
python ./.ci/post_review.py --repository ${{ github.repository }} --token ${{ github.token}} --pr ${{ github.event.pull_request.number }} --path reports.txt