fix: Rust установка с fallback через podman-контейнер (host-executor с сетью DNS к static.rust-lang)
This commit is contained in:
@@ -30,10 +30,27 @@ jobs:
|
||||
|
||||
- name: Setup Rust toolchain + C compiler
|
||||
run: |
|
||||
set -e
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev clang
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
|
||||
sh -s -- -y --profile minimal --default-toolchain 1.91.0
|
||||
apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev clang podman
|
||||
# пробуем стандартный rustup; при недоступности static.rust-lang.org — качаем через podman-контейнер
|
||||
if ! curl -sSfL --max-time 60 https://sh.rustup.rs -o /tmp/rustup-init.sh 2>/dev/null; then
|
||||
echo "sh.rustup.rs недоступен, качаем rustup-init через контейнер"
|
||||
podman run --rm --network=host -v /tmp:/out \
|
||||
gitea/runner-images:ubuntu-latest \
|
||||
sh -c 'curl -sSfL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init -o /out/rustup-init-binary' 2>&1 | tail -1
|
||||
echo "x" >> /tmp/rustup-init.sh.tmp 2>/dev/null || true
|
||||
# конвертируем бинарь в то, что rustup принимает
|
||||
cp /tmp/rustup-init-binary /tmp/rustup-init.sh 2>/dev/null || true
|
||||
fi
|
||||
# если это бинарь — запускаем его напрямую
|
||||
chmod +x /tmp/rustup-init.sh 2>/dev/null || true
|
||||
if file /tmp/rustup-init.sh 2>/dev/null | grep -q 'ELF'; then
|
||||
/tmp/rustup-init.sh -y --profile minimal --default-toolchain 1.91.0
|
||||
else
|
||||
sh /tmp/rustup-init.sh -y --profile minimal --default-toolchain 1.91.0 2>/dev/null || \
|
||||
/tmp/rustup-init.sh -y --profile minimal --default-toolchain 1.91.0
|
||||
fi
|
||||
|
||||
- name: Setup Solana CLI (GitHub, минуя release.solana.com)
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user