|
| 1 | +name: Spec tests |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + workflow_call: |
| 6 | + |
| 7 | +defaults: |
| 8 | + run: |
| 9 | + shell: bash |
| 10 | + |
| 11 | +jobs: |
| 12 | + spec-tests: |
| 13 | + name: spec-${{ matrix.suite }}-${{ matrix.fixtures }} |
| 14 | + # Skip enginextests-devnet until the devnet tarball ships |
| 15 | + # blockchain_tests_engine_x/. The non-`_x` `blockchain_tests_engine/` |
| 16 | + # variant uses a different JSON schema (inline `pre`, no `preHash`) |
| 17 | + # that the cmd/evm enginextest runner cannot consume. Re-enable by |
| 18 | + # removing this guard once the fixture lands. |
| 19 | + if: ${{ !(matrix.suite == 'enginextests' && matrix.fixtures == 'devnet') }} |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + - { suite: statetests, fixtures: stable, workers: 12, max-allowed-failures: 37 } |
| 25 | + - { suite: statetests, fixtures: devnet, workers: 12, max-allowed-failures: 5253 } |
| 26 | + - { suite: blocktests, fixtures: stable, workers: 12, max-allowed-failures: 0 } |
| 27 | + - { suite: blocktests, fixtures: devnet, workers: 12, max-allowed-failures: 6206 } |
| 28 | + - { suite: enginextests, fixtures: stable, workers: 8, max-allowed-failures: 0 } |
| 29 | + - { suite: enginextests, fixtures: devnet, workers: 8, max-allowed-failures: 0 } |
| 30 | + runs-on: ubuntu-24.04 |
| 31 | + timeout-minutes: 60 |
| 32 | + env: |
| 33 | + RAMDISK_SIZE_MB: '8192' |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Declare runner |
| 37 | + run: echo "Runner $RUNNER_NAME" |
| 38 | + |
| 39 | + - name: Checkout custom actions |
| 40 | + uses: actions/checkout@v6 |
| 41 | + with: |
| 42 | + fetch-depth: 1 |
| 43 | + |
| 44 | + - uses: ./.github/actions/setup-erigon |
| 45 | + id: erigon |
| 46 | + with: |
| 47 | + submodules: false |
| 48 | + lfs: false |
| 49 | + cleanup-space: true |
| 50 | + ramdisk: true |
| 51 | + build-cache-extra-key: spec-${{ matrix.suite }}-${{ matrix.fixtures }} |
| 52 | + |
| 53 | + - name: Cache test-fixtures tarballs |
| 54 | + uses: actions/cache@v4 |
| 55 | + with: |
| 56 | + # Same key as test-all-erigon.yml so the two workflows share the |
| 57 | + # cache: tarballs are downloaded once per OS+manifest-hash and |
| 58 | + # restored here. Only the .tar.gz files are cached; extraction |
| 59 | + # happens fresh each run via tools/test-fixtures.sh. |
| 60 | + path: test-fixtures-cache/*.tar.gz |
| 61 | + key: test-fixtures-${{ runner.os }}-${{ hashFiles('test-fixtures.json') }} |
| 62 | + restore-keys: | |
| 63 | + test-fixtures-${{ runner.os }}- |
| 64 | +
|
| 65 | + - name: Run spec-${{ matrix.suite }}-${{ matrix.fixtures }} |
| 66 | + env: |
| 67 | + SPEC_MAX_FAILURES: ${{ matrix.max-allowed-failures }} |
| 68 | + SPEC_WORKERS: ${{ matrix.workers }} |
| 69 | + run: make spec-${{ matrix.suite }}-${{ matrix.fixtures }} |
| 70 | + |
| 71 | + - uses: ./.github/actions/cleanup-erigon |
| 72 | + if: always() |
| 73 | + |
| 74 | + # In the merge queue, cancel the run on first failure so the gate |
| 75 | + # doesn't stall waiting for still-running siblings. PR runs keep |
| 76 | + # going so authors see the full failure picture. |
| 77 | + - name: Cancel workflow run on failure |
| 78 | + if: failure() && github.event_name == 'merge_group' |
| 79 | + env: |
| 80 | + GH_TOKEN: ${{ github.token }} |
| 81 | + run: gh run cancel ${{ github.run_id }} || true |
0 commit comments