From c30502779e89c75a62cda26a8414abfa79f2c1c2 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 24 Jun 2024 11:24:45 +0930 Subject: [PATCH] CI: set elements and bitcoind versions in one place. We have them spread everywhere: unify them, and make setup.sh use install-bitcoind.sh Signed-off-by: Rusty Russell --- .github/scripts/install-bitcoind.sh | 3 +++ .github/scripts/setup.sh | 17 +---------------- .github/workflows/ci.yaml | 6 ------ 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/scripts/install-bitcoind.sh b/.github/scripts/install-bitcoind.sh index 31bc8455b45c..842c6ccd92a3 100755 --- a/.github/scripts/install-bitcoind.sh +++ b/.github/scripts/install-bitcoind.sh @@ -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" diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh index 76221b70cd95..81c001ceff20 100755 --- a/.github/scripts/setup.sh +++ b/.github/scripts/setup.sh @@ -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 @@ -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} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 207eaf9b9936..13a0520558b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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 @@ -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