mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Split formatting workflow into separate language-specific workflows
- Add individual workflows for C++, C#, Dart, Haxe, Java, and TypeScript - Each workflow runs independently for faster testing and debugging - Rename original workflow to indicate it's the combined version 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
66a9860c94
commit
bc9732f0a1
22
.github/workflows/format-check-cpp.yml
vendored
Normal file
22
.github/workflows/format-check-cpp.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Check C++ Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-cpp:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup clang-format
|
||||||
|
run: ./formatters/setup-clang-format-docker.sh
|
||||||
|
|
||||||
|
- name: Format C++
|
||||||
|
run: ./formatters/format-cpp.sh
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
git ls-files -m
|
||||||
|
if [[ `git ls-files -m` ]]; then echo "Detected C++ formatting errors!" & exit 1; fi
|
||||||
24
.github/workflows/format-check-csharp.yml
vendored
Normal file
24
.github/workflows/format-check-csharp.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Check C# Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-csharp:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install dotnet
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: "8.0.x"
|
||||||
|
|
||||||
|
- name: Format C#
|
||||||
|
run: ./formatters/format-csharp.sh
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
git ls-files -m
|
||||||
|
if [[ `git ls-files -m` ]]; then echo "Detected C# formatting errors!" & exit 1; fi
|
||||||
28
.github/workflows/format-check-dart.yml
vendored
Normal file
28
.github/workflows/format-check-dart.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Check Dart Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-dart:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Dart
|
||||||
|
uses: dart-lang/setup-dart@v1
|
||||||
|
with:
|
||||||
|
sdk: '3.8.1'
|
||||||
|
|
||||||
|
- name: Check dart format version
|
||||||
|
run: |
|
||||||
|
dart format --version
|
||||||
|
|
||||||
|
- name: Format Dart
|
||||||
|
run: ./formatters/format-dart.sh
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
git ls-files -m
|
||||||
|
if [[ `git ls-files -m` ]]; then echo "Detected Dart formatting errors!" & exit 1; fi
|
||||||
25
.github/workflows/format-check-haxe.yml
vendored
Normal file
25
.github/workflows/format-check-haxe.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Check Haxe Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-haxe:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Haxe
|
||||||
|
uses: krdlab/setup-haxe@v1
|
||||||
|
with:
|
||||||
|
haxe-version: '4.3.2'
|
||||||
|
- run: haxelib install formatter
|
||||||
|
|
||||||
|
- name: Format Haxe
|
||||||
|
run: ./formatters/format-haxe.sh
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
git ls-files -m
|
||||||
|
if [[ `git ls-files -m` ]]; then echo "Detected Haxe formatting errors!" & exit 1; fi
|
||||||
25
.github/workflows/format-check-java.yml
vendored
Normal file
25
.github/workflows/format-check-java.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Check Java Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-java:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install JDK
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'zulu'
|
||||||
|
java-version: "16"
|
||||||
|
|
||||||
|
- name: Format Java
|
||||||
|
run: ./formatters/format-java.sh
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
git ls-files -m
|
||||||
|
if [[ `git ls-files -m` ]]; then echo "Detected Java formatting errors!" & exit 1; fi
|
||||||
24
.github/workflows/format-check-typescript.yml
vendored
Normal file
24
.github/workflows/format-check-typescript.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Check TypeScript Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-typescript:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Node and dependencies
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "24"
|
||||||
|
|
||||||
|
- name: Format TypeScript
|
||||||
|
run: ./formatters/format-ts.sh
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
git ls-files -m
|
||||||
|
if [[ `git ls-files -m` ]]; then echo "Detected TypeScript formatting errors!" & exit 1; fi
|
||||||
2
.github/workflows/format-check.yml
vendored
2
.github/workflows/format-check.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Check Formatting
|
name: Check All Formatting (Combined)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|||||||
90
.github/workflows/format-debug.yml
vendored
90
.github/workflows/format-debug.yml
vendored
@ -1,90 +0,0 @@
|
|||||||
name: Debug Formatting Issues
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
debug:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup clang-format
|
|
||||||
run: ./formatters/setup-clang-format-docker.sh
|
|
||||||
|
|
||||||
- name: Install dotnet
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: "8.0.x"
|
|
||||||
|
|
||||||
- name: Install Node and dependencies
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "24"
|
|
||||||
|
|
||||||
- name: Install JDK
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: "16"
|
|
||||||
|
|
||||||
- name: Install Haxe
|
|
||||||
uses: krdlab/setup-haxe@v1
|
|
||||||
with:
|
|
||||||
haxe-version: '4.3.2'
|
|
||||||
- run: haxelib install formatter
|
|
||||||
|
|
||||||
- name: Install Dart
|
|
||||||
uses: dart-lang/setup-dart@v1
|
|
||||||
with:
|
|
||||||
sdk: '3.8.1'
|
|
||||||
|
|
||||||
- name: Show environment info
|
|
||||||
run: |
|
|
||||||
echo "=== Dart Version ==="
|
|
||||||
dart --version
|
|
||||||
echo "=== Dart Format Version ==="
|
|
||||||
dart format --version
|
|
||||||
echo "=== Git Status Before ==="
|
|
||||||
git status --porcelain
|
|
||||||
echo "=== OS Info ==="
|
|
||||||
uname -a
|
|
||||||
lsb_release -a
|
|
||||||
|
|
||||||
- name: Show specific Flutter files before formatting
|
|
||||||
run: |
|
|
||||||
echo "=== Sample Flutter files before formatting ==="
|
|
||||||
head -10 spine-flutter/lib/extensions.dart || echo "File not found"
|
|
||||||
head -10 spine-flutter/lib/spine_dart.dart || echo "File not found"
|
|
||||||
|
|
||||||
- name: Run Dart formatter only
|
|
||||||
run: |
|
|
||||||
echo "=== Running Dart formatter ==="
|
|
||||||
./formatters/format-dart.sh
|
|
||||||
echo "=== Git status after Dart formatting ==="
|
|
||||||
git status --porcelain
|
|
||||||
echo "=== Modified files ==="
|
|
||||||
git ls-files -m
|
|
||||||
|
|
||||||
- name: Show diff for first few files
|
|
||||||
run: |
|
|
||||||
echo "=== Showing diffs for first 3 modified files ==="
|
|
||||||
for file in $(git ls-files -m | head -3); do
|
|
||||||
echo "--- Diff for $file ---"
|
|
||||||
git diff "$file" | head -50
|
|
||||||
echo ""
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Archive all diffs
|
|
||||||
run: |
|
|
||||||
git diff > all-format-diffs.txt
|
|
||||||
git status --porcelain > git-status.txt
|
|
||||||
|
|
||||||
- name: Upload debug artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: format-debug-artifacts
|
|
||||||
path: |
|
|
||||||
all-format-diffs.txt
|
|
||||||
git-status.txt
|
|
||||||
Loading…
x
Reference in New Issue
Block a user