Added support for Layer Interface Version 0 in the pipeline runtime layer #331
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: | |
clang-format-check: | |
name: clang-format | |
runs-on: "ubuntu-22.04" | |
steps: | |
- name: Setup environment | |
run: | | |
sudo apt-get install -yqq clang-format-14 | |
- name: Checkout | |
run: | | |
git clone https://github.com/${{ github.repository }}.git . | |
git checkout ${{ github.base_ref }} | |
git fetch origin +${{ github.sha }}:${{ github.ref }} --update-head-ok | |
git checkout ${{ github.sha }} | |
- name: Run clang-format | |
run: | | |
git diff ${{ github.base_ref }} -U0 --no-color -- '**/*.cpp' '**/*.cc' '**/*.h' '**/*.hh' \ | |
| clang-format-diff-14 -p1 >not-formatted.diff 2>&1 | |
- name: Check formatting | |
run: | | |
if ! grep -q '[^[:space:]]' not-formatted.diff ; then | |
echo "Code formatted. Success." | |
else | |
echo "Code not formatted." | |
echo "Please run clang-format-diff on your changes and push again:" | |
echo " git diff ${{ github.base_ref }} -U0 --no-color | clang-format-diff -p1 -i" | |
echo "" | |
echo "Tip: you can selectively disable clang-format checks. See https://clang.llvm.org/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code" | |
echo "" | |
echo "Diff:" | |
cat not-formatted.diff | |
echo "" | |
exit 2 | |
fi | |