Skip to content

Commit 8d8466a

Browse files
committed
ci: slim test-only setup, use balanced sharding, and shard integration jobs
- Add `TEST_ONLY=1` mode to `.github/scripts/setup.sh` so test-only jobs unpacking prebuilt artifacts skip heavy build/lint toolchains while keeping all runtime libraries and test tools; remove the unused `microsoft-prod` apt repo (which transiently 403s) and enable apt retries. - Skip redundant `git submodule sync && git submodule update` in the 6 pytest-only jobs (40 runners total) that never run `make` or touch `external/` C submodules, eliminating ~200 simultaneous GitHub clones that can trigger GitHub 403 rate limiting. - Switch `first-integration` (6), `integration-valgrind` (16), and `integration-sanitizers` (6) to `--balanced-group=G/N`. - Shard `full-integration` postgres (3) and liquid (3) plus `min-btc-support` (2). - Start `integration-valgrind` and `min-btc-support` directly after `compile`.
1 parent f877184 commit 8d8466a

2 files changed

Lines changed: 148 additions & 76 deletions

File tree

‎.github/scripts/setup.sh‎

Lines changed: 79 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,75 +7,99 @@ sudo mkdir -p /var/cache/apt/archives
77
mkdir -p ~/ci-cache/apt/
88
sudo cp -a ~/ci-cache/apt/. /var/cache/apt/archives/ 2>/dev/null || true
99

10-
sudo apt-get update
10+
# GitHub ubuntu-24.04 runners pre-configure packages.microsoft.com, which we
11+
# do not use and which transiently returns 403 Forbidden on apt-get update.
12+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/microsoft-prod.sources
13+
14+
sudo apt-get -o Acquire::Retries=3 update
1115

1216
# Install eatmydata, then use it for the rest.
1317
sudo apt-get install --no-install-recommends --allow-unauthenticated -yy \
18+
-o Acquire::Retries=3 \
1419
-o APT::Keep-Downloaded-Packages=true \
1520
eatmydata
1621

22+
# Runtime packages needed to execute prebuilt binaries and integration tests.
23+
TEST_PKGS=(
24+
git
25+
jq
26+
libpq-dev
27+
libsodium-dev
28+
libsqlite3-dev
29+
libssl-dev
30+
lowdown
31+
make
32+
net-tools
33+
postgresql
34+
python3
35+
python3-dev
36+
sudo
37+
tshark
38+
unzip
39+
valgrind
40+
wget
41+
wireshark-common
42+
zlib1g-dev
43+
)
44+
45+
# Extra toolchain/lint packages only needed by build, lint, and fuzz jobs.
46+
BUILD_PKGS=(
47+
autoconf
48+
automake
49+
binfmt-support
50+
build-essential
51+
clang
52+
cppcheck
53+
docbook-xml
54+
gcc-aarch64-linux-gnu
55+
gcc-arm-linux-gnueabihf
56+
gcc-arm-none-eabi
57+
gettext
58+
gnupg
59+
libc6-dev-arm64-cross
60+
libc6-dev-armhf-cross
61+
libev-dev
62+
libevent-dev
63+
libffi-dev
64+
libicu-dev
65+
libprotobuf-c-dev
66+
pkg-config
67+
libtool
68+
libxml2-utils
69+
locales
70+
python3-pip
71+
python3-setuptools
72+
qemu-system
73+
qemu-system-arm
74+
qemu-user-static
75+
shellcheck
76+
software-properties-common
77+
tcl
78+
tclsh
79+
xsltproc
80+
systemtap-sdt-dev
81+
)
82+
83+
if [ "${TEST_ONLY:-0}" = "1" ]; then
84+
PKGS=("${TEST_PKGS[@]}")
85+
else
86+
PKGS=("${TEST_PKGS[@]}" "${BUILD_PKGS[@]}")
87+
fi
88+
1789
sudo eatmydata apt-get install --no-install-recommends --allow-unauthenticated -yy \
90+
-o Acquire::Retries=3 \
1891
-o APT::Keep-Downloaded-Packages=true \
19-
autoconf \
20-
automake \
21-
binfmt-support \
22-
build-essential \
23-
clang \
24-
cppcheck \
25-
docbook-xml \
26-
gcc-aarch64-linux-gnu \
27-
gcc-arm-linux-gnueabihf \
28-
gcc-arm-none-eabi \
29-
gettext \
30-
git \
31-
gnupg \
32-
jq \
33-
libc6-dev-arm64-cross \
34-
libc6-dev-armhf-cross \
35-
libev-dev \
36-
libevent-dev \
37-
libffi-dev \
38-
libicu-dev \
39-
libpq-dev \
40-
libprotobuf-c-dev \
41-
libsodium-dev \
42-
libsqlite3-dev \
43-
libssl-dev \
44-
pkg-config \
45-
libtool \
46-
libxml2-utils \
47-
locales \
48-
lowdown \
49-
net-tools \
50-
postgresql \
51-
python3 \
52-
python3-dev \
53-
python3-pip \
54-
python3-setuptools \
55-
qemu-system \
56-
qemu-system-arm \
57-
qemu-user-static \
58-
shellcheck \
59-
software-properties-common \
60-
sudo \
61-
tcl \
62-
tclsh \
63-
tshark \
64-
unzip \
65-
valgrind \
66-
wget \
67-
wireshark-common \
68-
xsltproc \
69-
systemtap-sdt-dev \
70-
zlib1g-dev
92+
"${PKGS[@]}"
7193

7294
echo "tester ALL=(root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/tester
7395
sudo chmod 0440 /etc/sudoers.d/tester
7496

7597
"$(dirname "$0")"/install-bitcoind.sh ~/ci-cache/
7698

77-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
78-
-y --default-toolchain ${RUST_VERSION}
99+
if [ "${TEST_ONLY:-0}" != "1" ]; then
100+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
101+
-y --default-toolchain ${RUST_VERSION}
102+
fi
79103

80104
uv sync --all-extras --all-groups
81105
# required for reckless till poetry to uv migration

0 commit comments

Comments
 (0)