updates Jenkinsfile

This commit is contained in:
2024-07-01 08:43:44 +02:00
parent 9b4d9b5996
commit 14a1e8b5b9

34
Jenkinsfile vendored
View File

@@ -6,7 +6,7 @@ def getBranch() {
} }
} }
void checkout_tgc_vp() { void checkout_riscv_vp() {
sh("rm -rf *") sh("rm -rf *")
checkout([ checkout([
$class: 'GitSCM', $class: 'GitSCM',
@@ -25,12 +25,12 @@ void checkout_tgc_vp() {
], ],
submoduleCfg: [], submoduleCfg: [],
userRemoteConfigs: [ userRemoteConfigs: [
[url: 'https://github.com/Minres/TGC-VP.git'] [url: 'https://github.com/eyck/RISCV-VP.git']
] ]
]) ])
} }
void build_tgc_vp() { void build_riscv_vp() {
try { try {
sh("conan profile new default --detect --force") sh("conan profile new default --detect --force")
sh("conan profile update settings.compiler.libcxx=libstdc++11 default") sh("conan profile update settings.compiler.libcxx=libstdc++11 default")
@@ -42,8 +42,8 @@ void build_tgc_vp() {
} }
sh("rm -rf build") sh("rm -rf build")
sh("git submodule update --recursive") sh("git submodule update --recursive")
sh("cmake -S . -B build -DWITH_TCC=OFF && cmake --build build -j16") sh("cmake -S . -B build --preset Release -DWITH_TCC=OFF && cmake --build build -j16")
fingerprint 'build/src/tgc-vp' fingerprint 'build/src/riscv-vp'
} }
pipeline { pipeline {
@@ -56,35 +56,35 @@ pipeline {
} }
stages { stages {
stage('TGC-VP pipeline') { stage('RISCV-VP pipeline') {
parallel { parallel {
stage('ubuntu20'){ stage('ubuntu20'){
agent {docker { image 'ubuntu-20.04' } } agent {docker { image 'ubuntu-20.04' } }
stages { stages {
stage('Checkout on Ubuntu20.04') { steps { checkout_tgc_vp() }} stage('Checkout on Ubuntu20.04') { steps { checkout_riscv_vp() }}
stage('Build') { steps { build_tgc_vp() } } stage('Build') { steps { build_riscv_vp() } }
} }
} }
stage('ubuntu22'){ stage('ubuntu22'){
agent {docker { image 'ubuntu-22.04' } } agent {docker { image 'ubuntu-22.04' } }
stages { stages {
stage('Checkout on Ubuntu22.04') { steps { checkout_tgc_vp() }} stage('Checkout on Ubuntu22.04') { steps { checkout_riscv_vp() }}
stage('Build') { steps { build_tgc_vp() } } stage('Build') { steps { build_riscv_vp() } }
} }
} }
stage('CentOS7'){ stage('CentOS7'){
agent {docker { image 'centos7' } } agent {docker { image 'centos7' } }
stages { stages {
stage('Checkout on Ubuntu') { steps {checkout_tgc_vp()}} stage('Checkout on Ubuntu') { steps {checkout_riscv_vp()}}
stage('Build') { steps {build_tgc_vp()} stage('Build') { steps {build_riscv_vp()}
} }
} }
} }
stage('RockyLinux8'){ stage('RockyLinux8'){
agent {docker { image 'rockylinux8' } } agent {docker { image 'rockylinux8' } }
stages { stages {
stage('Checkout on Ubuntu') { steps {checkout_tgc_vp()}} stage('Checkout on Ubuntu') { steps {checkout_riscv_vp()}}
stage('Build') { steps {build_tgc_vp()} stage('Build') { steps {build_riscv_vp()}
} }
} }
} }
@@ -93,13 +93,13 @@ pipeline {
} }
post { post {
success { success {
rocketSend ":thumbsup: TGC-VP verification run passed, results at ${env.RUN_DISPLAY_URL} " rocketSend ":thumbsup: RISCV-VP verification run passed, results at ${env.RUN_DISPLAY_URL} "
} }
failure { failure {
archiveArtifacts artifacts: 'failed_seeds_*.txt', followSymlinks: false, onlyIfSuccessful: false archiveArtifacts artifacts: 'failed_seeds_*.txt', followSymlinks: false, onlyIfSuccessful: false
rocketSend ":thumbsdown: TGC-VP verification failed, please check ${env.RUN_DISPLAY_URL} " rocketSend ":thumbsdown: RISCV-VP verification failed, please check ${env.RUN_DISPLAY_URL} "
emailext recipientProviders: [culprits(), requestor()], emailext recipientProviders: [culprits(), requestor()],
subject: "TGC-VP Pipeline Failed: ${currentBuild.fullDisplayName}", subject: "RISCV-VP Pipeline Failed: ${currentBuild.fullDisplayName}",
body: """ body: """
<p>Build Status: ${currentBuild.currentResult}</p> <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> <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>