aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-22 16:52:02 +0000
committertv <tv@krebsco.de>2026-11-23 04:11:23 +0100
commit8ece1c99736209c693adf7886024e7d166d55ac0 (patch)
tree35dccb8b58af237c49e384a8bd303f1274fe4c03
parent37940e51a0113c744042390a5226bda78fc1ab0d (diff)
scripts: this tree built with most, a tag with it or what it stands for
cargo quick and cargo sim build with most; federation-check and release built this tree again with federation,mycelium, and wire-check with federation,libp2p: each a build of its own, about two of a release's four minutes, against some 12 s of judging and 20 s of wire-check. Now this tree builds with most throughout, and a tag with most where it has it, else with what most stands for (dashboard, federation, libp2p, mycelium, tor), the same in each script, so its builds are one too. CONTINUUM_FEATURES and CONTINUUM_WIRE_CHECK_FEATURES, where given, still set both.
-rwxr-xr-xscripts/federation-check19
-rwxr-xr-xscripts/release22
-rwxr-xr-xscripts/wire-check26
3 files changed, 50 insertions, 17 deletions
diff --git a/scripts/federation-check b/scripts/federation-check
index e31e002..5327c38 100755
--- a/scripts/federation-check
+++ b/scripts/federation-check
@@ -11,8 +11,9 @@
# TAG is the latest federation-<F>.<R> unless given. The histories: of each
# revision and kind, generated from CONTINUUM_TEST_SEED on (a random one, said, unless
# given), CONTINUUM_TEST_CASES times as many as `write_histories` writes; and those the
-# attack tests offer. CONTINUUM_FEATURES are the features both are built with, a
-# transport among them (federation,mycelium unless given); the tag's build is kept in
+# attack tests offer. Both are built with CONTINUUM_FEATURES (a transport among them),
+# unless given: this tree with `most`, as development builds, the tag with it too where
+# it has it, else with the features it stands for; the tag's build is kept in
# CONTINUUM_CHECK_TARGET (~/.cache/continuum/federation-check unless given) for the
# next run.
@@ -25,7 +26,17 @@ if [ -z "$tag" ]; then
echo "federation-check: no federation-<F>.<R> tag to check against" >&2
exit 2
fi
-features=${CONTINUUM_FEATURES:-federation,mycelium}
+# The features tag $1 builds with: `most` where it has that feature, else the ones `most`
+# stands for, which a tag before it has.
+features_of() {
+ if git show "$1:Cargo.toml" 2>/dev/null | grep -q "^most = "; then
+ echo most
+ else
+ echo dashboard,federation,libp2p,mycelium,tor
+ fi
+}
+features=${CONTINUUM_FEATURES:-most}
+tag_features=${CONTINUUM_FEATURES:-$(features_of "$tag")}
seed=${CONTINUUM_TEST_SEED:-$(od -An -N4 -tu4 /dev/urandom | tr -d ' ')}
cache=${XDG_CACHE_HOME:-$HOME/.cache}
target=${CONTINUUM_CHECK_TARGET:-$cache/continuum/federation-check}
@@ -48,7 +59,7 @@ cargo run -q --features "$features" --bin continuum-party -- judge \
git worktree add -q --detach "$work/tagged" "$tag"
(cd "$work/tagged" && CARGO_TARGET_DIR=$target \
- cargo run -q --features "$features" --bin continuum-party -- judge) \
+ cargo run -q --features "$tag_features" --bin continuum-party -- judge) \
<"$work/histories" >"$work/there"
# Histories whose root the tag's continuum reads as none, of a revision after it, it
diff --git a/scripts/release b/scripts/release
index b88d2a5..e10d862 100755
--- a/scripts/release
+++ b/scripts/release
@@ -23,8 +23,9 @@
#
# With --dry-run, it checks and says what it would write; it, or a check failing, leaves
# the tree as it was.
-# CONTINUUM_FEATURES are the features it builds with, a transport among them
-# (federation,mycelium unless given).
+# CONTINUUM_FEATURES are the features it builds with, a transport among them, unless
+# given: this tree with `most`, as development builds, the last release with it too
+# where it has it, else with the features it stands for.
set -eu
@@ -50,7 +51,16 @@ leading() {
}
cd "$(git rev-parse --show-toplevel)"
-features=${CONTINUUM_FEATURES:-federation,mycelium}
+# The features tag $1 builds with: `most` where it has that feature, else the ones `most`
+# stands for, which a tag before it has.
+features_of() {
+ if git show "$1:Cargo.toml" 2>/dev/null | grep -q "^most = "; then
+ echo most
+ else
+ echo dashboard,federation,libp2p,mycelium,tor
+ fi
+}
+features=${CONTINUUM_FEATURES:-most}
cache=${XDG_CACHE_HOME:-$HOME/.cache}
target=${CONTINUUM_RELEASE_TARGET:-$cache/continuum/release}
@@ -97,9 +107,9 @@ esac
# 3. How it upgrades from the last release.
speaks() {
- cargo run -q --features "$features" --bin continuum -- --version
+ cargo run -q --features "$1" --bin continuum -- --version
}
-here=$(speaks)
+here=$(speaks "$features")
field() { echo "$1" | sed -n "s/^$2 //p" | head -n 1; }
here_wire=$(field "$here" "wire versions")
here_automerge=$(field "$here" automerge)
@@ -112,7 +122,7 @@ newest_revision() {
here_revisions=$(newest_revision "$here")
if [ -n "$last" ]; then
git worktree add -q --detach "$work/last" "$last"
- there=$(cd "$work/last" && CARGO_TARGET_DIR=$target speaks)
+ there=$(cd "$work/last" && CARGO_TARGET_DIR=$target speaks "${CONTINUUM_FEATURES:-$(features_of "$last")}")
there_wire=$(field "$there" "wire versions")
there_automerge=$(field "$there" automerge)
there_federation=$(echo "$there" | sed -n 's/^federation \([0-9]*\): .*/\1/p')
diff --git a/scripts/wire-check b/scripts/wire-check
index f53dafb..c634d17 100755
--- a/scripts/wire-check
+++ b/scripts/wire-check
@@ -9,10 +9,12 @@
#
# TAG is the latest v* tag unless given. The nodes: a of the tag (the swarm's first), b
# of this tree, c of the tag, d of this tree, each seeded with the one before it.
-# CONTINUUM_WIRE_CHECK_FEATURES are the features both are built with, libp2p among them
-# (federation,libp2p unless given); the tag's build is kept in CONTINUUM_RELEASE_TARGET
-# (~/.cache/continuum/release unless given), as scripts/release keeps it. The nodes
-# listen from CONTINUUM_WIRE_CHECK_PORT on (47600 unless given), eight ports.
+# Both are built with CONTINUUM_WIRE_CHECK_FEATURES (libp2p among them), unless given:
+# this tree with `most`, the tag with it too where it has it, else with the features it
+# stands for, as scripts/release builds them; the tag's build is kept in
+# CONTINUUM_RELEASE_TARGET (~/.cache/continuum/release unless given), as scripts/release
+# keeps it. The nodes listen from CONTINUUM_WIRE_CHECK_PORT on (47600 unless given),
+# eight ports.
set -eu
@@ -23,7 +25,17 @@ if [ -z "$tag" ]; then
echo "wire-check: no v* tag to check against" >&2
exit 2
fi
-features=${CONTINUUM_WIRE_CHECK_FEATURES:-federation,libp2p}
+# The features tag $1 builds with: `most` where it has that feature, else the ones `most`
+# stands for, which a tag before it has.
+features_of() {
+ if git show "$1:Cargo.toml" 2>/dev/null | grep -q "^most = "; then
+ echo most
+ else
+ echo dashboard,federation,libp2p,mycelium,tor
+ fi
+}
+features=${CONTINUUM_WIRE_CHECK_FEATURES:-most}
+tag_features=${CONTINUUM_WIRE_CHECK_FEATURES:-$(features_of "$tag")}
cache=${XDG_CACHE_HOME:-$HOME/.cache}
target=${CONTINUUM_RELEASE_TARGET:-$cache/continuum/release}
port=${CONTINUUM_WIRE_CHECK_PORT:-47600}
@@ -55,12 +67,12 @@ fail() {
exit 1
}
-say "building this tree and $tag (features $features)"
+say "building this tree (features $features) and $tag (features $tag_features)"
cargo build -q --features "$features" --bin continuum
here_dir=${CARGO_TARGET_DIR:-$(pwd)/target}
cp "$here_dir/debug/continuum" "$work/here"
git worktree add -q --detach "$work/tagged" "$tag"
-(cd "$work/tagged" && CARGO_TARGET_DIR=$target cargo build -q --features "$features" --bin continuum)
+(cd "$work/tagged" && CARGO_TARGET_DIR=$target cargo build -q --features "$tag_features" --bin continuum)
cp "$target/debug/continuum" "$work/there"
wire() { "$1" --version | sed -n 's/^wire versions \([0-9]*\) to \([0-9]*\)$/\1 \2/p'; }