2020-03-19 07:45:00 +08:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
2020-03-05 20:16:18 +08:00
|
|
|
pipeline
|
|
|
|
{
|
|
|
|
agent none
|
2018-05-07 23:33:43 +08:00
|
|
|
|
2020-03-05 20:16:18 +08:00
|
|
|
options
|
|
|
|
{
|
2018-07-10 22:26:05 +08:00
|
|
|
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
|
2018-05-08 23:01:04 +08:00
|
|
|
}
|
|
|
|
|
2020-03-05 20:16:18 +08:00
|
|
|
stages
|
|
|
|
{
|
2020-03-19 07:45:00 +08:00
|
|
|
stage('Creating nodes')
|
|
|
|
{
|
|
|
|
agent { label "master" }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
script
|
|
|
|
{
|
|
|
|
JOB_ID = "${env.BUILD_TAG}"
|
2020-03-20 00:43:13 +08:00
|
|
|
jenkinsLib = load("/home/jenkins/jenkins424.groovy")
|
2020-03-19 07:45:00 +08:00
|
|
|
|
2020-03-19 21:38:04 +08:00
|
|
|
jenkinsLib.CreateUbuntuBuildNode(JOB_ID)
|
|
|
|
jenkinsLib.CreateWindowsBuildNode(JOB_ID)
|
2020-03-19 07:45:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Building CARLA')
|
2020-03-05 20:16:18 +08:00
|
|
|
{
|
|
|
|
parallel
|
|
|
|
{
|
|
|
|
stage('ubuntu')
|
|
|
|
{
|
2020-03-19 07:45:00 +08:00
|
|
|
agent { label "ubuntu && build && ${JOB_ID}" }
|
2020-03-05 20:16:18 +08:00
|
|
|
environment
|
|
|
|
{
|
2020-03-20 00:26:35 +08:00
|
|
|
UE4_ROOT = '/home/jenkins/UnrealEngine_4.24'
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
stages
|
|
|
|
{
|
|
|
|
stage('ubuntu setup')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'make setup'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu build')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'make LibCarla'
|
|
|
|
sh 'make PythonAPI'
|
|
|
|
sh 'make CarlaUE4Editor'
|
|
|
|
sh 'make examples'
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
archiveArtifacts 'PythonAPI/carla/dist/*.egg'
|
|
|
|
stash includes: 'PythonAPI/carla/dist/*.egg', name: 'ubuntu_eggs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu unit tests')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'make check ARGS="--all --xml"'
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
junit 'Build/test-results/*.xml'
|
|
|
|
archiveArtifacts 'profiler.csv'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu retrieve content')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh './Update.sh'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu package')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'make package'
|
|
|
|
sh 'make package ARGS="--packages=AdditionalMaps --clean-intermediate"'
|
|
|
|
sh 'make examples ARGS="localhost 3654"'
|
|
|
|
}
|
2020-03-19 07:45:00 +08:00
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
2020-03-05 20:16:18 +08:00
|
|
|
archiveArtifacts 'Dist/*.tar.gz'
|
|
|
|
stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package'
|
|
|
|
stash includes: 'Examples/', name: 'ubuntu_examples'
|
|
|
|
}
|
2020-03-19 07:45:00 +08:00
|
|
|
success
|
|
|
|
{
|
|
|
|
node('master')
|
|
|
|
{
|
|
|
|
script
|
|
|
|
{
|
|
|
|
JOB_ID = "${env.BUILD_TAG}"
|
2020-03-20 00:43:13 +08:00
|
|
|
jenkinsLib = load("/home/jenkins/jenkins424.groovy")
|
2020-03-19 07:45:00 +08:00
|
|
|
|
2020-03-19 21:38:04 +08:00
|
|
|
jenkinsLib.CreateUbuntuTestNode(JOB_ID)
|
2020-03-19 07:45:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu smoke tests')
|
|
|
|
{
|
2020-03-19 07:45:00 +08:00
|
|
|
agent { label "ubuntu && gpu && ${JOB_ID}" }
|
2020-03-05 20:16:18 +08:00
|
|
|
steps
|
|
|
|
{
|
|
|
|
unstash name: 'ubuntu_eggs'
|
|
|
|
unstash name: 'ubuntu_package'
|
|
|
|
unstash name: 'ubuntu_examples'
|
|
|
|
sh 'tar -xvzf Dist/CARLA*.tar.gz -C Dist/'
|
|
|
|
sh 'DISPLAY= ./Dist/CarlaUE4.sh -opengl --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
|
|
|
|
sh 'make smoke_tests ARGS="--xml"'
|
|
|
|
sh 'make run-examples ARGS="localhost 3654"'
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
archiveArtifacts 'CarlaUE4.log'
|
|
|
|
junit 'Build/test-results/smoke-tests-*.xml'
|
2020-03-13 16:24:46 +08:00
|
|
|
deleteDir()
|
2020-03-19 07:45:00 +08:00
|
|
|
node('master')
|
|
|
|
{
|
|
|
|
script
|
|
|
|
{
|
|
|
|
JOB_ID = "${env.BUILD_TAG}"
|
2020-03-20 00:43:13 +08:00
|
|
|
jenkinsLib = load("/home/jenkins/jenkins424.groovy")
|
2020-03-19 07:45:00 +08:00
|
|
|
|
2020-03-19 21:38:04 +08:00
|
|
|
jenkinsLib.DeleteUbuntuTestNode(JOB_ID)
|
2020-03-19 07:45:00 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu deploy')
|
|
|
|
{
|
|
|
|
when { anyOf { branch "master"; buildingTag() } }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'git checkout .'
|
|
|
|
sh 'make deploy ARGS="--replace-latest --docker-push"'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu Doxygen')
|
|
|
|
{
|
|
|
|
when { anyOf { branch "master"; buildingTag() } }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'rm -rf ~/carla-simulator.github.io/Doxygen'
|
2020-03-06 21:38:22 +08:00
|
|
|
sh '''
|
|
|
|
cd ~/carla-simulator.github.io
|
2020-03-13 16:24:46 +08:00
|
|
|
git fetch
|
2020-03-06 21:38:22 +08:00
|
|
|
git checkout -B master origin/master
|
|
|
|
'''
|
|
|
|
sh 'make docs'
|
2020-03-05 20:16:18 +08:00
|
|
|
sh 'cp -rf ./Doxygen ~/carla-simulator.github.io/'
|
|
|
|
sh '''
|
|
|
|
cd ~/carla-simulator.github.io
|
|
|
|
git add Doxygen
|
|
|
|
git commit -m "Updated c++ docs" || true
|
|
|
|
git push
|
|
|
|
'''
|
|
|
|
}
|
2020-03-19 07:45:00 +08:00
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
2020-03-19 07:45:00 +08:00
|
|
|
stage('Cleaning')
|
2020-03-13 16:24:46 +08:00
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
2019-03-08 21:41:23 +08:00
|
|
|
}
|
2020-03-19 21:38:04 +08:00
|
|
|
stage('windows')
|
|
|
|
{
|
|
|
|
agent { label "windows && build && ${JOB_ID}" }
|
|
|
|
environment
|
|
|
|
{
|
2020-03-20 00:26:35 +08:00
|
|
|
UE4_ROOT = 'C:\\Program Files\\Epic Games\\UE_4.24'
|
2020-03-19 21:38:04 +08:00
|
|
|
}
|
|
|
|
stages
|
|
|
|
{
|
|
|
|
stage('windows setup')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
make setup
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('windows build')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
make LibCarla
|
|
|
|
"""
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
make PythonAPI
|
|
|
|
"""
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
make CarlaUE4Editor
|
|
|
|
"""
|
|
|
|
// make examples
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
archiveArtifacts 'PythonAPI/carla/dist/*.egg'
|
|
|
|
stash includes: 'PythonAPI/carla/dist/*.egg', name: 'windows_eggs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// stage('windows unit tests')
|
|
|
|
// {
|
|
|
|
// steps { bat 'rem Not Implemented'}
|
|
|
|
// }
|
|
|
|
stage('windows retrieve content')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
call Update.bat
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('windows package')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
make package
|
|
|
|
"""
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
|
|
|
make package ARGS="--packages=AdditionalMaps --clean"
|
|
|
|
"""
|
|
|
|
// make examples ARGS="localhost 3654"
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts 'Build/UE4Carla/*.zip'
|
|
|
|
// stash includes: 'Build/UE4Carla/CARLA*.zip', name: 'windows_package'
|
|
|
|
// stash includes: 'Examples/', name: 'windows_examples'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// stage('windows smoke test')
|
|
|
|
// {
|
|
|
|
// steps { bat 'rem Not Implemented'}
|
|
|
|
// }
|
|
|
|
stage('windows deploy')
|
|
|
|
{
|
|
|
|
when { anyOf { branch "master"; buildingTag() } }
|
|
|
|
steps {
|
|
|
|
bat """
|
|
|
|
call ../setEnv64.bat
|
2020-03-20 01:58:09 +08:00
|
|
|
git checkout .
|
2020-03-19 21:38:04 +08:00
|
|
|
make deploy ARGS="--replace-latest"
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always { deleteDir() }
|
|
|
|
}
|
|
|
|
}
|
2019-03-08 21:41:23 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
2020-03-19 07:45:00 +08:00
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
node('master')
|
|
|
|
{
|
|
|
|
script
|
|
|
|
{
|
|
|
|
JOB_ID = "${env.BUILD_TAG}"
|
2020-03-20 00:43:13 +08:00
|
|
|
jenkinsLib = load("/home/jenkins/jenkins424.groovy")
|
2020-03-19 07:45:00 +08:00
|
|
|
|
2020-03-19 21:38:04 +08:00
|
|
|
jenkinsLib.DeleteUbuntuBuildNode(JOB_ID)
|
|
|
|
jenkinsLib.DeleteWindowsBuildNode(JOB_ID)
|
2020-03-19 07:45:00 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-05-07 23:33:43 +08:00
|
|
|
}
|