mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
20
.github/actions/clang_format/action.yml
vendored
20
.github/actions/clang_format/action.yml
vendored
@@ -1,11 +1,23 @@
|
||||
name: Check format
|
||||
description: Check format using clang-format-11
|
||||
description: Check format using clang-format-16
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
# Github's ubuntu-20.04 image already has clang-format-11 installed
|
||||
- run: |
|
||||
find src unittests -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-11 -i
|
||||
- name: Add llvm repo
|
||||
run: |
|
||||
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' | sudo tee -a /etc/apt/sources.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
shell: bash
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt update -qq
|
||||
sudo apt install -y jq clang-format-16
|
||||
shell: bash
|
||||
|
||||
- name: Run formatter
|
||||
run: |
|
||||
find src unittests -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -print0 | xargs -0 clang-format-16 -i
|
||||
shell: bash
|
||||
|
||||
- name: Check for differences
|
||||
|
||||
Reference in New Issue
Block a user