Merge remote-tracking branch 'origin/main' into develop

This commit is contained in:
2023-12-22 22:13:38 +01:00
4 changed files with 249 additions and 48 deletions

123
Jenkinsfile vendored
View File

@ -1,62 +1,91 @@
void checkout_project() {
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: [
[credentialsId: 'gitea-jenkins', url: 'https://git.minres.com/SystemC/SystemC-Components-Test.git']
]
])
}
void setup_conan() {
sh'''
pip3 install "conan<2.0" pyucis
conan profile new default --detect --force
conan remote list | grep minres > /dev/null
[ $? ] || conan remote add minres https://git.minres.com/api/packages/Tooling/conan
'''
}
void build_n_test_project() {
sh'''
cmake -S . -B build
cmake --build build -j12
cmake --build build --target test
cmake --build build --target format-check
'''
}
pipeline {
agent any
options {
agent none
options {
// using the Timestamper plugin we can add timestamps to the console log
timestamps()
skipStagesAfterUnstable()
timestamps()
skipStagesAfterUnstable()
}
stages {
stage('SCC test pipeline') {
agent {docker {
image 'ubuntu-riscv'
} }
stages {
stage('checkout') {
steps {
sh 'env'
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: [
[credentialsId: 'gitea-jenkins', url: 'https://git.minres.com/SystemC/SystemC-Components-Test.git']
]
])
sh '''
pip3 install "conan<2.0" pyucis
conan profile new default --detect --force
conan remote list | grep minres > /dev/null
[ $? ] || conan remote add minres https://git.minres.com/api/packages/Tooling/conan
'''
parallel {
stage('U18.04') {
agent {docker { image 'ubuntu-18.04' } }
stages {
stage('Checkout') { steps { checkout_project() }}
stage('Setup') { steps { setup_conan() }}
stage('Build & test') { steps { build_n_test_project() }}
}
}
stage('build & test') {
steps {
sh '''
cmake -S . -B build
cmake --build build -j12
cmake --build build --target test
cmake --build build --target format-check
'''
stage('U20.04') {
agent {docker { image 'ubuntu-20.04' } }
stages {
stage('Checkout') { steps { checkout_project() }}
stage('Setup') { steps { setup_conan() }}
stage('Build & test') { steps { build_n_test_project() }}
}
}
stage('COS7') {
agent {docker { image 'centos7' } }
stages {
stage('Checkout') { steps { checkout_project() }}
stage('Setup') { steps { setup_conan() }}
stage('Build & test') { steps { build_n_test_project() }}
}
}
stage('RCK8') {
agent {docker { image 'rockylinux8' } }
stages {
stage('Checkout') { steps { checkout_project() }}
stage('Setup') { steps { setup_conan() }}
stage('Build & test') { steps { build_n_test_project() }}
}
}
}
}
}
post {
success {
rocketSend ":thumbsup: SCC test run passed, results at ${env.RUN_DISPLAY_URL} "