Skip to content

Fix build on a newer verisons of gcc (and thereby on Arch) #819

Fix build on a newer verisons of gcc (and thereby on Arch)

Fix build on a newer verisons of gcc (and thereby on Arch) #819

Workflow file for this run

name: Codestyle
on: [pull_request]
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-12
- name: Check formatting
run: |
formatterOutput=$( git diff -U0 origin/$GITHUB_BASE_REF...HEAD | clang-format-diff-12 -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 \
-DBOOST_ROOT=${{github.workspace}}/lib/boost \
-DCMAKE_BUILD_TYPE=Debug \
-Dgtest_disable_pthreads=OFF \
-DCOMPILE_PYBIND=ON \
-DASAN=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
. -B ${{github.workspace}}/build
- uses: ZedThree/[email protected]
id: review
with:
build_dir: build
config_file: '.clang-tidy'
split_workflow: true
- uses: ZedThree/clang-tidy-review/[email protected]