Skip to content

Commit

Permalink
fix everything
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed Aug 19, 2024
1 parent 9e71cc4 commit a9eed8a
Show file tree
Hide file tree
Showing 18 changed files with 295 additions and 80 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/block-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ on:
required: true
type: string
submodule-cache-key:
required: true
type: string
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 @@ -25,9 +32,15 @@ jobs:
test-block:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/cache/restore@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

# 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}}
Expand All @@ -39,12 +52,13 @@ jobs:
node-version: 20
cache: 'npm'

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

- uses: actions/cache/restore@v4
- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Initialize ethereum-tests
id: submodules-cache
with:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/blockchain-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
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 @@ -22,8 +29,11 @@ jobs:
test-blockchain:
runs-on: ubuntu-latest
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

# 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:
Expand All @@ -36,7 +46,7 @@ jobs:
node-version: 20
cache: 'npm'

- name: Install Dependencies (if not restored from cache)
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
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
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/client-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
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/client
Expand All @@ -23,9 +31,12 @@ jobs:
test-client:
runs-on: ubuntu-latest
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

- uses: actions/cache/restore@v4
- if: inputs.dep-cache-key != 'none'
uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
Expand Down Expand Up @@ -78,9 +89,12 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4

- uses: actions/cache/restore@v4
# 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}}
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/common-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
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/common
Expand All @@ -23,9 +30,13 @@ jobs:
runs-on: ubuntu-latest

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

- uses: actions/cache/restore@v4
# 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}}
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/devp2p-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-devp2p
Expand All @@ -16,9 +23,13 @@ jobs:
runs-on: ubuntu-latest

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

- uses: actions/cache/restore@v4
# 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}}
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/ethash-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
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/ethash
Expand All @@ -23,9 +31,13 @@ jobs:
runs-on: ubuntu-latest

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

- uses: actions/cache/restore@v4
# 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}}
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/evm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
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/evm
Expand All @@ -25,9 +32,15 @@ jobs:
test-evm:
runs-on: ubuntu-latest
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

- uses: actions/cache/restore@v4
# 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}}
Expand All @@ -44,7 +57,8 @@ jobs:
run: npm ci
working-directory: ${{ github.workspace }}

- uses: actions/cache/restore@v4
- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Initialize ethereum-tests
id: submodules-cache
with:
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-examples
Expand All @@ -15,18 +22,25 @@ jobs:
test-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4
with:
node-version: 20
cache: 'npm'
submodules: recursive

- uses: actions/cache/restore@v4
# 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: 20
cache: 'npm'

- name: Install Dependencies (if not restored from cache)
if: steps.dep-cache.outputs.cache-hit != 'true'
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/genesis-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ on:
inputs:
dep-cache-key:
required: false
type: string
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}/packages/genesis
Expand All @@ -27,9 +30,13 @@ jobs:
runs-on: ubuntu-latest

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

- uses: actions/cache/restore@v4
# 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}}
Expand All @@ -45,9 +52,6 @@ jobs:
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}




- run: npm run coverage
- uses: codecov/codecov-action@v3
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-lint
Expand All @@ -15,9 +22,13 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/cache/restore@v4
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4

# 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}}
Expand Down
Loading

0 comments on commit a9eed8a

Please sign in to comment.