mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Use Docker for clang-format 18.1.8
This commit is contained in:
parent
8fb6d4c6ef
commit
98ac8553dd
20
.github/workflows/format-check-new.yml
vendored
20
.github/workflows/format-check-new.yml
vendored
@ -11,17 +11,17 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install clang-format 18.1.8
|
- name: Setup clang-format Docker alias
|
||||||
run: |
|
run: |
|
||||||
# Install dependencies
|
# Create a wrapper script for clang-format that uses Docker
|
||||||
sudo apt-get update
|
sudo tee /usr/local/bin/clang-format <<'EOF'
|
||||||
sudo apt-get install -y libtinfo5
|
#!/bin/bash
|
||||||
# Download clang-format 18.1.8
|
# Use Docker to run clang-format 18.1.8
|
||||||
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang%2Bllvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
docker run --rm -i -v "$PWD":"$PWD" -w "$PWD" silkeh/clang:18 clang-format "$@"
|
||||||
tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
EOF
|
||||||
# Use only clang-format from the package
|
sudo chmod +x /usr/local/bin/clang-format
|
||||||
sudo cp clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format /usr/local/bin/clang-format
|
# Verify version
|
||||||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/local/bin/clang-format 100
|
clang-format --version
|
||||||
|
|
||||||
- name: Install dotnet
|
- name: Install dotnet
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user