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('Building CARLA')
|
2020-03-05 20:16:18 +08:00
|
|
|
{
|
|
|
|
parallel
|
|
|
|
{
|
|
|
|
stage('ubuntu')
|
|
|
|
{
|
2024-02-06 18:32:32 +08:00
|
|
|
agent { label "gpu" }
|
2021-02-10 02:35:20 +08:00
|
|
|
environment
|
|
|
|
{
|
|
|
|
UE4_ROOT = '/home/jenkins/UnrealEngine_4.26'
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
stages
|
|
|
|
{
|
|
|
|
stage('ubuntu setup')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
2020-12-11 20:11:14 +08:00
|
|
|
sh 'git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject'
|
2024-01-25 23:56:16 +08:00
|
|
|
sh 'make setup ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64 --chrono"'
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu build')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'make LibCarla'
|
2024-01-25 23:56:16 +08:00
|
|
|
sh 'make PythonAPI ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
|
2023-11-09 23:12:00 +08:00
|
|
|
sh 'make CarlaUE4Editor ARGS="--chrono"'
|
2020-12-22 18:08:27 +08:00
|
|
|
sh 'make plugins'
|
2020-03-05 20:16:18 +08:00
|
|
|
sh 'make examples'
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
archiveArtifacts 'PythonAPI/carla/dist/*.egg'
|
2021-07-21 00:20:03 +08:00
|
|
|
archiveArtifacts 'PythonAPI/carla/dist/*.whl'
|
2020-03-05 20:16:18 +08:00
|
|
|
stash includes: 'PythonAPI/carla/dist/*.egg', name: 'ubuntu_eggs'
|
2021-07-21 00:20:03 +08:00
|
|
|
stash includes: 'PythonAPI/carla/dist/*.whl', name: 'ubuntu_wheels'
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu unit tests')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
2024-01-25 23:56:16 +08:00
|
|
|
sh 'make check ARGS="--all --xml --python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
junit 'Build/test-results/*.xml'
|
|
|
|
archiveArtifacts 'profiler.csv'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu retrieve content')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh './Update.sh'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu package')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
2024-01-25 23:56:16 +08:00
|
|
|
sh 'make package ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64 --chrono"'
|
|
|
|
sh 'make package ARGS="--packages=AdditionalMaps,Town06_Opt,Town07_Opt,Town11,Town12,Town13,Town15 --target-archive=AdditionalMaps --clean-intermediate --python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
|
2020-03-05 20:16:18 +08:00
|
|
|
sh 'make examples ARGS="localhost 3654"'
|
|
|
|
}
|
2020-08-25 18:58:12 +08:00
|
|
|
post
|
2020-03-19 07:45:00 +08:00
|
|
|
{
|
2020-08-25 18:58:12 +08:00
|
|
|
always
|
2020-03-19 07:45:00 +08:00
|
|
|
{
|
2020-03-05 20:16:18 +08:00
|
|
|
archiveArtifacts 'Dist/*.tar.gz'
|
|
|
|
stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package'
|
2021-07-30 16:01:45 +08:00
|
|
|
// stash includes: 'Dist/AdditionalMaps*.tar.gz', name: 'ubuntu_package2'
|
2020-03-05 20:16:18 +08:00
|
|
|
stash includes: 'Examples/', name: 'ubuntu_examples'
|
|
|
|
}
|
2020-09-16 19:22:09 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu smoke tests')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
unstash name: 'ubuntu_eggs'
|
2021-07-21 00:20:03 +08:00
|
|
|
unstash name: 'ubuntu_wheels'
|
2020-09-16 19:22:09 +08:00
|
|
|
unstash name: 'ubuntu_package'
|
2021-07-30 16:01:45 +08:00
|
|
|
// unstash name: 'ubuntu_package2'
|
2020-09-16 19:22:09 +08:00
|
|
|
unstash name: 'ubuntu_examples'
|
|
|
|
sh 'tar -xvzf Dist/CARLA*.tar.gz -C Dist/'
|
2021-07-30 16:01:45 +08:00
|
|
|
// sh 'tar -xvzf Dist/AdditionalMaps*.tar.gz -C Dist/'
|
2021-05-20 19:01:48 +08:00
|
|
|
sh 'DISPLAY= ./Dist/CarlaUE4.sh -nullrhi -RenderOffScreen --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
|
2024-01-25 23:56:16 +08:00
|
|
|
sh 'make smoke_tests ARGS="--xml --python-version=3.8 --target-wheel-platform=manylinux_2_27_x86_64"'
|
2021-05-10 01:45:24 +08:00
|
|
|
sh 'make run-examples ARGS="localhost 3654"'
|
2020-09-16 19:22:09 +08:00
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
archiveArtifacts 'CarlaUE4.log'
|
|
|
|
junit 'Build/test-results/smoke-tests-*.xml'
|
|
|
|
deleteDir()
|
2020-10-01 22:12:15 +08:00
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
}
|
2024-01-25 23:56:16 +08:00
|
|
|
|
|
|
|
stage('TEST: ubuntu deploy sim')
|
|
|
|
{
|
|
|
|
when { branch "ruben/jenkins_migration"; }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'git checkout .'
|
2024-01-26 00:43:46 +08:00
|
|
|
sh 'make deploy ARGS="--test"'
|
2024-01-25 23:56:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-09-23 18:00:19 +08:00
|
|
|
stage('ubuntu deploy dev')
|
|
|
|
{
|
|
|
|
when { branch "dev"; }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'git checkout .'
|
2024-01-26 00:43:46 +08:00
|
|
|
sh 'make deploy ARGS="--replace-latest"'
|
2020-09-23 18:00:19 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('ubuntu deploy master')
|
2020-03-05 20:16:18 +08:00
|
|
|
{
|
|
|
|
when { anyOf { branch "master"; buildingTag() } }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'git checkout .'
|
2024-01-26 00:43:46 +08:00
|
|
|
sh 'make deploy ARGS="--replace-latest --docker-push"'
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
|
|
|
}
|
2024-01-25 23:56:16 +08:00
|
|
|
|
2024-01-26 00:43:46 +08:00
|
|
|
stage('ubuntu Doxygen generation')
|
2020-03-05 20:16:18 +08:00
|
|
|
{
|
2024-01-26 00:43:46 +08:00
|
|
|
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
|
2020-03-05 20:16:18 +08:00
|
|
|
steps
|
|
|
|
{
|
2020-03-06 21:38:22 +08:00
|
|
|
sh 'make docs'
|
2024-01-25 23:56:16 +08:00
|
|
|
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
|
|
|
|
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
|
|
|
|
}
|
2024-01-30 23:47:15 +08:00
|
|
|
}
|
2024-01-30 20:26:53 +08:00
|
|
|
|
2024-01-30 23:47:15 +08:00
|
|
|
stage('ubuntu Doxygen upload')
|
|
|
|
{
|
|
|
|
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
checkout scmGit(branches: [[name: '*/master']], extensions: [checkoutOption(120), cloneOption(noTags:false, reference:'', shallow: false, timeout:120)], userRemoteConfigs: [[credentialsId: 'github_token_as_pwd_2', url: 'https://github.com/carla-simulator/carla-simulator.github.io.git']])
|
|
|
|
unstash name: 'carla_docs'
|
2024-01-25 23:56:16 +08:00
|
|
|
|
2024-01-30 23:47:15 +08:00
|
|
|
withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) {
|
|
|
|
sh '''
|
|
|
|
tar -xvzf carla_doc.tar.gz
|
|
|
|
git add Doxygen
|
|
|
|
git commit -m "Updated c++ docs" || true
|
|
|
|
git push
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-29 21:29:13 +08:00
|
|
|
stage('TEST: ubuntu Doxygen generation')
|
|
|
|
{
|
|
|
|
when { branch "ruben/jenkins_migration"; }
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
sh 'make docs'
|
|
|
|
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
|
|
|
|
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
|
|
|
|
}
|
|
|
|
}
|
2024-01-26 00:43:46 +08:00
|
|
|
|
2024-01-29 21:29:13 +08:00
|
|
|
stage('TEST: ubuntu Doxygen upload')
|
|
|
|
{
|
|
|
|
when { branch "ruben/jenkins_migration"; }
|
2024-01-31 07:25:02 +08:00
|
|
|
steps
|
2024-01-29 21:29:13 +08:00
|
|
|
{
|
2024-01-31 07:25:02 +08:00
|
|
|
dir('doc_repo')
|
2024-01-31 07:19:08 +08:00
|
|
|
{
|
|
|
|
checkout scmGit(
|
|
|
|
branches: [[name: '*/ruben/jenkins_migration']],
|
|
|
|
extensions: [
|
|
|
|
checkoutOption(120),
|
|
|
|
localBranch("**"),
|
|
|
|
cloneOption(noTags:false, reference:'', shallow: false, timeout:120)
|
|
|
|
],
|
|
|
|
userRemoteConfigs: [
|
|
|
|
[
|
|
|
|
credentialsId: 'github_token_as_pwd_2',
|
|
|
|
url: 'https://github.com/carla-simulator/carla-simulator.github.io.git'
|
|
|
|
]
|
2024-01-30 19:29:38 +08:00
|
|
|
]
|
2024-01-31 07:19:08 +08:00
|
|
|
)
|
|
|
|
unstash name: 'carla_docs'
|
|
|
|
withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) {
|
|
|
|
sh '''
|
2024-01-31 18:25:27 +08:00
|
|
|
pwd
|
|
|
|
ls -lh
|
2024-01-31 07:19:08 +08:00
|
|
|
tar -xvzf carla_doc.tar.gz
|
|
|
|
git add Doxygen
|
|
|
|
git commit -m "Updated c++ docs" || true
|
|
|
|
git push --set-upstream origin ruben/jenkins_migration
|
|
|
|
'''
|
|
|
|
}
|
2024-01-29 21:45:53 +08:00
|
|
|
}
|
2024-01-31 07:25:02 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
2020-03-19 07:45:00 +08:00
|
|
|
{
|
2024-01-31 07:25:02 +08:00
|
|
|
deleteDir()
|
2020-03-19 07:45:00 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
2020-03-21 01:13:08 +08:00
|
|
|
}
|
2020-08-25 18:58:12 +08:00
|
|
|
post
|
2020-03-21 01:13:08 +08:00
|
|
|
{
|
2020-08-25 18:58:12 +08:00
|
|
|
always
|
|
|
|
{
|
|
|
|
deleteDir()
|
2020-03-13 16:24:46 +08:00
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
2019-03-08 21:41:23 +08:00
|
|
|
}
|
2024-01-25 23:56:16 +08:00
|
|
|
/*
|
2020-03-19 21:38:04 +08:00
|
|
|
stage('windows')
|
|
|
|
{
|
2024-01-25 23:56:16 +08:00
|
|
|
|
|
|
|
agent { label "windows" }
|
2021-02-10 02:35:20 +08:00
|
|
|
environment
|
|
|
|
{
|
2021-02-24 01:11:55 +08:00
|
|
|
UE4_ROOT = 'C:\\UE_4.26'
|
2021-02-10 02:35:20 +08:00
|
|
|
}
|
2020-03-19 21:38:04 +08:00
|
|
|
stages
|
|
|
|
{
|
|
|
|
stage('windows setup')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
2020-12-11 20:11:14 +08:00
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2020-12-11 20:11:14 +08:00
|
|
|
git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject
|
|
|
|
"""
|
2020-03-19 21:38:04 +08:00
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2021-03-01 23:56:31 +08:00
|
|
|
make setup ARGS="--chrono"
|
2020-03-19 21:38:04 +08:00
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('windows build')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2020-03-19 21:38:04 +08:00
|
|
|
make LibCarla
|
|
|
|
"""
|
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2020-03-19 21:38:04 +08:00
|
|
|
make PythonAPI
|
|
|
|
"""
|
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2021-03-01 23:56:31 +08:00
|
|
|
make CarlaUE4Editor ARGS="--chrono"
|
2020-03-19 21:38:04 +08:00
|
|
|
"""
|
2020-12-22 18:08:27 +08:00
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2020-12-22 18:08:27 +08:00
|
|
|
make plugins
|
|
|
|
"""
|
2020-03-19 21:38:04 +08:00
|
|
|
}
|
|
|
|
post
|
|
|
|
{
|
|
|
|
always
|
|
|
|
{
|
|
|
|
archiveArtifacts 'PythonAPI/carla/dist/*.egg'
|
2021-07-21 00:20:03 +08:00
|
|
|
archiveArtifacts 'PythonAPI/carla/dist/*.whl'
|
2020-03-19 21:38:04 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('windows retrieve content')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2020-03-19 21:38:04 +08:00
|
|
|
call Update.bat
|
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('windows package')
|
|
|
|
{
|
|
|
|
steps
|
|
|
|
{
|
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2021-03-01 23:56:31 +08:00
|
|
|
make package ARGS="--chrono"
|
2020-03-19 21:38:04 +08:00
|
|
|
"""
|
2021-03-01 18:34:22 +08:00
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2023-10-27 20:39:37 +08:00
|
|
|
make package ARGS="--packages=AdditionalMaps,Town06_Opt,Town07_Opt,Town11,Town12,Town13,Town15 --target-archive=AdditionalMaps --clean-intermediate"
|
2021-03-01 18:34:22 +08:00
|
|
|
"""
|
2020-03-19 21:38:04 +08:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts 'Build/UE4Carla/*.zip'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-25 23:56:16 +08:00
|
|
|
|
2020-03-19 21:38:04 +08:00
|
|
|
stage('windows deploy')
|
|
|
|
{
|
2020-09-23 18:00:19 +08:00
|
|
|
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
|
2020-03-19 21:38:04 +08:00
|
|
|
steps {
|
|
|
|
bat """
|
2024-01-25 23:56:16 +08:00
|
|
|
call C:\\Users\\jenkins\\setEnv64.bat
|
2020-03-20 01:58:09 +08:00
|
|
|
git checkout .
|
2024-01-25 23:56:16 +08:00
|
|
|
REM make deploy ARGS="--replace-latest"
|
2020-03-19 21:38:04 +08:00
|
|
|
"""
|
|
|
|
}
|
|
|
|
}
|
2024-01-25 23:56:16 +08:00
|
|
|
|
2020-03-19 21:38:04 +08:00
|
|
|
}
|
2020-08-25 18:58:12 +08:00
|
|
|
post
|
2020-03-19 21:38:04 +08:00
|
|
|
{
|
2020-08-25 18:58:12 +08:00
|
|
|
always
|
|
|
|
{
|
|
|
|
deleteDir()
|
2020-03-21 01:13:08 +08:00
|
|
|
}
|
2020-03-19 21:38:04 +08:00
|
|
|
}
|
2024-01-25 23:56:16 +08:00
|
|
|
}*/
|
|
|
|
|
2019-03-08 21:41:23 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-05 20:16:18 +08:00
|
|
|
}
|
2018-05-07 23:33:43 +08:00
|
|
|
}
|