Skip to content

Commit

Permalink
Enable create_script_context in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoura committed May 29, 2023
1 parent 4695d54 commit f08f8c5
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 5 deletions.
34 changes: 29 additions & 5 deletions .github/regression.sh
Expand Up @@ -23,11 +23,35 @@ mkdir -p "$WORKDIR"
export TMPDIR="$WORKDIR/tmp"
mkdir -p "$TMPDIR"

if [ "${CI_ENABLE_DBSYNC:-"false"}" != "false" ]; then
# setup dbsync
# shellcheck disable=SC1090,SC1091
. .github/source_dbsync.sh
fi
# setup dbsync (disabled by default)
case "${CI_ENABLE_DBSYNC:-"false"}" in
"true" | 1)
# shellcheck disable=SC1090,SC1091
. .github/source_dbsync.sh
;;
"false" | 0)
;;
*)
echo "Unknown value for CI_ENABLE_DBSYNC: ${CI_ENABLE_DBSYNC}" >&2
exit 1
;;
esac

# setup plutus-apps (enabled by default)
# The "plutus-apps" repo is needed for the `create-script-context` tool, which is used by the
# Plutus tests that are testing script context.
case "${CI_ENABLE_PLUTUS_APPS:-"true"}" in
"true" | 1)
# shellcheck disable=SC1090,SC1091
. .github/source_plutus_apps.sh
;;
"false" | 0)
;;
*)
echo "Unknown value for CI_ENABLE_PLUTUS: ${CI_ENABLE_PLUTUS}" >&2
exit 1
;;
esac

if [ "${CI_TOPOLOGY:-""}" = "p2p" ]; then
export ENABLE_P2P="true"
Expand Down
25 changes: 25 additions & 0 deletions .github/source_plutus_apps.sh
@@ -0,0 +1,25 @@
#!/bin/bash

echo "::group::plutus-apps setup"

pushd "$WORKDIR" || exit 1

# Clone plutus-apps if needed
if [ ! -e plutus-apps ]; then
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/input-output-hk/plutus-apps.git
fi

pushd plutus-apps || exit 1
git pull origin main
git rev-parse HEAD

# Build `create-script-context`
nix build --accept-flake-config .#create-script-context -o create-script-context

# Add `create-script-context` to PATH
PATH="$(readlink -m create-script-context/bin)":"$PATH"
export PATH

pushd "$REPODIR" || exit 1

echo "::endgroup::"

0 comments on commit f08f8c5

Please sign in to comment.