-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
109 lines (104 loc) · 3.64 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
def getBranch() {
if (env.BRANCH_NAME != null && !env.BRANCH_NAME.isEmpty() ) {
return env.BRANCH_NAME
} else {
return 'develop'
}
}
void checkout_riscv_vp() {
sh("rm -rf *")
checkout([
$class: 'GitSCM',
branches: [
[name: 'refs/heads/' + getBranch()]
],
extensions: [
[$class: 'CleanBeforeCheckout'],
[$class: 'SubmoduleOption',
disableSubmodules: false,
recursiveSubmodules: true,
trackingSubmodules: false,
parentCredentials: true,
shallow: true
]
],
submoduleCfg: [],
userRemoteConfigs: [
[url: 'https://github.com/eyck/RISCV-VP.git']
]
])
}
void build_riscv_vp() {
try {
sh("conan profile new default --detect --force")
sh("conan profile update settings.compiler.libcxx=libstdc++11 default")
sh("conan remote add minres https://git.minres.com/api/packages/Tooling/conan --force")
sh("conan --version && cmake --version")
}
catch (exc) {
echo 'Conan configured'
}
sh("rm -rf build")
sh("git submodule update --recursive")
sh("cmake -S . -B build --preset Release -DWITH_TCC=OFF && cmake --build build -j16")
fingerprint 'build/src/riscv-vp'
}
pipeline {
agent none
options {
// using the Timestamper plugin we can add timestamps to the console log
timestamps()
skipStagesAfterUnstable()
}
stages {
stage('RISCV-VP pipeline') {
parallel {
stage('ubuntu20'){
agent {docker { image 'ubuntu-20.04' } }
stages {
stage('Checkout on Ubuntu20.04') { steps { checkout_riscv_vp() }}
stage('Build') { steps { build_riscv_vp() } }
}
}
stage('ubuntu22'){
agent {docker { image 'ubuntu-22.04' } }
stages {
stage('Checkout on Ubuntu22.04') { steps { checkout_riscv_vp() }}
stage('Build') { steps { build_riscv_vp() } }
}
}
stage('CentOS7'){
agent {docker { image 'centos7' } }
stages {
stage('Checkout on Ubuntu') { steps {checkout_riscv_vp()}}
stage('Build') { steps {build_riscv_vp()}
}
}
}
stage('RockyLinux8'){
agent {docker { image 'rockylinux8' } }
stages {
stage('Checkout on Ubuntu') { steps {checkout_riscv_vp()}}
stage('Build') { steps {build_riscv_vp()}
}
}
}
}
}
}
post {
success {
rocketSend ":thumbsup: RISCV-VP verification run passed, results at ${env.RUN_DISPLAY_URL} "
}
failure {
archiveArtifacts artifacts: 'failed_seeds_*.txt', followSymlinks: false, onlyIfSuccessful: false
rocketSend ":thumbsdown: RISCV-VP verification failed, please check ${env.RUN_DISPLAY_URL} "
emailext recipientProviders: [culprits(), requestor()],
subject: "RISCV-VP Pipeline Failed: ${currentBuild.fullDisplayName}",
body: """
<p>Build Status: ${currentBuild.currentResult}</p>
<p> Check logs at <a href='${env.BUILD_URL}console'> Build Console Logs </a> or at <a href='${env.RUN_DISPLAY_URL}'> Overview </a></p>
"""
}
}
}