Skip to content

Commit ba1780f

Browse files
committed
Evaluation workflow
1 parent e59f594 commit ba1780f

File tree

3 files changed

+55
-9
lines changed

3 files changed

+55
-9
lines changed

.github/workflows/evaluate.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
with:
20+
path: temp
21+
22+
- name: Add plutus SRP to the cabal.project
23+
id: update_cabal_project
24+
run: |
25+
REPO="IntersectMBO/plutus"
26+
REPO_URL="https://github.com/$REPO"
27+
PREFETCHED=$(nix-shell -p nix-prefetch-git --run "nix-prefetch-git --quiet --url $REPO_URL --no-deepClone")
28+
LAST_COMMIT=$(echo $PREFETCHED | jq -r .sha)
29+
NIX_SHA=$(echo $PREFETCHED | jq -r .hash)
30+
31+
# Create the new section to append
32+
read -r -d '' NEW_SECTION << EOM
33+
source-repository-package
34+
type: git
35+
location: $REPO_URL
36+
tag: $LAST_COMMIT
37+
--sha256: $NIX_SHA
38+
subdir:
39+
plutus-tx
40+
plutus-core
41+
plutus-ledger-api
42+
EOM
43+
44+
# Append to cabal.project
45+
echo "$NEW_SECTION" >> cabal.project
46+
47+
# Output the values for potential later use
48+
echo "commit=$LAST_COMMIT" >> $GITHUB_OUTPUT
49+
echo "sha256=$NIX_SHA" >> $GITHUB_OUTPUT
50+
51+
- name: Evaluate
52+
run: |
53+
nix develop --no-warn-dirty --accept-flake-config \
54+
--command bash -c 'cabal clean && cabal update && evaluate'

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

run-script-evaluations/tmp_repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit acb663d088268d29171d19314ed6d21087a34108

0 commit comments

Comments
 (0)