-
Notifications
You must be signed in to change notification settings - Fork 34
102 lines (90 loc) · 3.74 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Daily Reference Blockchain Tests
on:
schedule:
- cron: 0 21 * * 1-5
workflow_dispatch:
inputs:
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
commit:
description: Commit to download artifact from
required: false
type: string
jobs:
blockchain-reference-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: get-branch-name
id: extract_branch
run: |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- 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.15 --locked --force
- name: Generate zkevm_for_reference_tests.bin
run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd ..
- name: Install Go
uses: actions/setup-go@v4
- name: Install Go Corset
run: go install github.com/consensys/go-corset/cmd/go-corset@latest
- 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: Download artifact
uses: dawidd6/action-download-artifact@v6
if: ${{ inputs.failed_module != '' }}
with:
name: failedBlockchainReferenceTests.json
path: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
commit: ${{ inputs.commit || '' }}
if_no_artifact_found: ignore
- name: Rename filter input file
if: ${{ inputs.failed_module != '' }}
run: mv ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/failedBlockchainReferenceTests.json ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/failedBlockchainReferenceTests-input.json
- name: Run reference blockchain tests
run: ./gradlew referenceBlockchainTests -x spotlessCheck
timeout-minutes: 180
continue-on-error: true
env:
REFERENCE_TESTS_PARALLELISM: 7
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: disable
GOCORSET_FLAGS: -wd --ansi-escapes=false --report --air
FAILED_TEST_JSON_DIRECTORY: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/
FAILED_MODULE: ${{ inputs.failed_module || '' }}
FAILED_CONSTRAINT: ${{ inputs.failed_constraint || '' }}
REFERENCE_TEST_FILTER_INPUT: failedBlockchainReferenceTests.json
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: failedBlockchainReferenceTests.json
path: ${{ github.workspace }}/tmp/${{ steps.extract_branch.outputs.branch }}/
- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: blockchain-refrence-tests-report
path: reference-tests/build/reports/tests/**/*