Skip to content

Commit

Permalink
CI: set elements and bitcoind versions in one place.
Browse files Browse the repository at this point in the history
We have them spread everywhere: unify them, and make setup.sh use install-bitcoind.sh

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Jun 25, 2024
1 parent cb4dd74 commit c305027
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .github/scripts/install-bitcoind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -e

export BITCOIN_VERSION=27.1
export ELEMENTS_VERSION=23.2.1

DIRNAME="bitcoin-${BITCOIN_VERSION}"
EDIRNAME="elements-${ELEMENTS_VERSION}"
FILENAME="${DIRNAME}-x86_64-linux-gnu.tar.gz"
Expand Down
17 changes: 1 addition & 16 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
export BITCOIN_VERSION=27.1
export ELEMENTS_VERSION=22.0.2
export RUST_VERSION=stable

sudo useradd -ms /bin/bash tester
Expand Down Expand Up @@ -53,20 +51,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
echo "tester ALL=(root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/tester
sudo chmod 0440 /etc/sudoers.d/tester

(
cd /tmp/ || exit 1
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
wget https://github.com/ElementsProject/elements/releases/download/elements-${ELEMENTS_VERSION}/elements-${ELEMENTS_VERSION}-x86_64-linux-gnu.tar.gz
tar -xf bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz
tar -xf elements-${ELEMENTS_VERSION}-x86_64-linux-gnu.tar.gz
sudo mv bitcoin-${BITCOIN_VERSION}/bin/* /usr/local/bin
sudo mv elements-${ELEMENTS_VERSION}/bin/* /usr/local/bin
rm -rf \
bitcoin-${BITCOIN_VERSION}-x86_64-linux-gnu.tar.gz \
bitcoin-${BITCOIN_VERSION} \
elements-${ELEMENTS_VERSION}-x86_64-linux-gnu.tar.gz \
elements-${ELEMENTS_VERSION}
)
"$(dirname "$0")"/install-bitcoind.sh

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-y --default-toolchain ${RUST_VERSION}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 120
env:
BITCOIN_VERSION: "27.1"
ELEMENTS_VERSION: 23.2.1
RUST_PROFILE: release # Has to match the one in the compile step
PYTEST_OPTS: --timeout=1200 --force-flaky
needs:
Expand Down Expand Up @@ -319,8 +317,6 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 120
env:
BITCOIN_VERSION: "27.1"
ELEMENTS_VERSION: 23.2.1
RUST_PROFILE: release # Has to match the one in the compile step
CFG: compile-gcc
PYTEST_OPTS: --test-group-random-seed=42 --timeout=1800 --force-flaky
Expand Down Expand Up @@ -389,8 +385,6 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 120
env:
BITCOIN_VERSION: "27.1"
ELEMENTS_VERSION: 23.2.1
RUST_PROFILE: release
SLOW_MACHINE: 1
TEST_DEBUG: 1
Expand Down

0 comments on commit c305027

Please sign in to comment.