Add support for modular build structure. #260
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Clang 11 | |
| run: sudo apt-get update && sudo apt-get install -y clang-11 clang-tidy | |
| - name: Setup | |
| run: sudo apt-get update && sudo apt-get -y install sudo python3 git g++ curl xz-utils | |
| - 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 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@v5 | |
| with: { 'python-version': '3' } | |
| - 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 | |