Merge branch 'dev' into jose/adjustvehiclebb

This commit is contained in:
Blyron 2024-02-09 11:32:06 +01:00 committed by GitHub
commit 200b138dbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 264 additions and 207 deletions

471
Jenkinsfile vendored
View File

@ -11,70 +11,145 @@ pipeline
stages stages
{ {
stage('Building CARLA') //stage('Building CARLA')
{ //{
parallel //parallel
{ //{
stage('ubuntu') stage('ubuntu')
{ {
agent { label "ubuntu" } agent { label "gpu" }
environment environment
{ {
UE4_ROOT = '/home/jenkins/UnrealEngine_4.26' UE4_ROOT = '/home/jenkins/UnrealEngine_4.26'
} }
stages stages
{ {
stage('ubuntu setup') stage('prepare environment')
{ {
steps parallel
{ {
sh 'git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject' stage('generate libs')
sh 'make setup ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64 --chrono"'
}
}
stage('ubuntu build')
{
steps
{
sh 'make LibCarla'
sh 'make PythonAPI ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
sh 'make CarlaUE4Editor ARGS="--chrono"'
sh 'make plugins'
sh 'make examples'
}
post
{
always
{ {
archiveArtifacts 'PythonAPI/carla/dist/*.egg' stages
archiveArtifacts 'PythonAPI/carla/dist/*.whl' {
stash includes: 'PythonAPI/carla/dist/*.egg', name: 'ubuntu_eggs' stage('ubuntu setup')
stash includes: 'PythonAPI/carla/dist/*.whl', name: 'ubuntu_wheels' {
steps
{
sh 'git update-index --skip-worktree Unreal/CarlaUE4/CarlaUE4.uproject'
sh 'make setup ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64 --chrono"'
}
}
stage('ubuntu build')
{
steps
{
sh 'make LibCarla'
sh 'make PythonAPI ARGS="--python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
sh 'make CarlaUE4Editor ARGS="--chrono"'
sh 'make plugins'
sh 'make examples'
}
post
{
always
{
archiveArtifacts 'PythonAPI/carla/dist/*.egg'
archiveArtifacts 'PythonAPI/carla/dist/*.whl'
stash includes: 'PythonAPI/carla/dist/*.egg', name: 'ubuntu_eggs'
stash includes: 'PythonAPI/carla/dist/*.whl', name: 'ubuntu_wheels'
}
}
}
stage('ubuntu unit tests')
{
steps
{
sh 'make check ARGS="--all --xml --python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
}
post
{
always
{
junit 'Build/test-results/*.xml'
archiveArtifacts 'profiler.csv'
}
}
}
}
} }
} stage('Download additional resources')
}
stage('ubuntu unit tests')
{
steps
{
sh 'make check ARGS="--all --xml --python-version=3.8,2 --target-wheel-platform=manylinux_2_27_x86_64"'
}
post
{
always
{ {
junit 'Build/test-results/*.xml' stages
archiveArtifacts 'profiler.csv' {
stage('TEST: Checkout Doxygen repo')
{
when { branch "ruben/jenkins_migration"; }
steps
{
dir('doc_repo')
{
checkout scmGit(
branches: [[name: '*/ruben/jenkins_migration']],
extensions: [
cleanBeforeCheckout(),
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'
]
]
)
}
}
}
stage('Checkout Doxygen repo')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
dir('doc_repo')
{
checkout scmGit(
branches: [[name: '*/master']],
extensions: [
cleanBeforeCheckout(),
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'
]
]
)
}
}
}
stage('ubuntu retrieve content')
{
steps
{
sh './Update.sh'
}
}
}
} }
} }
} }
stage('ubuntu retrieve content')
{
steps
{
sh './Update.sh'
}
}
stage('ubuntu package') stage('ubuntu package')
{ {
steps steps
@ -89,179 +164,161 @@ pipeline
{ {
archiveArtifacts 'Dist/*.tar.gz' archiveArtifacts 'Dist/*.tar.gz'
stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package' stash includes: 'Dist/CARLA*.tar.gz', name: 'ubuntu_package'
// stash includes: 'Dist/AdditionalMaps*.tar.gz', name: 'ubuntu_package2'
stash includes: 'Examples/', name: 'ubuntu_examples' stash includes: 'Examples/', name: 'ubuntu_examples'
} }
} }
} }
stage('ubuntu smoke tests')
stage('Testing and documentation')
{ {
agent { label "ubuntu && gpu" } parallel
steps
{ {
unstash name: 'ubuntu_eggs' stage('Testing')
unstash name: 'ubuntu_wheels'
unstash name: 'ubuntu_package'
// unstash name: 'ubuntu_package2'
unstash name: 'ubuntu_examples'
sh 'tar -xvzf Dist/CARLA*.tar.gz -C Dist/'
// sh 'tar -xvzf Dist/AdditionalMaps*.tar.gz -C Dist/'
sh 'DISPLAY= ./Dist/CarlaUE4.sh -nullrhi -RenderOffScreen --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
sh 'make smoke_tests ARGS="--xml --python-version=3.8 --target-wheel-platform=manylinux_2_27_x86_64"'
sh 'make run-examples ARGS="localhost 3654"'
}
post
{
always
{ {
archiveArtifacts 'CarlaUE4.log' stages
junit 'Build/test-results/smoke-tests-*.xml'
deleteDir()
}
}
}
/*
stage('TEST: ubuntu deploy sim')
{
when { branch "ruben/jenkins_migration"; }
steps
{
sh 'git checkout .'
sh 'make deploy ARGS="--test"'
}
}
*/
stage('ubuntu deploy dev')
{
when { branch "dev"; }
steps
{
sh 'git checkout .'
sh 'make deploy ARGS="--replace-latest"'
}
}
stage('ubuntu deploy master')
{
when { anyOf { branch "master"; buildingTag() } }
steps
{
sh 'git checkout .'
sh 'make deploy ARGS="--replace-latest --docker-push"'
}
}
stage('ubuntu Doxygen generation')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
sh 'make docs'
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
}
}
stage('ubuntu Doxygen upload')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
dir('doc_repo')
{
checkout scmGit(
branches: [[name: '*/master']],
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'
]
]
)
unstash name: 'carla_docs'
withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')])
{ {
sh ''' stage('ubuntu smoke tests')
tar -xvzf carla_doc.tar.gz {
git add Doxygen steps
git commit -m "Updated c++ docs" || true {
git push --set-upstream origin master unstash name: 'ubuntu_eggs'
''' unstash name: 'ubuntu_wheels'
unstash name: 'ubuntu_package'
unstash name: 'ubuntu_examples'
sh 'tar -xvzf Dist/CARLA*.tar.gz -C Dist/'
sh 'DISPLAY= ./Dist/CarlaUE4.sh -nullrhi -RenderOffScreen --carla-rpc-port=3654 --carla-streaming-port=0 -nosound > CarlaUE4.log &'
sh 'make smoke_tests ARGS="--xml --python-version=3.8 --target-wheel-platform=manylinux_2_27_x86_64"'
sh 'make run-examples ARGS="localhost 3654"'
}
post
{
always
{
archiveArtifacts 'CarlaUE4.log'
junit 'Build/test-results/smoke-tests-*.xml'
}
}
}
}
}
stage('Generate documentation')
{
stages
{
stage('ubuntu Doxygen generation')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
sh 'make docs'
sh 'tar -czf carla_doc.tar.gz ./Doxygen'
stash includes: 'carla_doc.tar.gz', name: 'carla_docs'
}
}
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'
}
}
} }
} }
} }
} }
/*
stage('TEST: ubuntu Doxygen generation') stage('Deployment and documentation publishing')
{ {
when { branch "ruben/jenkins_migration"; } parallel
steps
{ {
sh 'make docs' stage('Release Deployment')
sh 'tar -czf carla_doc.tar.gz ./Doxygen' {
stash includes: 'carla_doc.tar.gz', name: 'carla_docs' stages
{
stage('TEST: ubuntu deploy sim')
{
when { branch "ruben/jenkins_migration"; }
steps
{
sh 'git checkout .'
sh 'make deploy ARGS="--test"'
}
}
stage('ubuntu deploy dev')
{
when { branch "dev"; }
steps
{
sh 'git checkout .'
sh 'make deploy ARGS="--replace-latest"'
}
}
stage('ubuntu deploy master')
{
when { anyOf { branch "master"; buildingTag() } }
steps
{
sh 'git checkout .'
sh 'make deploy ARGS="--replace-latest --docker-push"'
}
}
}
}
stage('Publish documentation')
{
stages
{
stage('ubuntu Doxygen upload')
{
when { anyOf { branch "master"; branch "dev"; buildingTag() } }
steps
{
dir('doc_repo')
{
unstash name: 'carla_docs'
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 --set-upstream origin ruben/jenkins_migration
'''
}
}
}
}
stage('TEST: ubuntu Doxygen upload')
{
when { branch "ruben/jenkins_migration"; }
steps
{
dir('doc_repo')
{
unstash name: 'carla_docs'
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 --set-upstream origin ruben/jenkins_migration
'''
}
}
}
}
}
}
} }
} }
*/
// stage('TEST: ubuntu Doxygen upload')
// {
// when { branch "ruben/jenkins_migration"; }
// steps
// {
// dir('doc_repo')
// {
// 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'
// ]
// ]
// )
// unstash name: 'carla_docs'
// withCredentials([gitUsernamePassword(credentialsId: 'github_token_as_pwd_2', gitToolName: 'git-tool')]) {
// sh '''
// pwd
// ls -lh
// tar -xvzf carla_doc.tar.gz
// git add Doxygen
// git commit -m "Updated c++ docs" || true
// git push --set-upstream origin ruben/jenkins_migration
// '''
// }
// }
// }
// post
// {
// always
// {
// deleteDir()
// }
// }
// }
}
post
{
always
{
deleteDir()
}
} }
} }
/* /*
@ -371,7 +428,7 @@ pipeline
} }
}*/ }*/
} //}
} //}
} }
} }