Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup CI with cache #3592

Merged
merged 137 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
a9e4775
Call `dpt.destroy` inside rlpx
acolytec3 May 17, 2023
03dced0
Turn off github actions
acolytec3 May 17, 2023
aba9449
Add wtfnode
acolytec3 May 17, 2023
a8d90b7
shorten timeout on retry
acolytec3 May 17, 2023
5da5bb1
Merge remote-tracking branch 'origin/master' into devp2p-timeout-fixes
acolytec3 May 17, 2023
e4ecd4e
Ensure peer disconnects
acolytec3 May 17, 2023
f277391
Merge remote-tracking branch 'origin/master' into devp2p-timeout-fixes
acolytec3 May 17, 2023
7e284cd
Slight disconnect tweak
acolytec3 May 18, 2023
845ca4f
Ensure peer refreshIntervals are cleared
acolytec3 May 18, 2023
f358ec8
clear interval in peer disconnect
acolytec3 May 18, 2023
b2e4904
Add client wtfnode ci run
acolytec3 May 19, 2023
f23f423
run block and devp2p
acolytec3 May 20, 2023
7dea35c
cache build outputs
acolytec3 May 20, 2023
a463571
only run block coverage
acolytec3 May 20, 2023
cbcc09f
cache everything
acolytec3 May 22, 2023
e66a2a2
Adjust working directory
acolytec3 May 22, 2023
295e2c6
fix working dir
acolytec3 May 22, 2023
3302097
add submodules to block
acolytec3 May 22, 2023
97ba6c3
Add separate lint check
acolytec3 May 22, 2023
caea991
add vm
acolytec3 May 22, 2023
1781cc0
set correct job ordering
acolytec3 May 22, 2023
d6d11fb
Add restore step to vm:blockchain
acolytec3 May 22, 2023
b3776cd
Add workflow dependency
acolytec3 May 22, 2023
24eaa59
add jobs
acolytec3 May 22, 2023
1d988cc
call block in devp2p
acolytec3 May 22, 2023
f3fda49
Need build
acolytec3 May 22, 2023
0ec02a5
Try reusable workflows
acolytec3 May 22, 2023
1260626
remove build dep
acolytec3 May 22, 2023
bfd9b2c
update concurrency
acolytec3 May 22, 2023
6b0b207
add ethash and common
acolytec3 May 22, 2023
91282fe
add trie and build
acolytec3 May 22, 2023
5714fa2
Up setup-node to v3
acolytec3 May 26, 2023
1715b9b
Update lockfile
acolytec3 May 26, 2023
ebcfa43
pass cache-key to block
acolytec3 May 26, 2023
aa932f8
better hash key
acolytec3 May 26, 2023
2165c3a
Cache key redux
acolytec3 May 26, 2023
0dd516d
correct cache key usage
acolytec3 May 26, 2023
da10082
remove package lock
acolytec3 May 26, 2023
c8d1cd7
remove package lock
acolytec3 May 26, 2023
dcccb6a
fix inputs
acolytec3 May 26, 2023
69a8301
fix syntax
acolytec3 May 26, 2023
7d1e7de
Remove echo
acolytec3 May 26, 2023
2478549
add cachekey
acolytec3 May 26, 2023
b071ada
Add all package test suites to build script
acolytec3 May 27, 2023
5bee0f6
TYPO
acolytec3 May 27, 2023
1123344
run ci if cache miss
acolytec3 May 27, 2023
743ab98
Add fake key to dispatch
acolytec3 May 27, 2023
78b5e49
make cache key optional
acolytec3 May 27, 2023
ac426bd
Merge branch 'devp2p-timeout-fixes' into speedup-ci
jochem-brouwer Aug 14, 2024
0790c1c
remove devp2p changes
jochem-brouwer Aug 14, 2024
723c25d
add additional packages
acolytec3 Aug 15, 2024
c8ff140
add correct triggers
acolytec3 Aug 15, 2024
ddbdbbd
update node to 20
acolytec3 Aug 15, 2024
5a47965
Add install if...
acolytec3 Aug 15, 2024
cdda0fe
just build block
acolytec3 Aug 15, 2024
ce65187
run build on node 20
acolytec3 Aug 15, 2024
3ee0a14
add default back
acolytec3 Aug 15, 2024
e0a1673
remove conditional install step
acolytec3 Aug 15, 2024
e5b1d50
Merge remote-tracking branch 'origin/master' into speedup-ci
acolytec3 Aug 15, 2024
2e870ea
update action versions and package lock
acolytec3 Aug 15, 2024
4998a79
run install in correct directory
acolytec3 Aug 15, 2024
44dbd63
update package-lock
acolytec3 Aug 15, 2024
a00cfb9
echo some stuff
acolytec3 Aug 15, 2024
e1dd2d4
More tweaks
acolytec3 Aug 15, 2024
3af735c
try again
acolytec3 Aug 15, 2024
4d9838a
reference correct output
acolytec3 Aug 15, 2024
4f3de2e
use common instead
acolytec3 Aug 15, 2024
481342a
try skipping checkout
acolytec3 Aug 15, 2024
c7b9031
fix util reference
acolytec3 Aug 15, 2024
ecff4b6
restore first
acolytec3 Aug 15, 2024
8a932b3
restore first
acolytec3 Aug 15, 2024
3b029e8
add checkout back
acolytec3 Aug 15, 2024
8cf480f
add separate build step
acolytec3 Aug 15, 2024
63a1d29
clarify naming on build vs dep cache
acolytec3 Aug 15, 2024
a085549
update build cache key
acolytec3 Aug 15, 2024
d3679dc
update build cache
acolytec3 Aug 15, 2024
aeff8c6
fix build key
acolytec3 Aug 16, 2024
4ff4a75
turn block on
acolytec3 Aug 16, 2024
3655beb
add inputs to block
acolytec3 Aug 16, 2024
8f30e4f
fix more things
acolytec3 Aug 16, 2024
114d751
remove build cache step
acolytec3 Aug 16, 2024
64972a7
update package lock
acolytec3 Aug 16, 2024
b03a254
remove ignore scripts
acolytec3 Aug 16, 2024
0b43802
cache everything
acolytec3 Aug 16, 2024
edc530c
Always build and cache
acolytec3 Aug 16, 2024
1f97fdf
more experiments
acolytec3 Aug 16, 2024
56f51dc
always run npm ci
acolytec3 Aug 16, 2024
2f1f867
update to latest ver
acolytec3 Aug 16, 2024
683fc87
clean up client and vm jobs
acolytec3 Aug 16, 2024
5e751e6
more cleanup
acolytec3 Aug 16, 2024
2ddfcb5
remove multi-node strategy
acolytec3 Aug 16, 2024
b264bcc
add correct concurrency groups
acolytec3 Aug 16, 2024
373dc44
fix concurrency deadlock
acolytec3 Aug 16, 2024
1e4eb33
remove recursive checkout from test jobs
acolytec3 Aug 16, 2024
e69ee75
Fix devp2p
acolytec3 Aug 16, 2024
a4a93ca
remove retry on devp2p
acolytec3 Aug 16, 2024
9db2757
set working directory
acolytec3 Aug 16, 2024
0f8a68f
Move lint to separate job
acolytec3 Aug 16, 2024
8b6eed5
temp: test block test fail without changing pkg-lock
jochem-brouwer Aug 17, 2024
133a474
update build.yml
jochem-brouwer Aug 17, 2024
61f86f1
update build.yml
jochem-brouwer Aug 17, 2024
2e83465
test
jochem-brouwer Aug 17, 2024
f5e046e
test
jochem-brouwer Aug 17, 2024
d79e620
restore correct code (this should pass block test now)
jochem-brouwer Aug 17, 2024
824345f
use run_id
jochem-brouwer Aug 17, 2024
0a1feee
test ethereum-tests with cache
jochem-brouwer Aug 17, 2024
d6412d7
this should install the ethereum-tests in block since the cache will …
jochem-brouwer Aug 17, 2024
614334a
test 2
jochem-brouwer Aug 17, 2024
1b1883d
test
jochem-brouwer Aug 17, 2024
344808c
test ethereum-test failer
jochem-brouwer Aug 17, 2024
7b4034c
restore
jochem-brouwer Aug 17, 2024
2a546d1
test
jochem-brouwer Aug 17, 2024
8b728d9
install ethereum-tests
jochem-brouwer Aug 17, 2024
eb00731
remove ethereum tetss from benchmark
jochem-brouwer Aug 17, 2024
0d2337f
Add valid submodule cache key
acolytec3 Aug 17, 2024
19a9c83
echo key
acolytec3 Aug 17, 2024
ab95a1f
add shell param
acolytec3 Aug 17, 2024
fdbac27
echo that key
acolytec3 Aug 17, 2024
4231d41
add quotes
acolytec3 Aug 17, 2024
6c0633f
add quotes
acolytec3 Aug 17, 2024
ad138c4
fix the key
acolytec3 Aug 17, 2024
b033bae
make submodules recursive
acolytec3 Aug 17, 2024
94083ac
Merge remote-tracking branch 'origin/master' into speedup-ci
acolytec3 Aug 17, 2024
fb25ea5
restore ethereum-tests
acolytec3 Aug 17, 2024
66b4371
fix cache key references
acolytec3 Aug 17, 2024
672c917
make cache fail on miss
acolytec3 Aug 17, 2024
3f92786
update triggers and vm-build [no ci]
acolytec3 Aug 19, 2024
0a0401b
Merge remote-tracking branch 'origin/master' into speedup-ci [no ci]
acolytec3 Aug 19, 2024
bdd7318
try browser with alternatives for ethereum-tests
acolytec3 Aug 19, 2024
f00bd48
check event_name
acolytec3 Aug 19, 2024
46cbb3d
Figure out how event trigger name
acolytec3 Aug 19, 2024
f4c37b7
Only clone if no inputs
acolytec3 Aug 19, 2024
cbd8960
check for submodule cache key
acolytec3 Aug 19, 2024
0dfae80
only restore if dep-cache key exists
acolytec3 Aug 19, 2024
9e71cc4
Fix restore logic
acolytec3 Aug 19, 2024
a9eed8a
fix everything
acolytec3 Aug 19, 2024
6f7c7d5
turn the CI back on
acolytec3 Aug 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
59 changes: 45 additions & 14 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,68 @@
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: [20]
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 --workspaces --if-present
Expand Down
Loading
Loading