From 192f7054a49023d15eff9790dc407bf0a7b3d5a1 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 26 Apr 2026 06:28:17 +1000 Subject: [PATCH] CI: migrate clang-format job to Github Actions Unfortunately this requires regressing to clang-format 18 because 19 is not easily available yet. --- .cirrus.yml | 10 ---------- .github/workflows/ci.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 7d881f5..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,10 +0,0 @@ -task: - - # only test the main branch and pull requests - only_if: $CIRRUS_BRANCH == "main" || $CIRRUS_PR != "" - - matrix: - - name: clang-format - container: - image: silkeh/clang:19 - test_script: uname -rms && apt-get update -y && apt-get install --no-install-recommends -y git && git ls-files -z '**/*.c' '**/*.h' | xargs -0 -- clang-format --dry-run --style=file --Werror diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a32a35c..fb2ce8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,3 +111,15 @@ jobs: - run: cmake --build build - run: cmake --build build --target check - run: sudo cmake --install build + + clang_format: + name: Ubuntu 24.04, clang-format + runs-on: ubuntu-24.04 + env: + DEBIAN_FRONTEND: noninteractive + steps: + - run: uname -rms + - run: echo "cloning ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + - run: git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd + - run: cd wd && git fetch -- origin ${{ github.event.pull_request.head.sha }} && git checkout FETCH_HEAD + - run: cd wd && git ls-files -z '**/*.c' '**/*.h' | xargs -0 -- clang-format-18 --dry-run --style=file --Werror