diff --git a/scripts/build-downstream-anchor-projects.sh b/scripts/build-downstream-anchor-projects.sh index cdfa0bae10addb..de2860573ee145 100755 --- a/scripts/build-downstream-anchor-projects.sh +++ b/scripts/build-downstream-anchor-projects.sh @@ -68,27 +68,25 @@ anchor() { cd "$solana_dir"/target/downstream-projects-anchor } -openbook() { - # Openbook-v2 is still using cargo 1.70.0, which is not compatible with the latest main - rm -rf openbook-v2 - git clone https://github.com/openbook-dex/openbook-v2.git - cd openbook-v2 - update_solana_dependencies . "$solana_ver" - patch_crates_io_solana Cargo.toml "$solana_dir" - $cargo_build_sbf --features enable-gpl - cd programs/openbook-v2 - $cargo_test_sbf --features enable-gpl -} - mango() { ( set -x - rm -rf mango-v4 - git clone https://github.com/blockworks-foundation/mango-v4.git - cd mango-v4 + rm -rf mango-v3 + git clone https://github.com/blockworks-foundation/mango-v3 + # copy toolchain file to use solana's rust version + cp "$solana_dir"/rust-toolchain.toml mango-v3/ + cd mango-v3 + update_solana_dependencies . "$solana_ver" - patch_crates_io_solana_no_header Cargo.toml "$solana_dir" - $cargo_test_sbf --features enable-gpl + update_anchor_dependencies . "$anchor_ver" + patch_crates_io_solana Cargo.toml "$solana_dir" + patch_crates_io_anchor Cargo.toml "$anchor_dir" + + cd program + $cargo build + $cargo test + $cargo_build_sbf + $cargo_test_sbf ) } @@ -99,21 +97,18 @@ metaplex() { git clone https://github.com/metaplex-foundation/mpl-token-metadata # copy toolchain file to use solana's rust version cp "$solana_dir"/rust-toolchain.toml mpl-token-metadata/ - cd mpl-token-metadata - ./configs/program-scripts/dump.sh ./programs/bin - ROOT_DIR=$(pwd) - cd programs/token-metadata + cd mpl-token-metadata/programs/token-metadata/program update_solana_dependencies . "$solana_ver" patch_crates_io_solana Cargo.toml "$solana_dir" - OUT_DIR="$ROOT_DIR"/programs/bin - export SBF_OUT_DIR="$OUT_DIR" - $cargo_test_sbf --sbf-out-dir "${OUT_DIR}" + $cargo build + $cargo test + $cargo_build_sbf + $cargo_test_sbf ) } _ anchor #_ metaplex #_ mango -#_ openbook diff --git a/scripts/patch-crates.sh b/scripts/patch-crates.sh index 181c1e5a2375b6..91a3010c8a0bd7 100644 --- a/scripts/patch-crates.sh +++ b/scripts/patch-crates.sh @@ -31,14 +31,6 @@ patch_crates_io_solana() { declare solana_dir="$2" cat >> "$Cargo_toml" <> "$Cargo_toml" <