Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down
33 changes: 33 additions & 0 deletions .github/source_acropolis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
set -Eeuo pipefail

# Build Acropolis (omnibus) into $WORKDIR/acropolis-build<postfix>
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}:"
}