mirror of https://github.com/telemt/telemt.git
Merge branch 'main' into flow
This commit is contained in:
commit
31c66cd31c
|
|
@ -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() {
|
|
||||||
url="$1"
|
|
||||||
echo "→ trying $url"
|
|
||||||
curl -fL \
|
curl -fL \
|
||||||
--retry 5 \
|
--retry 5 \
|
||||||
--retry-delay 3 \
|
--retry-delay 3 \
|
||||||
--connect-timeout 10 \
|
--connect-timeout 10 \
|
||||||
--max-time 120 \
|
--max-time 120 \
|
||||||
-o "$ARCHIVE" "$url" && return 0
|
-o "$ARCHIVE" "$URL"
|
||||||
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"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue