From 5d41a9f7ca9918c7cab31c5d2c3bc714a5af9af3 Mon Sep 17 00:00:00 2001 From: saratomaz Date: Fri, 30 Jan 2026 11:10:30 +0000 Subject: [PATCH] Integrate acropolis node --- .github/regression.sh | 16 ++++++++++++++++ .github/source_acropolis.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/source_acropolis.sh diff --git a/.github/regression.sh b/.github/regression.sh index 8ceae7d4d..a1f366304 100755 --- a/.github/regression.sh +++ b/.github/regression.sh @@ -129,6 +129,22 @@ case "${CARDANO_CLI_REV:-}" in ;; esac +# setup acropolis (disabled by default) +case "${ACROPOLIS_REV:-}" in + "" ) + ;; + "none" ) + unset ACROPOLIS_REV + ;; + * ) + # shellcheck disable=SC1090,SC1091 + . .github/source_acropolis.sh + acropolis_build "$ACROPOLIS_REV" + PATH_PREPEND="$(acropolis_print_path_prepend "")${PATH_PREPEND}" + export PATH_PREPEND + ;; +esac + # setup cardano-node binaries case "${NODE_REV:-}" in "" | "none" ) diff --git a/.github/source_acropolis.sh b/.github/source_acropolis.sh new file mode 100644 index 000000000..df46b8f7b --- /dev/null +++ b/.github/source_acropolis.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -Eeuo pipefail + +# Build Acropolis (omnibus) into $WORKDIR/acropolis-build +acropolis_build() { + local acropolis_rev="${1:?}" + local origpwd="$PWD" + + cd "$WORKDIR" || return 1 + + nix build \ + --accept-flake-config \ + --no-write-lock-file \ + "github:input-output-hk/acropolis?ref=${acropolis_rev}#acropolis-process-omnibus" \ + -o acropolis-build || { cd "$origpwd" || true; return 1; } + + [ -x acropolis-build/bin/acropolis-process-omnibus ] || { cd "$origpwd" || true; return 1; } + + cd "$origpwd" || return 1 +} + +# Print PATH to prepend for the acropolis build output. +acropolis_print_path_prepend() { + local origpwd="$PWD" + + cd "$WORKDIR" || return 1 + + local bin_dir + bin_dir="$(readlink -m "acropolis-build/bin")" || { cd "$origpwd" || true; return 1; } + + cd "$origpwd" || return 1 + echo "${bin_dir}:" +}