adds Jenkinsfile
This commit is contained in:
parent
b9c9e15166
commit
5b5feb51f5
40
.cproject
40
.cproject
@ -123,18 +123,6 @@
|
|||||||
<configuration configurationName="Debug"/>
|
<configuration configurationName="Debug"/>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
|
||||||
<buildTargets>
|
|
||||||
<target name="test" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
|
||||||
<buildCommand>make</buildCommand>
|
|
||||||
<buildArguments>$<cmake4eclipse_dyn></buildArguments>
|
|
||||||
<buildTarget>test</buildTarget>
|
|
||||||
<stopOnError>true</stopOnError>
|
|
||||||
<useDefaultCommand>true</useDefaultCommand>
|
|
||||||
<runAllBuilders>true</runAllBuilders>
|
|
||||||
</target>
|
|
||||||
</buildTargets>
|
|
||||||
</storageModule>
|
|
||||||
<storageModule cmakelistsFolder="" moduleId="de.marw.cmake4eclipse.mbs.settings">
|
<storageModule cmakelistsFolder="" moduleId="de.marw.cmake4eclipse.mbs.settings">
|
||||||
<targets>
|
<targets>
|
||||||
<target name=""/>
|
<target name=""/>
|
||||||
@ -155,4 +143,32 @@
|
|||||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
</scannerConfigBuildInfo>
|
</scannerConfigBuildInfo>
|
||||||
</storageModule>
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
|
||||||
|
<buildTargets>
|
||||||
|
<target name="test" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments>$<cmake4eclipse_dyn></buildArguments>
|
||||||
|
<buildTarget>test</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
<target name="format" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments>$<cmake4eclipse_dyn></buildArguments>
|
||||||
|
<buildTarget>format</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
<target name="format-check" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
|
||||||
|
<buildCommand>make</buildCommand>
|
||||||
|
<buildArguments>$<cmake4eclipse_dyn></buildArguments>
|
||||||
|
<buildTarget>format-check</buildTarget>
|
||||||
|
<stopOnError>true</stopOnError>
|
||||||
|
<useDefaultCommand>true</useDefaultCommand>
|
||||||
|
<runAllBuilders>true</runAllBuilders>
|
||||||
|
</target>
|
||||||
|
</buildTargets>
|
||||||
|
</storageModule>
|
||||||
</cproject>
|
</cproject>
|
74
Jenkinsfile
vendored
Normal file
74
Jenkinsfile
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
options {
|
||||||
|
// using the Timestamper plugin we can add timestamps to the console log
|
||||||
|
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
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('build & test') {
|
||||||
|
steps {
|
||||||
|
sh '''
|
||||||
|
cmake -S . -B build
|
||||||
|
cmake --build build -j12
|
||||||
|
cmake --build build --target test
|
||||||
|
cmake --build build --target format-check
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
success {
|
||||||
|
rocketSend ":thumbsup: SCC test run passed, results at ${env.RUN_DISPLAY_URL} "
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
rocketSend ":thumbsdown: SCC test failed, please check ${env.RUN_DISPLAY_URL} "
|
||||||
|
emailext recipientProviders: [culprits(), requestor()],
|
||||||
|
subject: "SCC Test 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>
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user