Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved Script Evaluation Test to GHA #5095

Merged
merged 7 commits into from
Feb 1, 2023
Merged
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
7 changes: 4 additions & 3 deletions .github/workflows/add-triage-label.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Add triage label
name: Add Triage Label
on:
issues:
types:
- reopened
- opened
jobs:
add_triage_label:
add-triage-label:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
- name: Run
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Benchmarking
name: Benchmark
on:
issue_comment:
types: [created]

concurrency:
group: plutus-benchmark

jobs:
benchmark:
runs-on: [self-hosted, plutus-benchmark]
Expand Down Expand Up @@ -87,8 +90,9 @@ jobs:
core.setFailed(`Error: ${error}`);
}
- run: |
nix develop --no-warn-dirty --accept-flake-config --command bash ./scripts/ci-plutus-benchmark.sh
- name: Run
run: |
nix develop --no-warn-dirty --accept-flake-config --command bash ./scripts/ci-plutus-benchmark.sh
if: success()
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/hlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,25 @@ jobs:
hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/hlint-setup@v2
- name: Checkout
uses: actions/checkout@v3

- name: Setup HLint
uses: haskell/actions/hlint-setup@v2
with:
version: '3.4'
- uses: nixbuild/nix-quick-install-action@v21

- name: Quick Install Nix
uses: nixbuild/nix-quick-install-action@v21
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- name: Build HLint
run: nix build .#hlint
- name: Run HLint

- name: Build
run: nix build .#hlint

- name: Run
uses: haskell/actions/hlint-run@v1
with:
hlint-bin: "./result/bin/hlint --hint=./.github/.hlint.yaml"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: "Tests"
name: Pre Commit Check
on:
pull_request:
jobs:
nix-sanity-checks:
pre-commit-check:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: nixbuild/nix-quick-install-action@v21
- name: Checkout
uses: actions/checkout@v3

- name: Quick Install Nix
uses: nixbuild/nix-quick-install-action@v21
with:
nix_conf: |
experimental-features = nix-command flakes
accept-flake-config = true
- name: Pre-commit check

- name: Run
run: nix build .#pre-commit-check
40 changes: 40 additions & 0 deletions .github/workflows/script-evaluation-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# A nightly job which downloads script evaluation dumps from S3 and runs a regression test.
name: Script Evaluation Test
on:
schedule:
- cron: 30 3 * * * # 3:30am every day
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose at random, happy to change


concurrency:
group: script-evaluation-test
# We only want at most one evaluation test running at a time
cancel-in-progress: true

jobs:
script-evaluation-test:
runs-on: [self-hosted, plutus-benchmark]

steps:
- name: Checkout
uses: actions/checkout@v3.3.0

- name: Download and Unzip Dump Files
run: |
export LOCAL_DIR="$HOME/mainnet-script-dump-downloaded"
nix develop --no-warn-dirty --accept-flake-config --command \
bash ./scripts/s3-sync-unzip.sh s3://plutus/mainnet-script-dump/ \*.event.bz2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're running on a persistent machine, is there a way we can save this somewhere persistent and only sync the remainder?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the file $HOME/mainnet-script-dump-downloaded is going to persist across runs, no?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. I also don't know if that's true. Maybe we should check with @Pacman99 .

I also don't know if that script does things incrementally, probably a question for @zliu41

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: https://s3.devx.iog.io
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can someone confirm that these two are correct? AWS_ENDPOINT_URL and AWS_DEFAULT_REGION
Maybe @Pacman99


- name: Run
# Run the test cases sequentially. This ensures we don't need to simultaneously store
# multiple `ScriptEvaluationEvents`, which are large, in memory. Each test case
# contains many script evaluation events, and those are run in parallel based on
# the number of available processors.
run: |
export EVENT_DUMP_DIR="$HOME/mainnet-script-dump-downloaded"
nix run .#x86_64-linux.plutus.library.plutus-project-924.hsPkgs.plutus-ledger-api.components.exes.evaluation-test -- --num-threads=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should test this, I'm not 100% sure whether it will work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally



25 changes: 0 additions & 25 deletions build/buildkite/script-evaluation-test.yml

This file was deleted.