Skip to content

Commit 5e3b7c6

Browse files
authored
Merge branch 'master' into test-current-feerate-assertion
2 parents 26b876a + bbd1dfb commit 5e3b7c6

311 files changed

Lines changed: 12637 additions & 6917 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/install-bitcoind.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/sh
2+
# If an argument is specified, that dir is checked before downloading,
3+
# and updated after successful install.
24

35
set -e
46

@@ -18,13 +20,23 @@ cd /tmp/
1820
# testing against `bitcoind` but still believe that we ran against
1921
# `elementsd`.
2022
if [ "$TEST_NETWORK" = "liquid-regtest" ]; then
21-
wget "https://github.com/ElementsProject/elements/releases/download/elements-${ELEMENTS_VERSION}/${EFILENAME}"
23+
if [ -f "$1/${EFILENAME}" ]; then
24+
cp "$1/${EFILENAME}" .
25+
else
26+
wget "https://github.com/ElementsProject/elements/releases/download/elements-${ELEMENTS_VERSION}/${EFILENAME}"
27+
fi
2228
tar -xf "${EFILENAME}"
29+
[ "$1" = "" ] || cp "${EFILENAME}" "$1"/
2330
sudo mv "${EDIRNAME}"/bin/* "/usr/local/bin"
2431
rm -rf "${EFILENAME}" "${EDIRNAME}"
2532
else
26-
wget "https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${FILENAME}"
33+
if [ -f "$1/${FILENAME}" ]; then
34+
cp "$1/${FILENAME}" .
35+
else
36+
wget "https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${FILENAME}"
37+
fi
2738
tar -xf "${FILENAME}"
39+
[ "$1" = "" ] || cp "${FILENAME}" "$1"/
2840
sudo mv "${DIRNAME}"/bin/* "/usr/local/bin"
2941
rm -rf "${FILENAME}" "${DIRNAME}"
3042
fi

.github/scripts/setup.sh

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,26 @@ set -e
33
export DEBIAN_FRONTEND=noninteractive
44
export RUST_VERSION=stable
55

6-
sudo useradd -ms /bin/bash tester
7-
sudo apt-get update -qq
6+
sudo mkdir -p /var/cache/apt/archives
7+
mkdir -p ~/ci-cache/apt/
8+
sudo cp -a ~/ci-cache/apt/. /var/cache/apt/archives/ 2>/dev/null || true
89

9-
sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
10+
sudo apt-get update
11+
12+
# Install eatmydata, then use it for the rest.
13+
sudo apt-get install --no-install-recommends --allow-unauthenticated -yy \
14+
-o APT::Keep-Downloaded-Packages=true \
15+
eatmydata
16+
17+
sudo eatmydata apt-get install --no-install-recommends --allow-unauthenticated -yy \
18+
-o APT::Keep-Downloaded-Packages=true \
1019
autoconf \
1120
automake \
1221
binfmt-support \
1322
build-essential \
1423
clang \
1524
cppcheck \
1625
docbook-xml \
17-
eatmydata \
1826
gcc-aarch64-linux-gnu \
1927
gcc-arm-linux-gnueabihf \
2028
gcc-arm-none-eabi \
@@ -52,17 +60,19 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
5260
sudo \
5361
tcl \
5462
tclsh \
63+
tshark \
5564
unzip \
5665
valgrind \
5766
wget \
67+
wireshark-common \
5868
xsltproc \
5969
systemtap-sdt-dev \
6070
zlib1g-dev
6171

6272
echo "tester ALL=(root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/tester
6373
sudo chmod 0440 /etc/sudoers.d/tester
6474

65-
"$(dirname "$0")"/install-bitcoind.sh
75+
"$(dirname "$0")"/install-bitcoind.sh ~/ci-cache/
6676

6777
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
6878
-y --default-toolchain ${RUST_VERSION}
@@ -90,10 +100,29 @@ uv tool install poetry
90100

91101
PROTOC_VERSION=29.4
92102
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
93-
curl -LO $PB_REL/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
94-
sudo unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local/
103+
PROTOC_ZIP=protoc-${PROTOC_VERSION}-linux-x86_64.zip
104+
if [ ! -f ~/ci-cache/$PROTOC_ZIP ]; then
105+
curl -LO $PB_REL/download/v${PROTOC_VERSION}/$PROTOC_ZIP
106+
# Check it before we commit it to the cache!
107+
unzip -t $PROTOC_ZIP
108+
cp $PROTOC_ZIP ~/ci-cache/
109+
fi
110+
sudo unzip ~/ci-cache/$PROTOC_ZIP -d /usr/local/
95111
sudo chmod a+x /usr/local/bin/protoc
96112
export PROTOC=/usr/local/bin/protoc
97113
export PATH=$PATH:/usr/local/bin
98114
env
99115
ls -lha /usr/local/bin
116+
117+
# wireshark-common normally does this, but GH runners are special, so we
118+
# do it explicitly
119+
sudo groupadd -f wireshark
120+
sudo chgrp wireshark /usr/bin/dumpcap
121+
sudo chmod 750 /usr/bin/dumpcap
122+
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
123+
124+
# Add ourselves to the wireshark group (still need "sg wireshark..." for it to take effect)
125+
sudo usermod -aG wireshark "$(id -nu)"
126+
127+
# Copy archives back for caching
128+
cp /var/cache/apt/archives/*.deb ~/ci-cache/apt/ || true

0 commit comments

Comments
 (0)