Skip to content

Commit f5ebd52

Browse files
Choose the right bitcoin version according to the architecture.
1 parent 27dd3ad commit f5ebd52

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

scripts/workflows/provision-linux.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@ sudo apt-get install --yes bats parallel moreutils
1313
# Modifications needed for some tests
1414
if [ "$E2E_TEST" = "tests-dfx/bitcoin.bash" ]; then
1515
BITCOIN_CORE_VERSION=22.0
16-
BITCOIN_CORE_FILENAME="bitcoin-$BITCOIN_CORE_VERSION-x86_64-linux-gnu.tar.gz"
17-
BITCOIN_CORE_TARBALL_SHA="59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16"
16+
17+
# Check architecture and set filename and sha
18+
ARCH=$(uname -m)
19+
if [ "$ARCH" = "x86_64" ]; then
20+
BITCOIN_CORE_FILENAME="bitcoin-$BITCOIN_CORE_VERSION-x86_64-linux-gnu.tar.gz"
21+
BITCOIN_CORE_TARBALL_SHA="59ebd25dd82a51638b7a6bb914586201e67db67b919b2a1ff08925a7936d1b16"
22+
elif [ "$ARCH" = "aarch64" ]; then
23+
BITCOIN_CORE_FILENAME="bitcoin-$BITCOIN_CORE_VERSION-aarch64-linux-gnu.tar.gz"
24+
BITCOIN_CORE_TARBALL_SHA="ac718fed08570a81b3587587872ad85a25173afa5f9fbbd0c03ba4d1714cfa3e"
25+
else
26+
echo "Unsupported architecture: $ARCH"
27+
exit 1
28+
fi
29+
1830
(
1931
cd "$(mktemp -d)"
2032
wget "https://bitcoin.org/bin/bitcoin-core-$BITCOIN_CORE_VERSION/$BITCOIN_CORE_FILENAME"

0 commit comments

Comments
 (0)