Skip to content

Commit

Permalink
Merge pull request #3 from ethereumjs/master
Browse files Browse the repository at this point in the history
Merge lates fork
  • Loading branch information
JacekGlen authored Sep 11, 2024
2 parents f1d10d5 + c85974a commit c73ee84
Show file tree
Hide file tree
Showing 1,018 changed files with 65,210 additions and 56,743 deletions.
61 changes: 44 additions & 17 deletions .github/workflows/block-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
name: Block
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
submodule-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}/packages/block
Expand All @@ -15,32 +25,49 @@ defaults:
working-directory: packages/block

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-block
cancel-in-progress: true

jobs:
test-block:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
steps:
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js ${{ matrix.node-version }}
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- if: inputs.dep-cache-key != 'none'
uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'

- run: npm ci --omit=peer
working-directory: ${{github.workspace}}
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Initialize ethereum-tests
id: submodules-cache
with:
path: ${{github.workspace}}/packages/ethereum-tests
key: ${{ inputs.submodule-cache-key}}
fail-on-cache-miss: true

- run: npm run lint
- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
files: ${{ env.cwd }}/coverage/lcov.info
files: ${{ github.workspace}}/packages/block/coverage/lcov.info
flags: block
46 changes: 30 additions & 16 deletions .github/workflows/blockchain-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Blockchain
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}/packages/blockchain
Expand All @@ -15,28 +22,35 @@ defaults:
working-directory: packages/blockchain

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-blockchain
cancel-in-progress: true

jobs:
test-blockchain:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'

- run: npm ci --omit=peer
working-directory: ${{github.workspace}}

- run: npm run lint
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
Expand Down
75 changes: 47 additions & 28 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,71 @@
name: Browser
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
submodule-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-browser
cancel-in-progress: true

jobs:
test-all-browser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
fail-fast: false
steps:
- uses: actions/checkout@v4
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4
with:
submodules: recursive # necessary for block tests to load ethereum/tests

- name: Use Node.js ${{ matrix.node-version }}
submodules: recursive

# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- if: inputs.dep-cache-key != 'none'
uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'

- run: npm ci
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Restore ethereum-tests from cache if available
id: submodules-cache
with:
path: ${{github.workspace}}/packages/ethereum-tests
key: ${{ inputs.submodule-cache-key }}

- run: npm run install-browser-deps

- run: npm run test:browser -w=@ethereumjs/rlp
- run: npm run test:browser -w=@ethereumjs/util
- run: npm run test:browser -w=@ethereumjs/common
- run: npm run test:browser -w=@ethereumjs/trie
- run: npm run test:browser -w=@ethereumjs/tx
- run: npm run test:browser -w=@ethereumjs/block
# No browser tests for devp2p
- run: npm run test:browser -w=@ethereumjs/blockchain
# No browser tests for ethash
- run: npm run test:browser -w=@ethereumjs/wallet
- run: npm run test:browser -w=@ethereumjs/statemanager
- run: npm run test:browser -w=@ethereumjs/evm
- run: npm run test:browser -w=@ethereumjs/vm
- run: npm run test:browser -w=@ethereumjs/verkle
- run: npm run test:browser --workspaces --if-present



Loading

0 comments on commit c73ee84

Please sign in to comment.