Remove vestigial code, some cmake cleanup #335
Workflow file for this run
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
name: Check Formatting | |
on: [pull_request] | |
jobs: | |
check-format: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Install dependencies from APT | |
run: | | |
sudo apt install -y git clang-format-11 | |
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 100 \ | |
--slave /usr/share/man/man1/clang-format.1.gz clang-format.1.gz /usr/share/man/man1/clang-format-11.1.gz | |
- name: Check Formatting | |
run: | | |
cd ${{ github.workspace }} | |
git reset --soft $(git merge-base HEAD origin/master) | |
diff=$(git clang-format-11 --diff) | |
if [ $(echo "${diff}" | wc -l) != 1 ]; then | |
echo "Formatting errors detected! Suggested changes:" >&2 | |
echo "${diff}" >&2 | |
exit 1 | |
else | |
echo "No formatting errors detected!" | |
exit 0 | |
fi |