mirror of
https://github.com/fmtlib/fmt.git
synced 2026-06-15 16:36:10 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](1af3b93b68...df4cb1c069)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 6.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: lint
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**.h'
|
|
- '**.cc'
|
|
- '**.cmake'
|
|
- '**/CMakeLists.txt'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
clang-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
|
|
- name: Install clang-format
|
|
run: |
|
|
sudo install -D -m 0644 support/llvm-snapshot.gpg.key \
|
|
/etc/apt/keyrings/apt.llvm.org.asc
|
|
codename=$(lsb_release -cs)
|
|
echo "deb [signed-by=/etc/apt/keyrings/apt.llvm.org.asc]" \
|
|
"https://apt.llvm.org/$codename/" \
|
|
"llvm-toolchain-$codename-21 main" \
|
|
| sudo tee /etc/apt/sources.list.d/llvm.list
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang-format-21
|
|
|
|
- name: Run clang-format
|
|
run: |
|
|
find include src -name '*.h' -o -name '*.cc' | \
|
|
xargs clang-format-21 -i -style=file -fallback-style=none
|
|
git diff --exit-code
|
|
|
|
cmake-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
|
|
- name: Install cmake-format
|
|
run: pip install --require-hashes -r support/cmake-format-requirements.txt
|
|
|
|
- name: Run cmake-format
|
|
run: |
|
|
find . -name CMakeLists.txt -o -name '*.cmake' | \
|
|
xargs cmake-format -i
|
|
git diff --exit-code
|