Skip to content

Commit 47bad8f

Browse files
committed
Evaluation workflow
1 parent e59f594 commit 47bad8f

File tree

3 files changed

+58
-9
lines changed

3 files changed

+58
-9
lines changed

.github/workflows/evaluate.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Evaluate mainnet scripts"
2+
3+
# on:
4+
# schedule:
5+
# - cron: "0 0 * * 5" # Run every Friday at midnight
6+
7+
on:
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: [plutus-script-evaluation-ci, self-hosted]
14+
strategy:
15+
fail-fast: false
16+
steps:
17+
- name: Checkout this Repo
18+
uses: actions/checkout@main
19+
20+
21+
- name: Add plutus SRP to the cabal.project
22+
id: update_cabal_project
23+
working-directory: run-script-evaluations
24+
run: ./add_srp.sh
25+
26+
- name: Evaluate
27+
run: |
28+
nix develop --no-warn-dirty --accept-flake-config \
29+
--command bash -c 'cabal clean && cabal update && evaluate'
30+

run-script-evaluations/add_srp.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /usr/bin/env nix-shell
2+
#! nix-shell -i bash --packages nix-prefetch-git
3+
4+
REPO="IntersectMBO/plutus"
5+
REPO_URL="https://github.com/$REPO"
6+
PREFETCHED=$(nix-prefetch-git --quiet --url $REPO_URL --no-deepClone)
7+
LAST_COMMIT=$(echo $PREFETCHED | jq -r .rev)
8+
NIX_SHA=$(echo $PREFETCHED | jq -r .hash)
9+
10+
# Create the new section to append
11+
read -r -d '' NEW_SECTION << EOM
12+
source-repository-package
13+
type: git
14+
location: $REPO_URL
15+
tag: $LAST_COMMIT
16+
--sha256: $NIX_SHA
17+
subdir:
18+
plutus-tx
19+
plutus-core
20+
plutus-ledger-api
21+
EOM
22+
23+
# Append to cabal.project
24+
echo "$NEW_SECTION" >> cabal.project
25+
26+
# Output the values for potential later use
27+
echo "commit=$LAST_COMMIT" >> $GITHUB_OUTPUT
28+
echo "sha256=$NIX_SHA" >> $GITHUB_OUTPUT

run-script-evaluations/cabal.project

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,3 @@ packages: .
2323
package postgresql-libpq
2424
flags: +use-pkg-config
2525

26-
source-repository-package
27-
type: git
28-
location: https://github.com/intersectmbo/plutus
29-
tag: 262adfd2c7fadb6d89a3c1835eb36b7f85bcf09d
30-
--sha256: sha256-fWwRMARDf3KHIDvGKTInFGz/ISvgGLfF8r2MhK969y8=
31-
subdir:
32-
plutus-tx
33-
plutus-core
34-
plutus-ledger-api

0 commit comments

Comments
 (0)