debug #24
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
# | |
# Distributed Linear Algebra with Future (DLAF) | |
# | |
# Copyright (c) 2018-2024, ETH Zurich | |
# All rights reserved. | |
# | |
# Please, refer to the LICENSE file in the root directory. | |
# SPDX-License-Identifier: BSD-3-Clause | |
# | |
name: Check format | |
on: | |
- push | |
jobs: | |
check: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/javascript-action@v1 | |
- name: Install tools | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends clang-format-15 fd-find python3 ripgrep | |
pip3 install black==23.03.0 | |
pip3 install cmakelang==0.6.13 | |
pushd /tmp | |
curl --output dasel \ | |
--location https://github.com/TomWright/dasel/releases/download/v1.27.3/dasel_linux_amd64 | |
sha256sum dasel | |
echo "1a5adbf8e5b69f48ad5d1665bf7ed056ea3ff8cf3312ce2dc7c3209939873489 dasel" | sha256sum --check | |
chmod +x dasel | |
mv dasel /usr/local/bin | |
popd | |
- name: Fetch master | |
run: git fetch --no-tags --depth=1 origin +refs/heads/master:refs/heads/master | |
# Fails if there are tabs in source files. | |
# - name: Check formatting | |
# run: ./.github/format.sh | |
# - name: Check scripts formatting | |
# if: always() | |
# run: black --line-length 105 scripts/ | |
# # Fails if there are differences. | |
# - name: Formatting issues | |
# if: always() | |
# run: git diff --color --exit-code | |
- name: Check include guards | |
if: always() | |
run: | | |
find . test -type f '(' -name "*.h" -o -name "*.h.in" ')' \ | |
| xargs -I{} sh -c \ | |
"egrep -sq '^#pragma once' {} || echo {}" \ | |
> pragma-once.check | |
for filepath in `cat pragma-once.check`; do \ | |
echo "::error file=$filepath,line=1::missing include guard in $filepath"; \ | |
done | |
test ! -s pragma-once.check |