fix: anchor через git clone+--path (обход libgit2 github-auth) + PATH .cargo/bin в install.sh
This commit is contained in:
@@ -73,6 +73,7 @@ jobs:
|
||||
done
|
||||
echo "### предустановка SBF platform-tools (LLVM) с anza-xyz:"
|
||||
cd "$HOME/solana-local/sdk/sbf"
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
ls dependencies/platform-tools/llvm/bin/clang 2>/dev/null || bash scripts/install.sh || true
|
||||
ls dependencies/platform-tools/llvm/bin/ 2>/dev/null | grep -iE 'clang|objcopy' | head -6
|
||||
# линкуем solana toolchain (на случай если install.sh его не сделал)
|
||||
@@ -92,9 +93,19 @@ jobs:
|
||||
. "$HOME/.cargo/env"
|
||||
mkdir -p "$HOME/.cargo"
|
||||
printf '[net]\ngit-fetch-with-cli = true\n' > "$HOME/.cargo/config.toml"
|
||||
cargo install --force --git https://github.com/otter-sec/anchor.git \
|
||||
--branch anchor-next anchor-cli --locked
|
||||
# ставим сначала через git CLI (обход libgit2-проблем с github auth), иначе --git
|
||||
if ! cargo install --force --git https://github.com/otter-sec/anchor.git \
|
||||
--branch anchor-next anchor-cli --locked 2>/dev/null; then
|
||||
echo "cargo --git не сработал, собираем через git clone + --path"
|
||||
cd /tmp
|
||||
rm -rf anchor-src && git clone --depth 1 --branch anchor-next \
|
||||
https://github.com/otter-sec/anchor.git anchor-src
|
||||
cargo install --force --path /tmp/anchor-src/cli --locked \
|
||||
--root "$HOME/.cargo" --bin anchor
|
||||
fi
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
anchor --version
|
||||
|
||||
# ------ devnet: отдельно аирдроп ------
|
||||
- name: Airdrop devnet SOL (target=devnet)
|
||||
|
||||
Reference in New Issue
Block a user