Skip to content

READMEs rework for console repo and package #2140

READMEs rework for console repo and package

READMEs rework for console repo and package #2140

Workflow file for this run

name: Codestyle
on:
pull_request:
paths-ignore:
- docs/**
- README.md
- README_PYPI.md
- cli/**
- examples/**
- images/**
- .gitignore
- COPYING
- build.*
- pull_datasets.sh
- pyproject.toml
jobs:
clang-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Pull clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format-14
- name: Check formatting
run: |
formatterOutput=$( git diff -U0 origin/$GITHUB_BASE_REF...HEAD | clang-format-diff-14 -p 1)
if [ "$formatterOutput" != "" ]
then
echo ":x: :x: :x:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`c++" >> $GITHUB_STEP_SUMMARY
echo "$formatterOutput" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "$formatterOutput"
exit 1
fi
echo "$formatterOutput"
echo "### $formatterOutput :heavy_check_mark:" >> $GITHUB_STEP_SUMMARY
clang-tidy-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download libraries
uses: ./.github/composite-actions/download-libraries
with:
download-pybind: true
- name: Generate compile_commands.json
run: |
cmake -DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_CXX_COMPILER=g++-10 \
-DCMAKE_BUILD_TYPE=Debug \
-Dgtest_disable_pthreads=OFF \
-DASAN=OFF \
-DPYTHON=COMPILE \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
. -B ${{github.workspace}}/build
- uses: ZedThree/clang-tidy-review@v0.14.0
id: review
with:
apt_packages: libboost-dev
build_dir: build
config_file: '.clang-tidy'
split_workflow: true
- uses: ZedThree/clang-tidy-review/upload@v0.14.0
- name: Fail the check if clang-tidy reported issues
if: steps.review.outputs.total_comments > 0
run: exit 1