-
Notifications
You must be signed in to change notification settings - Fork 860
83 lines (80 loc) · 3.04 KB
/
reference-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
name: reference-tests
on:
workflow_dispatch:
pull_request:
branches:
- main
- release-*
env:
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true -Dorg.gradle.caching=true"
total-runners: 8
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
referenceTestEthereum:
runs-on: ubuntu-22.04
permissions:
statuses: write
checks: write
packages: read
strategy:
fail-fast: true
matrix:
runner_index: [1,2,3,4,5,6,7,8]
steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
submodules: recursive
- name: Set up Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
with:
distribution: semeru # IBM Semeru with OpenJ9
java-version: 21
- name: setup gradle
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
with:
cache-disabled: true
- name: execute generate reference tests
run: ./gradlew ethereum:referencetests:referenceTestClasses -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: list test files generated
run: find ethereum/referencetests/build/generated/sources/reference-test -name "*.java" | sort >> filenames.txt
- name: Split tests
run: ./.github/workflows/splitList.sh filenames.txt ${{env.total-runners}}
- name: echo test file count
run: cat group_${{matrix.runner_index}}.txt | wc
- name: convert to test suite classnames
run: cat group_${{matrix.runner_index}}.txt | sed -e 's/^.*java\///' -e 's@/@.@g' -e 's/\.java//' -e 's/^/--tests /' > testClasses.txt
- name: compose gradle args
run: tr '\n' ' ' < testClasses.txt > refTestArgs.txt
- name: refTestArgs.txt
run: cat refTestArgs.txt
- name: run reference tests
run: ./gradlew ethereum:referenceTests:referenceTests `cat refTestArgs.txt`
- name: Upload Test Report
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
if: always() # always run even if the previous step fails
with:
name: reference-test-node-${{matrix.runner_index}}-results
path: '**/build/test-results/referenceTests/TEST-*.xml'
reftests-passed:
name: "reftests-passed"
runs-on: ubuntu-22.04
needs: [ referenceTestEthereum ]
permissions:
checks: write
statuses: write
if: always()
steps:
# Fail if any `needs` job was not a success.
# Along with `if: always()`, this allows this job to act as a single required status check for the entire workflow.
- name: Fail on workflow error
run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}