forked from Fantom-foundation/Aida
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
153 lines (135 loc) · 6.84 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
pipeline {
agent { label 'quick' }
options {
timestamps ()
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds(abortPrevious: true)
}
environment {
GOROOT = '/usr/lib/go-1.21/'
STORAGE = '--db-impl carmen --db-variant go-file --carmen-schema 3'
PRIME = '--update-buffer-size 4000'
VM = '--vm-impl lfvm'
AIDADB = '--aida-db=/mnt/aida-db-central/aida-db'
TMPDB = '--db-tmp=/mnt/tmp-disk'
DBSRC = '--db-src=/mnt/tmp-disk/state_db_carmen_go-file_${TOBLOCK}'
TRACEDIR = 'tracefiles'
FROMBLOCK = 'opera'
TOBLOCK = '4600000'
}
stages {
stage('Check formatting') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh 'diff=`${GOROOT}/bin/gofmt -s -d .`; echo "$diff"; test -z "$diff"'
}
}
}
stage('Build') {
steps {
script {
currentBuild.description = "Building on ${env.NODE_NAME}"
}
sh "git submodule update --init --recursive"
sh "make all"
}
}
stage('Run unit tests') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh 'go test ./...'
}
}
}
stage('aida-vm') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm ${VM} ${AIDADB} --cpu-profile cpu-profile.dat --workers 32 --validate-tx ${FROMBLOCK} ${TOBLOCK}"
}
sh "rm -rf *.dat"
}
}
stage('aida-fuzzing') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-stochastic-sdb replay ${STORAGE} ${TMPDB} --db-shadow-impl geth 50 data/simulation_uniform.json"
}
}
}
stage('aida-sdb record') {
steps {
sh "mkdir -p ${TRACEDIR}"
sh "rm -rf ${TRACEDIR}/*"
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-sdb record --cpu-profile cpu-profile-0.dat --trace-file ${TRACEDIR}/trace-0.dat ${AIDADB} ${FROMBLOCK} ${FROMBLOCK}+1000"
sh "build/aida-sdb record --cpu-profile cpu-profile-1.dat --trace-file ${TRACEDIR}/trace-1.dat ${AIDADB} ${FROMBLOCK}+1001 ${FROMBLOCK}+2000"
sh "build/aida-sdb record --cpu-profile cpu-profile-2.dat --trace-file ${TRACEDIR}/trace-2.dat ${AIDADB} ${FROMBLOCK}+2001 ${TOBLOCK}"
}
}
}
stage('aida-sdb replay') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-sdb replay ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} --shadow-db --db-shadow-impl geth --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --trace-file ${TRACEDIR}/trace-0.dat ${FROMBLOCK} ${TOBLOCK}"
sh "build/aida-sdb replay ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --trace-dir ${TRACEDIR} ${FROMBLOCK} ${TOBLOCK}"
}
sh "rm -rf ${TRACEDIR}"
}
}
stage('aida-vm-sdb s5-archive+validate-state-hash') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} --db-impl carmen --validate-state-hash --archive --archive-variant s5 --carmen-schema 5 --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} "
}
sh "rm -rf *.dat"
}
}
stage('aida-vm-sdb validate-tx') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} --db-impl carmen --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} "
}
sh "rm -rf *.dat"
}
}
stage('aida-vm-sdb archive-inquirer') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} --archive --archive-query-rate 5000 --db-impl carmen --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} "
}
sh "rm -rf *.dat"
}
}
stage('aida-vm-sdb keep-db') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm-sdb substate ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} --keep-db --archive --archive-variant ldb --db-impl carmen --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} "
}
sh "rm -rf *.dat"
}
}
stage('aida-vm-sdb db-src') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm-sdb substate ${VM} ${DBSRC} ${AIDADB} --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure 4600001 4610000"
}
sh "rm -rf *.dat"
}
}
stage('aida-vm-adb validate-tx') {
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') {
sh "build/aida-vm-adb ${AIDADB} ${DBSRC} --cpu-profile cpu-profile.dat --validate-tx ${FROMBLOCK} ${TOBLOCK}"
}
sh "rm -rf *.dat"
}
}
stage('tear-down') {
steps {
sh "make clean"
sh "rm -rf *.dat ${TRACEDIR}"
sh "rm -rf /var/opera/Aida/dbtmpjenkins/state_db_carmen_go-file_${TOBLOCK}"
}
}
}
}