Skip to content

Commit

Permalink
Update GitHub workflow (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
acodcha authored Aug 3, 2024
1 parent 62b8d8f commit 96ff419
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ on:
pull_request:
branches: [main]
jobs:
formatting:
name: Check source code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install the Findutils and ClangFormat packages
run: |
sudo apt-get update
sudo apt-get install --yes findutils clang-format-14
- name: Check that all source code files are correctly formatted
run: |
find include/ test/ -iname *.hpp -or -iname *.cpp | xargs clang-format --style=file -i
CHANGES=$(git diff --name-only)
if ! [ -z "$CHANGES" ]; then
echo "Some source code files are incorrectly formatted. To format all source code files, run:"
echo " find include/ test/ -iname *.hpp -or -iname *.cpp | xargs clang-format --style=file -i"
exit 1;
fi
bazel:
name: Build and test with Bazel
runs-on: ubuntu-latest
Expand Down Expand Up @@ -50,21 +68,3 @@ jobs:
run: |
cd build
sudo make install
formatting:
name: Check source code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install the Findutils and ClangFormat packages
run: |
sudo apt-get update
sudo apt-get install --yes findutils clang-format-14
- name: Check that all source code files are correctly formatted
run: |
find include/ test/ -iname *.hpp -or -iname *.cpp | xargs clang-format --style=file -i
CHANGES=$(git diff --name-only)
if ! [ -z "$CHANGES" ]; then
echo "Some source code files are incorrectly formatted. To format all source code files, run:"
echo " find include/ test/ -iname *.hpp -or -iname *.cpp | xargs clang-format --style=file -i"
exit 1;
fi

0 comments on commit 96ff419

Please sign in to comment.