mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Clean-up old format check workflow
This commit is contained in:
parent
205cae2373
commit
5ae8019e09
67
.github/workflows/format-check-new.yml
vendored
67
.github/workflows/format-check-new.yml
vendored
@ -1,67 +0,0 @@
|
|||||||
name: Formatting
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
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: Check dart format version
|
|
||||||
run: |
|
|
||||||
dart format --version
|
|
||||||
|
|
||||||
- name: Format
|
|
||||||
run: |
|
|
||||||
./formatters/format-cpp.sh
|
|
||||||
./formatters/format-csharp.sh
|
|
||||||
./formatters/format-dart.sh
|
|
||||||
./formatters/format-haxe.sh
|
|
||||||
./formatters/format-java.sh
|
|
||||||
./formatters/format-ts.sh
|
|
||||||
git diff > format-diff.txt
|
|
||||||
|
|
||||||
- name: Archive formatting result
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: format-diff
|
|
||||||
path: format-diff.txt
|
|
||||||
|
|
||||||
- name: Fail on format changes
|
|
||||||
run: |
|
|
||||||
git ls-files -m
|
|
||||||
if [[ `git ls-files -m` ]]; then echo "Detected formatting errors!" & exit 1; fi
|
|
||||||
63
.github/workflows/format-check.yml
vendored
63
.github/workflows/format-check.yml
vendored
@ -1,48 +1,28 @@
|
|||||||
name: Check format
|
name: Check Formatting
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Install OS dependencies (needed for act on ubuntu-latest)
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y --force-yes curl xz-utils libicu-dev git dos2unix
|
|
||||||
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
|
||||||
sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Cache Clang
|
- name: Setup clang-format
|
||||||
id: cache-clang
|
run: ./formatters/setup-clang-format-docker.sh
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: clang
|
|
||||||
key: ${{ runner.os }}-clang-13-0-1
|
|
||||||
|
|
||||||
- name: Install Clang
|
|
||||||
if: steps.cache-clang.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
|
||||||
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04.tar.xz --output clang.tar.xz
|
|
||||||
tar -xf clang.tar.xz
|
|
||||||
mv clang+llvm-13.0.1-x86_64-linux-gnu-ubuntu-18.04 clang
|
|
||||||
|
|
||||||
- name: Install dotnet
|
- name: Install dotnet
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: "6.0.x"
|
dotnet-version: "8.0.x"
|
||||||
- run: dotnet tool install -g dotnet-format
|
|
||||||
|
|
||||||
- name: Install Node and dependenceis
|
- name: Install Node and dependencies
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "16"
|
node-version: "24"
|
||||||
- run: npm install -g typescript typescript-formatter
|
|
||||||
|
|
||||||
- name: Install JDK
|
- name: Install JDK
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
@ -50,14 +30,29 @@ jobs:
|
|||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: "16"
|
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: Check dart format version
|
||||||
|
run: |
|
||||||
|
dart format --version
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
run: |
|
run: |
|
||||||
export CLANGFORMAT=`pwd`/clang/bin/clang-format
|
./formatters/format-cpp.sh
|
||||||
export PATH="$PATH:/root/.dotnet/tools"
|
./formatters/format-csharp.sh
|
||||||
dotnet-format --version
|
./formatters/format-dart.sh
|
||||||
./formatters/format.sh
|
./formatters/format-haxe.sh
|
||||||
find . -type f -name '*.cs' -exec perl -pi -e 's/\r\n/\n/g' '{}' +
|
./formatters/format-java.sh
|
||||||
git diff
|
./formatters/format-ts.sh
|
||||||
git diff > format-diff.txt
|
git diff > format-diff.txt
|
||||||
|
|
||||||
- name: Archive formatting result
|
- name: Archive formatting result
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user