-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
// Aida CI test runs aida-sdb, aida-vm-sdb and aida-vm at various fork blocks | ||
|
||
pipeline { | ||
agent { label 'db-small-nvme' } | ||
|
||
options { | ||
timestamps () | ||
timeout(time: 3, unit: 'DAYS') | ||
disableConcurrentBuilds(abortPrevious: false) | ||
} | ||
|
||
environment { | ||
GOROOT = '/usr/lib/go-1.21/' | ||
GOGC = '50' | ||
GOMEMLIMIT = '120GiB' | ||
|
||
CARMEN = '--db-impl carmen --db-variant go-file --carmen-schema 3' | ||
PRIMEBUFFER = '4096' | ||
TMPDB = '/mnt/tmp-disk' | ||
AIDADB = '/mnt/aida-db-central/aida-db' | ||
BLOCKS = 'zero,opera,london,berlin,lastpatch' | ||
INTERVAL = '1000000' | ||
} | ||
|
||
stages { | ||
stage('Build') { | ||
steps { | ||
script { | ||
currentBuild.description = 'Building on ${env.NODE_NAME}' | ||
} | ||
|
||
checkout scmGit( | ||
branches: [[name: 'develop']], | ||
userRemoteConfigs: [[url: 'https://github.com/Fantom-foundation/Aida.git']] | ||
) | ||
sh 'git submodule deinit -f --all' | ||
sh 'git submodule update --init --recursive' | ||
sh 'make clean' | ||
sh 'make all' | ||
} | ||
} | ||
|
||
stage('aida-vm-replay') { | ||
steps { | ||
sh 'rm -f *.cpuprofile *.memprofile *.log' | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
script { | ||
BLOCKS.tokenize(',').each { block ->; | ||
sh """build/aida-vm --vm-impl lfvm \ | ||
--aida-db ${AIDADB} \ | ||
--workers 32 \ | ||
--validate-tx \ | ||
--cpu-profile=${BUILD_NUMBER}-${STAGE_NAME}-LFVM-${block}.cpuprofile \ | ||
${block} ${block}+${INTERVAL}""" | ||
sh """build/aida-vm --vm-impl geth \ | ||
--aida-db ${AIDADB} \ | ||
--workers 32 \ | ||
--validate-tx \ | ||
--cpu-profile=${BUILD_NUMBER}-${STAGE_NAME}-GETHVM-${block}.cpuprofile \ | ||
${block} ${block}+${INTERVAL}""" | ||
} | ||
} | ||
} | ||
archiveArtifacts artifacts: '*.cpuprofile' | ||
} | ||
} | ||
|
||
stage('aida-fuzzing') { | ||
steps { | ||
sh 'rm -f *.cpuprofile *.memprofile *.log *.dat' | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
sh """build/aida-stochastic-sdb replay ${CARMEN} \ | ||
--db-tmp ${TMPDB} \ | ||
--db-shadow-impl geth \ | ||
1000 data/simulation_uniform.json""" | ||
} | ||
} | ||
} | ||
|
||
stage('aida-sdb-record') { | ||
steps { | ||
sh 'mkdir -p tracefiles' | ||
sh 'rm -rf tracefiles/*' | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
sh 'build/aida-sdb record --cpu-profile cpu-profile-0.dat --trace-file tracefiles/trace-0.dat --aida-db ${AIDADB} opera opera+100000' | ||
sh 'build/aida-sdb record --cpu-profile cpu-profile-1.dat --trace-file tracefiles/trace-1.dat --aida-db ${AIDADB} opera+100001 opera+200000' | ||
sh 'build/aida-sdb record --cpu-profile cpu-profile-2.dat --trace-file tracefiles/trace-2.dat --aida-db ${AIDADB} opera+200001 opera+300000' | ||
} | ||
} | ||
} | ||
|
||
stage('aida-sdb-replay') { | ||
steps { | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
// one trace file | ||
sh """build/aida-sdb replay ${CARMEN} \ | ||
--vm-impl lfvm \ | ||
--db-tmp ${TMPDB} \ | ||
--aida-db ${AIDADB} \ | ||
--update-buffer-size ${PRIMEBUFFER} \ | ||
--shadow-db --db-shadow-impl geth \ | ||
--cpu-profile cpu-profile.dat \ | ||
--memory-profile mem-profile.dat \ | ||
--memory-breakdown \ | ||
--trace-file tracefiles/trace-0.dat opera opera+100000""" | ||
// multiple trace files | ||
sh """build/aida-sdb replay ${CARMEN} \ | ||
--vm-impl lfvm \ | ||
--db-tmp ${TMPDB} \ | ||
--aida-db ${AIDADB} \ | ||
--update-buffer-size ${PRIMEBUFFER} \ | ||
--shadow-db --db-shadow-impl geth \ | ||
--cpu-profile cpu-profile.dat \ | ||
--memory-profile mem-profile.dat \ | ||
--memory-breakdown \ | ||
--trace-dir tracefiles opera opera+300000""" | ||
} | ||
sh 'rm -rf tracefiles' | ||
} | ||
} | ||
|
||
stage('aida-vm-sdb-carmen') { | ||
steps { | ||
sh 'rm -f *.cpuprofile *.memprofile *.log' | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
script { | ||
BLOCKS.tokenize(',').each { block ->; | ||
sh """build/aida-vm-sdb substate ${CARMEN} \ | ||
--vm-impl lfvm \ | ||
--db-tmp ${TMPDB} \ | ||
--aida-db ${AIDADB} \ | ||
--update-buffer-size ${PRIMEBUFFER} \ | ||
--validate-tx \ | ||
--cpu-profile=${BUILD_NUMBER}-${STAGE_NAME}-${block}.cpuprofile \ | ||
--memory-profile=${BUILD_NUMBER}-${STAGE_NAME}-${block}.memprofile \ | ||
${block} ${block}+${INTERVAL}""" | ||
} | ||
} | ||
} | ||
archiveArtifacts artifacts: '*.cpuprofile,*.memprofile,*.log' | ||
} | ||
} | ||
|
||
stage('aida-vm-sdb-archive') { | ||
steps { | ||
sh 'rm -f *.cpuprofile *.memprofile *.log' | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
sh """build/aida-vm-sdb substate ${CARMEN} \ | ||
--vm-impl lfvm \ | ||
--db-tmp ${TMPDB} \ | ||
--aida-db ${AIDADB} \ | ||
--update-buffer-size ${PRIMEBUFFER} \ | ||
--keep-db \ | ||
--archive --archive-variant ldb \ | ||
--cpu-profile=${BUILD_NUMBER}-${STAGE_NAME}.cpuprofile \ | ||
--memory-profile=${BUILD_NUMBER}-${STAGE_NAME}.memprofile \ | ||
43000000 44000000""" | ||
} | ||
archiveArtifacts artifacts: '*.cpuprofile,*.memprofile,*.log' | ||
} | ||
} | ||
|
||
stage('aida-vm-adb') { | ||
steps { | ||
sh 'rm -f *.cpuprofile *.memprofile *.log' | ||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { | ||
sh """build/aida-vm-adb --vm-impl lfvm \ | ||
--aida-db ${AIDADB} \ | ||
--workers 20 \ | ||
--db-src ${TMPDB}/state_db_carmen_go-file_44000000 \ | ||
--cpu-profile=${BUILD_NUMBER}-${STAGE_NAME}.cpuprofile \ | ||
43000000 44000000""" | ||
} | ||
sh 'rm -fr ${TMPDB}/state_db_carmen_go-file_44000000' | ||
archiveArtifacts artifacts: '*.cpuprofile' | ||
} | ||
} | ||
|
||
stage('teardown') { | ||
steps { | ||
sh 'make clean' | ||
} | ||
} | ||
} | ||
} |