-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathJenkinsfile
98 lines (98 loc) · 3.43 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
pipeline {
agent {
dockerfile {
label 'docker'
additionalBuildArgs '--build-arg KIELE_COMMIT=$(cat ext/kiele_release | cut --delimiter="-" --field="2") --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g)'
}
}
options { ansiColor('xterm') }
stages {
stage("Init title") {
when { changeRequest() }
steps { script { currentBuild.displayName = "PR ${env.CHANGE_ID}: ${env.CHANGE_TITLE}" } }
}
stage('Build') {
steps {
sh '''
touch prerelease.txt
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j`nproc`
cd ..
'''
}
}
stage('Compilation Tests') {
steps { sh './test/ieleCmdlineTests.sh' }
}
stage('Regression Tests') {
stages {
stage('Checkout code') { steps { dir('iog-pm') { git branch: 'milestone4', url: '[email protected]:runtimeverification/iog-pm.git' } } }
stage('Milestone4 Tests') {
environment {
CONTRACTLIST = "${env.WORKSPACE}/test/milestone4-contracts.txt"
FAILING = "${env.WORKSPACE}/test/milestone4-contracts.failing"
PATCH = "${env.WORKSPACE}/test/milestone4-types.patch"
}
steps {
dir('iog-pm') {
sh '''
git submodule init
git submodule update --depth 1
./fetch-all-modules.sh --verbose
patch -p1 < ${PATCH}
grep -v -x -F -f ${FAILING} ${CONTRACTLIST} > contracts.txt
export SOLC=${WORKSPACE}/build/solc/isolc
./run-all-scripts.sh --filter contracts.txt --verbose --verbose
'''
}
}
}
}
}
stage('Execution Tests') {
steps {
sh '''
kiele vm --port 9001 &
kiele_pid=$!
sleep 3
/usr/lib/kiele/iele-test-client build/ipcfile 9001 &
testnode_pid=$!
sleep 3
./build/test/soltest --no_result_code \
--report_sink=build/report.xml \
--report_level=detailed \
--report_format=XML \
--log_sink=build/log.xml \
--log_level=all \
--log_format=XML \
`cat test/failing-exec-tests` \
`cat test/out-of-scope-exec-tests` \
`cat test/unimplemented-features-tests` \
-- \
--enforce-no-yul-ewasm \
--ipcpath build/ipcfile \
--testpath test
iconv --from-code iso-8859-1 \
--to-code utf-8 \
build/log.xml \
-o build/log-utf8.xml
mv -f build/log-utf8.xml build/log.xml
xmllint --xpath "//TestCase[@assertions_failed!=@expected_failures]" build/report.xml && false
xmllint --xpath '//TestCase[@result="skipped"]' build/report.xml && false
cd build
gcovr --xml --root .. --exclude ../test -o coverage.xml
kill $testnode_pid $kiele_pid
'''
}
}
}
post {
always {
archiveArtifacts artifacts: 'build/log.xml'
archiveArtifacts artifacts: 'build/report.xml'
archiveArtifacts artifacts: 'build/coverage.xml'
}
}
}