Skip to content

Commit c3213a0

Browse files
committed
ci: init hive tests in PRs
adds a CI job in jenkins to run ethereum/sync simulations
1 parent cacde70 commit c3213a0

File tree

5 files changed

+172
-0
lines changed

5 files changed

+172
-0
lines changed

ci/erigon-nimbus-sync-config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2024-2025 Status Research & Development GmbH
2+
# Licensed under either of
3+
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
4+
# http://www.apache.org/licenses/LICENSE-2.0)
5+
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
6+
# http://opensource.org/licenses/MIT)
7+
# at your option. This file may not be copied, modified, or distributed except
8+
# according to those terms.
9+
10+
- client: nimbus-el
11+
dockerfile:
12+
build_args:
13+
tag: master
14+
- client: erigon

ci/hive.groovy

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
#!/usr/bin/env groovy
2+
3+
/*
4+
* Copyright (c) 2019-2025 Status Research & Development GmbH
5+
* Licensed and distributed under either of
6+
* * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
7+
* * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
8+
* at your option. This file may not be copied, modified, or distributed except according to those terms.
9+
*/
10+
11+
library 'status-jenkins-lib@v1.9.24'
12+
13+
pipeline {
14+
agent { label 'linux-01' }
15+
16+
parameters {
17+
string(
18+
name: 'SIMULATION_NAME',
19+
defaultValue: 'ethereum/sync',
20+
description: 'The name of the simulation to run'
21+
)
22+
string(
23+
name: 'CLIENT_TAG',
24+
defaultValue: 'master',
25+
description: 'The tag/branch for the client build'
26+
)
27+
string(
28+
name: 'DOCKERFILE_TYPE',
29+
defaultValue: '',
30+
description: 'The dockerfile type (git) or leave empty to avoid rebuild'
31+
)
32+
string(
33+
name: 'PARALLELISM',
34+
defaultValue: '40',
35+
description: 'Number of parallel processes to run'
36+
)
37+
string(
38+
name: 'TIMEOUT_MINUTES',
39+
defaultValue: '20',
40+
description: 'Timeout for each stage in minutes'
41+
)
42+
booleanParam(
43+
name: 'DOCKER_BUILDOUTPUT',
44+
defaultValue: true,
45+
description: 'Whether to output Docker build logs'
46+
)
47+
}
48+
49+
stages {
50+
stage('Run Hive Tests') {
51+
parallel {
52+
stage('sync neth-nimbus') {
53+
steps {
54+
timeout(time: params.TIMEOUT_MINUTES.toInteger(), unit: 'MINUTES') {
55+
dir('/home/jenkins/hive/') {
56+
sh """
57+
hive \
58+
--sim "${params.SIMULATION_NAME}" \
59+
--client-file="${WORKSPACE}/ci/neth-nimbus-sync-config.yml" \
60+
--sim.parallelism=${params.PARALLELISM} \
61+
--sim.loglevel 4 \
62+
--docker.nocache hive/clients/nimbus-el \
63+
--docker.pull true \
64+
${params.DOCKER_BUILDOUTPUT ? '--docker.buildoutput' : ''}
65+
"""
66+
}
67+
}
68+
}
69+
}
70+
stage('sync reth-nimbus') {
71+
steps {
72+
timeout(time: params.TIMEOUT_MINUTES.toInteger(), unit: 'MINUTES') {
73+
dir('/home/jenkins/hive/') {
74+
sh """
75+
hive \
76+
--sim "${params.SIMULATION_NAME}" \
77+
--client-file="${WORKSPACE}/ci/reth-nimbus-sync-config.yml" \
78+
--sim.parallelism=${params.PARALLELISM} \
79+
--sim.loglevel 4 \
80+
--docker.nocache hive/clients/nimbus-el \
81+
--docker.pull true \
82+
${params.DOCKER_BUILDOUTPUT ? '--docker.buildoutput' : ''}
83+
"""
84+
}
85+
}
86+
}
87+
}
88+
stage('sync erigon-nimbus') {
89+
steps {
90+
timeout(time: params.TIMEOUT_MINUTES.toInteger(), unit: 'MINUTES') {
91+
dir('/home/jenkins/hive/') {
92+
sh """
93+
hive \
94+
--sim "${params.SIMULATION_NAME}" \
95+
--client-file="${WORKSPACE}/ci/erigon-nimbus-sync-config.yml" \
96+
--sim.parallelism=${params.PARALLELISM} \
97+
--sim.loglevel 4 \
98+
--docker.nocache hive/clients/nimbus-el \
99+
--docker.pull true \
100+
${params.DOCKER_BUILDOUTPUT ? '--docker.buildoutput' : ''}
101+
"""
102+
}
103+
}
104+
}
105+
}
106+
}
107+
}
108+
}
109+
110+
post {
111+
success { script { github.notifyPR(true) } }
112+
failure { script { github.notifyPR(false) } }
113+
cleanup {
114+
script {
115+
sh './scripts/hive-cleanup.sh'
116+
}
117+
}
118+
always {
119+
archiveArtifacts artifacts: 'simulation-results/**', allowEmptyArchive: true
120+
}
121+
}
122+
}

ci/neth-nimbus-sync-config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2024-2025 Status Research & Development GmbH
2+
# Licensed under either of
3+
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
4+
# http://www.apache.org/licenses/LICENSE-2.0)
5+
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
6+
# http://opensource.org/licenses/MIT)
7+
# at your option. This file may not be copied, modified, or distributed except
8+
# according to those terms.
9+
10+
- client: nimbus-el
11+
dockerfile:
12+
build_args:
13+
tag: master
14+
- client: nethermind

ci/reth-nimbus-sync-config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright (c) 2024-2025 Status Research & Development GmbH
2+
# Licensed under either of
3+
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
4+
# http://www.apache.org/licenses/LICENSE-2.0)
5+
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
6+
# http://opensource.org/licenses/MIT)
7+
# at your option. This file may not be copied, modified, or distributed except
8+
# according to those terms.
9+
10+
- client: nimbus-el
11+
dockerfile:
12+
build_args:
13+
tag: master
14+
- 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)