Skip to content

Commit 342dc1a

Browse files
committed
ci: init hive tests in PRs
1 parent a0277cd commit 342dc1a

File tree

5 files changed

+122
-0
lines changed

5 files changed

+122
-0
lines changed

ci/erigon-nimbus-sync-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- client: nimbus-el
2+
dockerfile:
3+
build_args:
4+
tag: master
5+
- client: erigon

ci/hive.groovy

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/usr/bin/env groovy
2+
3+
pipeline {
4+
agent {
5+
agent { label 'linux' }
6+
}
7+
8+
parameters {
9+
string(
10+
name: 'SIMULATION_NAME',
11+
defaultValue: 'ethereum/eest/consume-rlp',
12+
description: 'The name of the simulation to run'
13+
)
14+
string(
15+
name: 'CLIENT_TAG',
16+
defaultValue: 'master',
17+
description: 'The tag/branch for the client build'
18+
)
19+
string(
20+
name: 'DOCKERFILE_TYPE',
21+
defaultValue: '',
22+
description: 'The dockerfile type (git) or leave empty to avoid rebuild'
23+
)
24+
string(
25+
name: 'FIXTURES_URL',
26+
defaultValue: 'https://github.com/ethereum/execution-spec-tests/releases/download/pectra-devnet-6%40v1.0.0/fixtures_pectra-devnet-6.tar.gz',
27+
description: 'URL to the fixtures tarball'
28+
)
29+
string(
30+
name: 'PARALLELISM',
31+
defaultValue: '40',
32+
description: 'Number of parallel processes to run'
33+
)
34+
booleanParam(
35+
name: 'DOCKER_BUILDOUTPUT',
36+
defaultValue: true,
37+
description: 'Whether to output Docker build logs'
38+
)
39+
}
40+
41+
stages {
42+
stage('sync neth-nimbus') {
43+
steps {
44+
sh """
45+
hive \
46+
--sim "${params.SIMULATION_NAME}" \
47+
--client-file="${WORKSPACE}/ci/neth-nimbus-sync-config.yml" \
48+
--sim.buildarg fixtures=${params.FIXTURES_URL} \
49+
--sim.parallelism=${params.PARALLELISM} \
50+
--sim.loglevel 4 \
51+
--docker.nocache hive/clients/nimbus-el \
52+
--docker.pull true \
53+
${params.DOCKER_BUILDOUTPUT ? '--docker.buildoutput' : ''}
54+
"""
55+
}
56+
}
57+
stage('sync reth-nimbus') {
58+
steps {
59+
sh """
60+
hive \
61+
--sim "${params.SIMULATION_NAME}" \
62+
--client-file="${WORKSPACE}/ci/reth-nimbus-sync-config.yml" \
63+
--sim.buildarg fixtures=${params.FIXTURES_URL} \
64+
--sim.parallelism=${params.PARALLELISM} \
65+
--sim.loglevel 4 \
66+
--docker.nocache hive/clients/nimbus-el \
67+
--docker.pull true \
68+
${params.DOCKER_BUILDOUTPUT ? '--docker.buildoutput' : ''}
69+
"""
70+
}
71+
}
72+
stage('sync erigon-nimbus') {
73+
steps {
74+
sh """
75+
hive \
76+
--sim "${params.SIMULATION_NAME}" \
77+
--client-file="${WORKSPACE}/ci/erigon-nimbus-sync-config.yml" \
78+
--sim.buildarg fixtures=${params.FIXTURES_URL} \
79+
--sim.parallelism=${params.PARALLELISM} \
80+
--sim.loglevel 4 \
81+
--docker.nocache hive/clients/nimbus-el \
82+
--docker.pull true \
83+
${params.DOCKER_BUILDOUTPUT ? '--docker.buildoutput' : ''}
84+
"""
85+
}
86+
}
87+
}
88+
89+
post {
90+
cleanup {
91+
script {
92+
sh './scripts/hive-cleanup.sh'
93+
}
94+
}
95+
always {
96+
archiveArtifacts artifacts: 'simulation-results/**', allowEmptyArchive: true
97+
}
98+
}
99+
}

ci/neth-nimbus-sync-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- client: nimbus-el
2+
dockerfile:
3+
build_args:
4+
tag: master
5+
- client: neth

ci/reth-nimbus-sync-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- client: nimbus-el
2+
dockerfile:
3+
build_args:
4+
tag: master
5+
- client: reth

scripts/hive-cleanup.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
hive -cleanup -cleanup.older-than 5m
4+
5+
# for dangling Docker resources
6+
docker image prune -f
7+
docker volume prune -f
8+
docker network prune -f

0 commit comments

Comments
 (0)