This commit is contained in:
Nick Gerleman
2022-10-14 08:06:45 -07:00
parent a6016c9567
commit bb6e6cbf56
4 changed files with 8 additions and 16 deletions

View File

@@ -3,15 +3,19 @@ inputs:
directory:
description: Directory to Lint
required: true
version:
description: LLVM version to use # Should be kept roughly in sync with arcanist
required: false
default: 12
runs:
using: "composite"
steps:
- name: Install
shell: bash
run: sudo apt install clang-format-12 # This should be roughly in sync with Arcanist
run: sudo apt install clang-format-${{ inputs.version }}
- name: clang-format
working-directory: ${{ inputs.directory }}
shell: bash
run: clang-format-12 **/*.h **/*.cpp **/*.m **/*.mm
run: clang-format-${{ inputs.version }} --Werror **/*.h **/*.cpp # Yoga's config doesn't support ObjC

View File

@@ -18,7 +18,7 @@ jobs:
run: ./gradlew assemble${{ matrix.mode }}
format:
name: Build (${{ matrix.mode }})
name: Format
runs-on: ubuntu-latest
steps:

View File

@@ -27,15 +27,3 @@ jobs:
- name: pod install
working-directory: ./YogaKit/YogaKitSample
run: pod install
clang-format:
name: Clang Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: clang-format
uses: ./.github/actions/clang-format
with:
directory: ./YogaKit

View File

@@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]
jobs:
clang-format:
name: Clang Format
name: Format
runs-on: ubuntu-latest
steps: