diff options
| author | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2026-05-08 11:53:46 +0200 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhsoting.net> | 2026-05-08 11:53:46 +0200 |
| commit | 5177d88bf591522d1b934e24221e16e02cd1592b (patch) | |
| tree | 1d8458cb6627ccfc673f791c5f0db45f9c06f7e0 /.github/workflows/clang_format.yml | |
| parent | a1dac799b819ba356a2faff3a98d7f5f076c24b6 (diff) | |
| parent | c3dce46c5f7cad6bc3cc91cc2c711ac089f25923 (diff) | |
Update upstream source from tag 'upstream/1.0.1+dfsg'
Update to upstream version '1.0.1+dfsg'
with Debian dir 3248cd7c10aca9ce2c693401e326390414aefe62
Diffstat (limited to '.github/workflows/clang_format.yml')
| -rw-r--r-- | .github/workflows/clang_format.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/clang_format.yml b/.github/workflows/clang_format.yml new file mode 100644 index 0000000..7ac9268 --- /dev/null +++ b/.github/workflows/clang_format.yml @@ -0,0 +1,39 @@ +# Copyright (C) 2025 Sebastian Pipping <sebastian@pipping.org> +# Licensed under the MIT license + +name: Enforce clang-format clean code + +on: + pull_request: + push: + schedule: + - cron: '0 2 * * 5' # Every Friday at 2am + workflow_dispatch: + +permissions: + contents: read + +jobs: + clang_format: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Install Clang 21 + run: |- + set -x + source /etc/os-release + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo add-apt-repository "deb https://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-21 main" + sudo apt-get update # due to new repository + sudo apt-get install --yes --no-install-recommends -V \ + clang-format-21 + echo /usr/lib/llvm-21/bin >>"${GITHUB_PATH}" + + - name: Enforce clang-format clean code + run: | + set -x -o pipefail + clang-format --version + git ls-files \*.cpp \*.c \*.h \*.h.in | xargs clang-format -i + sed 's,#\( \+\)cmakedefine,#cmakedefine,' -i.bak src/UriConfig.h.in # this helps Meson + git -c color.ui=always diff --exit-code # i.e. fail CI for non-empty diff |
