Skip to content

Add support for modular build structure. #251

Add support for modular build structure.

Add support for modular build structure. #251

Workflow file for this run

# 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