.
This commit is contained in:
8
.github/actions/clang-format/action.yml
vendored
8
.github/actions/clang-format/action.yml
vendored
@@ -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
|
||||
|
2
.github/workflows/valiadate-android.yml
vendored
2
.github/workflows/valiadate-android.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
run: ./gradlew assemble${{ matrix.mode }}
|
||||
|
||||
format:
|
||||
name: Build (${{ matrix.mode }})
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
12
.github/workflows/valiadate-apple.yml
vendored
12
.github/workflows/valiadate-apple.yml
vendored
@@ -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
|
||||
|
2
.github/workflows/valiadate-cpp.yml
vendored
2
.github/workflows/valiadate-cpp.yml
vendored
@@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
name: Clang Format
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
Reference in New Issue
Block a user