mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Fix libtinfo dependency for Ubuntu 24.04
This commit is contained in:
parent
484c63be70
commit
8a1893acad
12
.github/workflows/format-check-new.yml
vendored
12
.github/workflows/format-check-new.yml
vendored
@ -11,6 +11,18 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install clang-format 18.1.8
|
||||
run: |
|
||||
# Install dependencies
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtinfo5
|
||||
# Download 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
|
||||
tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
||||
# Use only clang-format from the package
|
||||
sudo cp clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format /usr/local/bin/clang-format
|
||||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/local/bin/clang-format 100
|
||||
|
||||
- name: Install dotnet
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
|
||||
32
.github/workflows/test-clang-install.yml
vendored
32
.github/workflows/test-clang-install.yml
vendored
@ -14,9 +14,13 @@ jobs:
|
||||
echo "=== System info ==="
|
||||
lsb_release -a
|
||||
echo ""
|
||||
echo "=== Available libtinfo packages ==="
|
||||
apt-cache search libtinfo | grep -E "^libtinfo[0-9]* " || true
|
||||
echo ""
|
||||
echo "=== Installing dependencies ==="
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtinfo5
|
||||
# Try libtinfo6 first (newer), fall back to libtinfo5
|
||||
sudo apt-get install -y libtinfo6 || sudo apt-get install -y libtinfo5
|
||||
echo ""
|
||||
echo "=== Downloading 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
|
||||
@ -25,7 +29,15 @@ jobs:
|
||||
tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
||||
echo ""
|
||||
echo "=== Testing clang-format ==="
|
||||
./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version
|
||||
# First check what libraries it needs
|
||||
ldd ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format || true
|
||||
echo ""
|
||||
# Try to run it
|
||||
./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version || {
|
||||
echo "Failed to run, trying with symlink..."
|
||||
sudo ln -sf /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5
|
||||
./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version
|
||||
}
|
||||
echo ""
|
||||
echo "=== Testing formatting ==="
|
||||
echo 'class Test { Test() {}; };' | ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format
|
||||
@ -38,9 +50,13 @@ jobs:
|
||||
echo "=== System info ==="
|
||||
lsb_release -a
|
||||
echo ""
|
||||
echo "=== Available libtinfo packages ==="
|
||||
apt-cache search libtinfo | grep -E "^libtinfo[0-9]* " || true
|
||||
echo ""
|
||||
echo "=== Installing dependencies ==="
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtinfo5
|
||||
# Try libtinfo6 first (newer), fall back to libtinfo5
|
||||
sudo apt-get install -y libtinfo6 || sudo apt-get install -y libtinfo5
|
||||
echo ""
|
||||
echo "=== Downloading 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
|
||||
@ -49,7 +65,15 @@ jobs:
|
||||
tar -xf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
|
||||
echo ""
|
||||
echo "=== Testing clang-format ==="
|
||||
./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version
|
||||
# First check what libraries it needs
|
||||
ldd ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format || true
|
||||
echo ""
|
||||
# Try to run it
|
||||
./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version || {
|
||||
echo "Failed to run, trying with symlink..."
|
||||
sudo ln -sf /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/x86_64-linux-gnu/libtinfo.so.5
|
||||
./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format --version
|
||||
}
|
||||
echo ""
|
||||
echo "=== Testing formatting ==="
|
||||
echo 'class Test { Test() {}; };' | ./clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format
|
||||
Loading…
x
Reference in New Issue
Block a user