Update release.yml

This commit is contained in:
Alexey 2026-03-22 11:04:09 +03:00 committed by GitHub
parent 9de8b2f0bf
commit bbc69f945e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 19 deletions

View File

@ -130,14 +130,12 @@ jobs:
pkg-config \ pkg-config \
curl curl
# 💾 cache toolchain
- uses: actions/cache@v4 - uses: actions/cache@v4
if: matrix.target == 'aarch64-unknown-linux-musl' if: matrix.target == 'aarch64-unknown-linux-musl'
with: with:
path: ~/.musl-aarch64 path: ~/.musl-aarch64
key: musl-toolchain-aarch64-v1 key: musl-toolchain-aarch64-v1
# 🔥 надёжная установка
- name: Install aarch64 musl toolchain - name: Install aarch64 musl toolchain
if: matrix.target == 'aarch64-unknown-linux-musl' if: matrix.target == 'aarch64-unknown-linux-musl'
run: | run: |
@ -145,27 +143,19 @@ jobs:
TOOLCHAIN_DIR="$HOME/.musl-aarch64" TOOLCHAIN_DIR="$HOME/.musl-aarch64"
ARCHIVE="aarch64-linux-musl-cross.tgz" ARCHIVE="aarch64-linux-musl-cross.tgz"
URL="https://github.com/telemt/telemt/releases/download/toolchains/$ARCHIVE"
if [ -x "$TOOLCHAIN_DIR/bin/aarch64-linux-musl-gcc" ]; then if [ -x "$TOOLCHAIN_DIR/bin/aarch64-linux-musl-gcc" ]; then
echo "✅ musl toolchain already installed" echo "✅ MUSL toolchain already installed"
else else
echo "⬇️ downloading musl toolchain..." echo "⬇️ Downloading musl toolchain from Telemt GitHub Releases..."
download() { curl -fL \
url="$1" --retry 5 \
echo "→ trying $url" --retry-delay 3 \
curl -fL \ --connect-timeout 10 \
--retry 5 \ --max-time 120 \
--retry-delay 3 \ -o "$ARCHIVE" "$URL"
--connect-timeout 10 \
--max-time 120 \
-o "$ARCHIVE" "$url" && return 0
return 1
}
download "https://musl.cc/$ARCHIVE" || \
download "https://more.musl.cc/$ARCHIVE" || \
{ echo "❌ failed to download musl toolchain"; exit 1; }
mkdir -p "$TOOLCHAIN_DIR" mkdir -p "$TOOLCHAIN_DIR"
tar -xzf "$ARCHIVE" --strip-components=1 -C "$TOOLCHAIN_DIR" tar -xzf "$ARCHIVE" --strip-components=1 -C "$TOOLCHAIN_DIR"