Skip to content

Commit ae16663

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

File tree

5 files changed

+123
-0
lines changed

5 files changed

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

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)