Skip to content

Commit

Permalink
Evaluation workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Unisay committed Feb 21, 2025
1 parent e59f594 commit 56bf085
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 9 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/evaluate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Evaluate mainnet scripts"

# on:
# schedule:
# - cron: "0 0 * * 5" # Run every Friday at midnight

on:
pull_request:

jobs:
build:
name: Build
runs-on: [plutus-script-evaluation-ci, self-hosted]
strategy:
fail-fast: false
steps:
- name: Checkout this Repo
uses: actions/checkout@main
with:
path: temp

- name: Add plutus SRP to the cabal.project
id: update_cabal_project
run: add_srp.sh

- name: Evaluate
run: |
nix develop --no-warn-dirty --accept-flake-config \
--command bash -c 'cabal clean && cabal update && evaluate'
28 changes: 28 additions & 0 deletions run-script-evaluations/add_srp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash --packages nix-prefetch-git

REPO="IntersectMBO/plutus"
REPO_URL="https://github.com/$REPO"
PREFETCHED=$(nix-prefetch-git --quiet --url $REPO_URL --no-deepClone)
LAST_COMMIT=$(echo $PREFETCHED | jq -r .rev)
NIX_SHA=$(echo $PREFETCHED | jq -r .hash)

# Create the new section to append
read -r -d '' NEW_SECTION << EOM
source-repository-package
type: git
location: $REPO_URL
tag: $LAST_COMMIT
--sha256: $NIX_SHA
subdir:
plutus-tx
plutus-core
plutus-ledger-api
EOM

# Append to cabal.project
echo "$NEW_SECTION" >> cabal.project

# Output the values for potential later use
echo "commit=$LAST_COMMIT" >> $GITHUB_OUTPUT
echo "sha256=$NIX_SHA" >> $GITHUB_OUTPUT
9 changes: 0 additions & 9 deletions run-script-evaluations/cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,3 @@ packages: .
package postgresql-libpq
flags: +use-pkg-config

source-repository-package
type: git
location: https://github.com/intersectmbo/plutus
tag: 262adfd2c7fadb6d89a3c1835eb36b7f85bcf09d
--sha256: sha256-fWwRMARDf3KHIDvGKTInFGz/ISvgGLfF8r2MhK969y8=
subdir:
plutus-tx
plutus-core
plutus-ledger-api
1 change: 1 addition & 0 deletions run-script-evaluations/tmp_repo
Submodule tmp_repo added at acb663

0 comments on commit 56bf085

Please sign in to comment.