@@ -12,85 +12,7 @@ default: (run-authorize-and-store "ws" "bulletin-westend-runtime")
1212# Setup prerequisites for Westend runtime (polkadot and polkadot-parachain binaries)
1313# This recipe clones polkadot-sdk, builds required binaries, and copies them to ~/local_bulletin_testing/bin
1414setup-westend-prerequisites :
15- #!/usr/bin/env bash
16- set -e
17-
18- BIN_DIR=~ / local_bulletin_testing/ bin
19- POLKADOT_SDK_DIR=~ / local_bulletin_testing/ polkadot-sdk
20-
21- # Common setup issue on macOS is that libclang.dylib is not found.
22- if [[ " $OSTYPE" == " darwin" * ]]; then
23- export DYLD_FALLBACK_LIBRARY_PATH=" $(brew --prefix llvm)/lib"
24- fi
25-
26- echo " 🔧 Setting up Westend runtime prerequisites..."
27- echo " Target directory: $BIN_DIR"
28-
29- # Create bin directory
30- mkdir -p $BIN_DIR
31-
32- # Clone polkadot-sdk if it doesn't exist
33- if [ ! -d " $POLKADOT_SDK_DIR" ]; then
34- echo " Cloning polkadot-sdk repository..."
35- git clone https:// github.com/ paritytech/ polkadot-sdk.git $POLKADOT_SDK_DIR
36- else
37- echo " polkadot-sdk already exists at $POLKADOT_SDK_DIR"
38- fi
39-
40- cd $POLKADOT_SDK_DIR
41-
42- # Check out latest master
43- echo " Fetching latest changes from polkadot-sdk..."
44- git fetch origin
45- echo " Checking out latest master..."
46- git reset --hard origin/ master
47-
48- # Build polkadot binary
49- echo " Building polkadot binary (this may take a while)..."
50- cargo build -p polkadot -r
51-
52- # Verify and copy polkadot binaries
53- echo " Copying polkadot binaries..."
54- ls -la target/ release/ polkadot
55- cp target/ release/ polkadot $BIN_DIR/
56- cp target/ release/ polkadot-prepare-worker $BIN_DIR/
57- cp target/ release/ polkadot-execute-worker $BIN_DIR/
58-
59- # Verify polkadot version (optional check, may fail on macOS due to security/signing)
60- echo " Verifying polkadot version..."
61- $BIN_DIR/ polkadot --version || echo " ⚠ Version check failed (this is OK, binary will still work)"
62-
63- # Build polkadot-parachain binary
64- echo " Building polkadot-parachain binary (this may take a while)..."
65- cargo build -p polkadot-parachain-bin -r
66-
67- # Verify and copy polkadot-parachain binary
68- echo " Copying polkadot-parachain binary..."
69- ls -la target/ release/ polkadot-parachain
70- cp target/ release/ polkadot-parachain $BIN_DIR/
71-
72- # Verify polkadot-parachain version (optional check, may fail on macOS due to security/signing)
73- echo " Verifying polkadot-parachain version..."
74- $BIN_DIR/ polkadot-parachain --version || echo " ⚠ Version check failed (this is OK, binary will still work)"
75-
76- # Build and install chain-spec-builder
77- echo " Building chain-spec-builder..."
78- cargo build -p staging-chain-spec-builder -r
79-
80- # Verify and copy chain-spec-builder binary
81- echo " Copying chain-spec-builder binary..."
82- ls -la target/ release/ chain-spec-builder
83- cp target/ release/ chain-spec-builder $BIN_DIR/
84-
85- # Verify chain-spec-builder (optional check, may fail on macOS due to security/signing)
86- echo " Verifying chain-spec-builder version..."
87- $BIN_DIR/ chain-spec-builder --version || echo " ⚠ Version check failed (this is OK, binary will still work)"
88-
89- # Add BIN_DIR to PATH for subsequent scripts
90- export PATH=" $BIN_DIR:$PATH"
91-
92- echo " ✅ Westend prerequisites setup complete!"
93- echo " Binaries installed in: $BIN_DIR"
15+ ../ scripts/ setup_westend_prerequisites.sh
9416
9517# Install JavaScript dependencies
9618npm-install :
0 commit comments