-
Notifications
You must be signed in to change notification settings - Fork 22
86 lines (75 loc) · 2.77 KB
/
reference-blockchain-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Daily Reference Blockchain Tests
on:
schedule:
- cron: 0 21 * * 1-5
workflow_dispatch:
inputs:
failed_tests_file_name:
description: File name for filtering failed tests based on previous runs
required: false
type: string
failed_tests_file_path:
description: File path for filtering failed tests based on previous runs
required: false
type: string
failed_module:
description: Specific module to filter from failed tests
required: false
type: string
failed_constraint:
description: Specific module constrain pair to filter from failed tests
required: false
type: string
jobs:
get-branch-name:
runs-on: ubuntu-latest
steps:
- name: Get branch name
run: |
echo "Branch: ${github.event.ref}"
BRANCH_NAME=${github.event.ref##*/}
echo "Branch name: $BRANCH_NAME"
outputs:
branch-name: $BRANCH_NAME
ethereum-tests:
runs-on: ubuntu-latest-128
steps:
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.CONSTRAINTS_SSH_KEY }}
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install Corset
run: RUSTFLAGS=-Awarnings cargo install --git ssh://[email protected]/ConsenSys/corset --tag v9.7.13 --locked --force
- name: Generate block chain reference tests
run: ./gradlew :reference-tests:generateBlockchainReferenceTests -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: fields,expand,expand,expand
- name: generate zkevm.bin
run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd ..
- name: Run reference blockchain tests
run: ./gradlew referenceBlockchainTests -x spotlessCheck
env:
REFERENCE_TESTS_PARALLELISM: 10
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: fields,expand,expand,expand
FAILED_TESTS_FILE_NAME: ${{ inputs.failed_tests_file_name || '' }}
FAILED_TEST_JSON_DIRECTORY: ${{ ../tmp/${{ inputs.branch-name }}/ || '' }}
FAILED_MODULE: ${{ inputs.failed_module || '' }}
FAILED_CONSTRAINT: ${{ inputs.failed_constraint || '' }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: ../tmp/${{ inputs.branch-name }}/${{ inputs.failed_tests_file_name }}