Files
Cem Bassoy 231ba5f730 refactor(core): simplify and eliminate auxiliary tensor types (#115)
Auxiliary functions for extents and strides were using different
functions. Additionally, many tags were used to distinguish between
different tensor types. This patch simplifies interfaces of different
core functions and unifies functions that can process different types of
extent and stride types.
2021-09-09 11:34:14 +02:00

53 lines
1.7 KiB
YAML

# Copyright (c) 2020 Mohammad Ashar Khan
# Copyright (c) 2021 Cem Bassoy
# 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: "Static Analysis"
on:
push:
paths-ignore:
- '**.md'
- 'doc/**'
pull_request:
paths-ignore:
- '**.md'
- 'doc/**'
jobs:
check:
name: Linux Clang-Tidy
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Clang 11
run: sudo apt-get update && sudo apt-get install -y clang-11 clang-tidy-11
- 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
- name: "Run Clang-Tidy"
run: clang-tidy-11 examples/tensor/*.cpp test/tensor/*.cpp -- -Iinclude -std=c++20 > reports.txt
- name: "Print Clang-Tidy Report"
run: cat reports.txt
- uses: actions/setup-python@v2
- name: "Post review comments"
if: github.event.pull_request.head.repo.full_name == github.repository
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