maybe whitespace in a param? #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: reference-tests | |
on: | |
pull_request_target: | |
branches: | |
- main | |
- release-* | |
env: | |
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false" | |
total-runners: 6 | |
jobs: | |
authorize: | |
environment: | |
${{ github.event_name == 'pull_request_target' && | |
github.event.pull_request.head.repo.full_name != github.repository && | |
'external' || 'internal' }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: true | |
prepareReferenceTestEthereum: | |
runs-on: ubuntu-22.04 | |
needs: authorize | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
submodules: recursive | |
set-safe-directory: true | |
- name: Set up Java | |
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: setup gradle | |
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa | |
- name: execute generate reference tests | |
run: ./gradlew ethereum:referencetests:blockchainReferenceTests ethereum:referencetests:generalstateReferenceTests ethereum:referencetests:generalstateRegressionReferenceTests -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | |
- name: store generated tests | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
with: | |
name: 'reference-tests' | |
path: 'ethereum/referencetests/build/generated/sources/reference-test/**/*.java' | |
referenceTestEthereum: | |
runs-on: ubuntu-22.04 | |
permissions: | |
statuses: write | |
checks: write | |
needs: | |
- prepareReferenceTestEthereum | |
strategy: | |
fail-fast: true | |
matrix: | |
runner_index: [0,1,2,3,4,5] | |
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: adopt-openj9 | |
java-version: 17 | |
- name: retrieve generated tests | |
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a | |
with: | |
name: 'reference-tests' | |
path: 'ethereum/referencetests/build/generated/sources/reference-test/' | |
- name: get reference test report | |
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d | |
with: | |
branch: main | |
name_is_regexp: true | |
name: 'reference-test-node-\d*\d-results' | |
path: tmp/ref-xml-reports-downloaded | |
if_no_artifact_found: true | |
- name: setup gradle | |
uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa | |
- name: Split tests | |
id: split-tests | |
uses: r7kamura/split-tests-by-timings@9322bd292d9423e2bc5a65bec548901801341e3f | |
with: | |
reports: tmp/ref-xml-reports-downloaded | |
glob: 'ethereum/referencetests/build/generated/sources/reference-test/**/*.java' | |
total: ${{env.total-runners}} | |
index: ${{ matrix.runner_index }} | |
- name: compose gradle args | |
run: echo ${{ steps.split-tests.outputs.paths }} | sed -e 's/^.*java\///' -e 's@/@.@g' -e 's/\.java//' -e 's/^/--tests /' > refTestArgs.txt | |
- name: run reference tests | |
run: ./gradlew ethereum:referenceTests:referenceTests `cat refTestArgs.txt` -Dorg.gradle.parallel=true -Dorg.gradle.caching=true | |
- name: Upload Test Report | |
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 | |
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' | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@5f47764eec0e1c1f19f40c8e60a5ba47e47015c5 | |
if: success() || failure() # always run even if the build step fails | |
with: | |
report_paths: '**/build/test-results/referenceTest/TEST-*.xml' | |
reference-tests: | |
runs-on: ubuntu-22.04 | |
needs: [ referenceTestEthereum ] | |
permissions: | |
checks: write | |
statuses: write | |
steps: | |
- name: consolidation | |
run: echo "consolidating statuses" | |