fix: setup Rust+cc на раннере перед Anchor, PATH в GITHUB_PATH
This commit is contained in:
@@ -12,18 +12,25 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Rust toolchain + C compiler
|
||||||
|
run: |
|
||||||
|
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.89.0
|
||||||
|
|
||||||
- name: Setup Solana CLI
|
- name: Setup Solana CLI
|
||||||
run: |
|
run: |
|
||||||
sh -c "$(curl -sSfL https://release.solana.com/v1.18.26/install)"
|
sh -c "$(curl -sSfL https://release.solana.com/v1.18.26/install)"
|
||||||
echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
|
echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
- name: Setup Anchor CLI (anchor-next)
|
- name: Setup Anchor CLI (anchor-next)
|
||||||
run: |
|
run: |
|
||||||
export RUSTUP_HOME=/root/.rustup CARGO_HOME=/root/.cargo
|
. "$HOME/.cargo/env"
|
||||||
. "$HOME/.cargo/env" 2>/dev/null || true
|
|
||||||
command -v cargo || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.89.0
|
|
||||||
cargo install --force --git https://github.com/anchor-lang/anchor.git \
|
cargo install --force --git https://github.com/anchor-lang/anchor.git \
|
||||||
--branch anchor-next anchor-cli --locked
|
--branch anchor-next anchor-cli --locked
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
- name: Airdrop devnet SOL (to keypair address)
|
- name: Airdrop devnet SOL (to keypair address)
|
||||||
run: |
|
run: |
|
||||||
@@ -42,7 +49,5 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy to devnet
|
- name: Deploy to devnet
|
||||||
working-directory: program
|
working-directory: program
|
||||||
run: |
|
run: anchor deploy --provider.cluster devnet \
|
||||||
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
|
|
||||||
anchor deploy --provider.cluster devnet \
|
|
||||||
--provider.wallet ../deploy/dev_smart_updown-keypair.json
|
--provider.wallet ../deploy/dev_smart_updown-keypair.json
|
||||||
Reference in New Issue
Block a user