Fix tidy script once more #40
This file contains 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
# SPDX-FileCopyrightText: 2024 Technical University of Munich | |
# | |
# SPDX-License-Identifier: BSD-3-Clause | |
name: clang-format | |
on: | |
- push | |
jobs: | |
clang-format: | |
name: clang-format | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: apt-get | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install python3 python3-pip | |
# fix version here for now | |
pip3 install --break-system-packages clang-format==19.1.0 | |
- name: run-clang-format | |
run: | | |
set -euo pipefail | |
clang-format --version | |
which clang-format | |
# cf. https://stackoverflow.com/a/36046965 | |
find async/ -iname '*.h' | xargs clang-format -i | |
find tests/ -iname '*.h' | xargs clang-format -i | |
git diff > formatting.patch | |
cat formatting.patch | |
if [ -s ./formatting.patch ]; then (exit 1); fi |