From ec0ceba6f1d7c8a6e431c752fb6e8f6eac0f6a9e Mon Sep 17 00:00:00 2001 From: Ian Lumsden Date: Thu, 10 Oct 2024 15:29:07 -0400 Subject: [PATCH] Adds GitHub Action for checking code formatting --- .github/workflows/format-check.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/format-check.yml diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 00000000..3db574fd --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,25 @@ +name: Check code formatting + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + cpp-format-check: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Install clang-format + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + build-essential \ + clang-format-16 + + - name: Test formatting + run: | + ./scripts/formatting/check-formatting.sh /usr/bin/clang-format-16 \ No newline at end of file