From ee2a5c000b62ebf74a4ac0ce722a41e8791d7f74 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Thu, 28 Mar 2019 18:35:31 +0100 Subject: [PATCH] Fix pipelines after Python scripts were moved --- .travis.yml | 15 +++++++++++---- Docs/how_to_build_on_linux.md | 4 ++-- Jenkinsfile | 2 +- Util/BuildTools/BuildPythonAPI.bat | 2 +- Util/BuildTools/BuildPythonAPI.sh | 2 +- Util/BuildTools/Check.sh | 2 +- Util/BuildTools/Package.sh | 25 ++++++++++++------------- Util/BuildTools/Vars.mk | 3 ++- Util/CARLA.sublime-project | 7 ++++--- 9 files changed, 35 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index fce4f4ad7..3756e82f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,9 +25,10 @@ matrix: - libtiff5-dev - libjpeg-dev install: - - pip2 install -q --user setuptools nose2 + - pip2 install -q --user setuptools + - pip2 install -q --user -r PythonAPI/test/requirements.txt - pip3 install -q --user setuptools - - pip3 install -q --user nose2 + - pip3 install -q --user -r PythonAPI/test/requirements.txt script: - while sleep 2m; do echo "still building..."; done & - make setup >> build.log 2>&1 @@ -46,7 +47,10 @@ matrix: - python-pip install: - pip2 install -q --user pylint - - pip2 install -q --user -r PythonAPI/requirements.txt + - pip2 install -q --user -r PythonAPI/carla/requirements.txt + - pip2 install -q --user -r PythonAPI/examples/requirements.txt + - pip2 install -q --user -r PythonAPI/test/requirements.txt + - pip2 install -q --user -r PythonAPI/util/requirements.txt script: - shopt -s globstar - pylint --disable=R,C --rcfile=PythonAPI/.pylintrc PythonAPI/**/*.py @@ -60,7 +64,10 @@ matrix: install: - pip3 install -q --user setuptools - pip3 install -q pylint - - pip3 install -q --user -r PythonAPI/requirements.txt + - pip3 install -q --user -r PythonAPI/carla/requirements.txt + - pip3 install -q --user -r PythonAPI/examples/requirements.txt + - pip3 install -q --user -r PythonAPI/test/requirements.txt + - pip3 install -q --user -r PythonAPI/util/requirements.txt script: - shopt -s globstar - pylint --disable=R,C --rcfile=PythonAPI/.pylintrc PythonAPI/**/*.py diff --git a/Docs/how_to_build_on_linux.md b/Docs/how_to_build_on_linux.md index 82b62d2dc..ae996d70b 100644 --- a/Docs/how_to_build_on_linux.md +++ b/Docs/how_to_build_on_linux.md @@ -9,8 +9,8 @@ Install the build tools and dependencies sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install build-essential clang-6.0 lld-6.0 g++-7 cmake ninja-build python python-pip python-dev python3-dev python3-pip libpng16-dev libtiff5-dev libjpeg-dev tzdata sed curl wget unzip autoconf libtool -pip2 install --user setuptools nose2 -pip3 install --user setuptools nose2 +pip2 install --user setuptools +pip3 install --user setuptools ``` To avoid compatibility issues between Unreal Engine and the CARLA dependencies, diff --git a/Jenkinsfile b/Jenkinsfile index 2911f1a16..cba59826f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,7 @@ pipeline { } post { always { - archiveArtifacts 'PythonAPI/dist/*.egg' + archiveArtifacts 'PythonAPI/carla/dist/*.egg' } } } diff --git a/Util/BuildTools/BuildPythonAPI.bat b/Util/BuildTools/BuildPythonAPI.bat index 010741f10..119fb66f4 100644 --- a/Util/BuildTools/BuildPythonAPI.bat +++ b/Util/BuildTools/BuildPythonAPI.bat @@ -59,7 +59,7 @@ if not "%1"=="" ( goto :arg-parse ) -set PYTHON_LIB_PATH=%ROOT_PATH%PythonAPI\ +set PYTHON_LIB_PATH=%ROOT_PATH%PythonAPI\carla if %REMOVE_INTERMEDIATE% == false ( if %BUILD_FOR_PYTHON3% == false ( diff --git a/Util/BuildTools/BuildPythonAPI.sh b/Util/BuildTools/BuildPythonAPI.sh index 60d625ab7..bbf92adcf 100755 --- a/Util/BuildTools/BuildPythonAPI.sh +++ b/Util/BuildTools/BuildPythonAPI.sh @@ -53,7 +53,7 @@ if ! { ${REMOVE_INTERMEDIATE} || ${BUILD_FOR_PYTHON2} || ${BUILD_FOR_PYTHON3}; } fatal_error "Nothing selected to be done." fi -pushd "${CARLA_PYTHONAPI_ROOT_FOLDER}" >/dev/null +pushd "${CARLA_PYTHONAPI_SOURCE_FOLDER}" >/dev/null # ============================================================================== # -- Clean intermediate files -------------------------------------------------- diff --git a/Util/BuildTools/Check.sh b/Util/BuildTools/Check.sh index 70c58b9e6..3bc4a2b17 100755 --- a/Util/BuildTools/Check.sh +++ b/Util/BuildTools/Check.sh @@ -210,7 +210,7 @@ popd >/dev/null # ============================================================================== if ${SMOKE_TESTS_2} || ${SMOKE_TESTS_3} ; then - pushd "${CARLA_PYTHONAPI_ROOT_FOLDER}/test" >/dev/null + pushd "${CARLA_PYTHONAPI_ROOT_FOLDER}/util" >/dev/null log "Checking connection with the simulator." ./test_connection.py -p 3654 --timeout=60.0 popd >/dev/null diff --git a/Util/BuildTools/Package.sh b/Util/BuildTools/Package.sh index fb15ab287..91a55de62 100755 --- a/Util/BuildTools/Package.sh +++ b/Util/BuildTools/Package.sh @@ -95,26 +95,25 @@ if $DO_COPY_FILES ; then mkdir -p "${DESTINATION}/ExportedMaps" + echo "${REPOSITORY_TAG}" > ${DESTINATION}/VERSION + copy_if_changed "./LICENSE" "${DESTINATION}/LICENSE" copy_if_changed "./CHANGELOG.md" "${DESTINATION}/CHANGELOG" copy_if_changed "./Docs/release_readme.md" "${DESTINATION}/README" copy_if_changed "./Docs/python_api.md" "${DESTINATION}/python_api.md" copy_if_changed "./Util/Docker/Release.Dockerfile" "${DESTINATION}/Dockerfile" - copy_if_changed "./PythonAPI/dist/*.egg" "${DESTINATION}/PythonAPI/" - copy_if_changed "./PythonAPI/agents/" "${DESTINATION}/PythonAPI/agents" - copy_if_changed "./PythonAPI/automatic_control.py" "${DESTINATION}/automatic_control.py" - copy_if_changed "./PythonAPI/dynamic_weather.py" "${DESTINATION}/dynamic_weather.py" - copy_if_changed "./PythonAPI/manual_control.py" "${DESTINATION}/manual_control.py" - copy_if_changed "./PythonAPI/no_rendering_mode.py" "${DESTINATION}/no_rendering_mode.py" - copy_if_changed "./PythonAPI/performance_benchmark.py" "${DESTINATION}/performance_benchmark.py" - copy_if_changed "./PythonAPI/scene_layout.py" "${DESTINATION}/scene_layout.py" - copy_if_changed "./PythonAPI/spawn_npc.py" "${DESTINATION}/spawn_npc.py" - copy_if_changed "./PythonAPI/synchronous_mode.py" "${DESTINATION}/synchronous_mode.py" - copy_if_changed "./PythonAPI/tutorial.py" "${DESTINATION}/tutorial.py" - copy_if_changed "./PythonAPI/vehicle_gallery.py" "${DESTINATION}/vehicle_gallery.py" copy_if_changed "./Util/ImportMaps.sh" "${DESTINATION}/ImportMaps.sh" - echo "${REPOSITORY_TAG}" > ${DESTINATION}/VERSION + copy_if_changed "./PythonAPI/carla/dist/*.egg" "${DESTINATION}/PythonAPI/carla/dist/" + copy_if_changed "./PythonAPI/carla/agents/" "${DESTINATION}/PythonAPI/carla/agents" + copy_if_changed "./PythonAPI/carla/scene_layout.py" "${DESTINATION}/PythonAPI/carla/" + copy_if_changed "./PythonAPI/carla/requirements.txt" "${DESTINATION}/PythonAPI/carla/" + + copy_if_changed "./PythonAPI/examples/*.py" "${DESTINATION}/PythonAPI/examples/" + copy_if_changed "./PythonAPI/examples/requirements.txt" "${DESTINATION}/PythonAPI/examples/" + + copy_if_changed "./PythonAPI/util/*.py" "${DESTINATION}/PythonAPI/util/" + copy_if_changed "./PythonAPI/util/requirements.txt" "${DESTINATION}/PythonAPI/util/" popd >/dev/null diff --git a/Util/BuildTools/Vars.mk b/Util/BuildTools/Vars.mk index 16e802da3..5bbabc2d9 100644 --- a/Util/BuildTools/Vars.mk +++ b/Util/BuildTools/Vars.mk @@ -9,12 +9,13 @@ CARLA_TEST_RESULTS_FOLDER=${CARLA_BUILD_FOLDER}/test-results CARLAUE4_ROOT_FOLDER=${CURDIR}/Unreal/CarlaUE4 CARLAUE4_PLUGIN_ROOT_FOLDER=${CURDIR}/Unreal/CarlaUE4/Plugins/Carla CARLA_PYTHONAPI_ROOT_FOLDER=${CURDIR}/PythonAPI +CARLA_PYTHONAPI_SOURCE_FOLDER=${CARLA_PYTHONAPI_ROOT_FOLDER}/carla LIBCARLA_ROOT_FOLDER=${CURDIR}/LibCarla LIBCARLA_BUILD_SERVER_FOLDER=${CARLA_BUILD_FOLDER}/libcarla-server-build LIBCARLA_BUILD_CLIENT_FOLDER=${CARLA_BUILD_FOLDER}/libcarla-client-build LIBCARLA_INSTALL_SERVER_FOLDER=${CARLAUE4_PLUGIN_ROOT_FOLDER}/CarlaDependencies -LIBCARLA_INSTALL_CLIENT_FOLDER=${CARLA_PYTHONAPI_ROOT_FOLDER}/dependencies +LIBCARLA_INSTALL_CLIENT_FOLDER=${CARLA_PYTHONAPI_SOURCE_FOLDER}/dependencies CARLAUE4_PLUGIN_DEPS_FOLDER=${CARLAUE4_PLUGIN_ROOT_FOLDER}/CarlaDependencies diff --git a/Util/CARLA.sublime-project b/Util/CARLA.sublime-project index 3789103b4..9bbb316bc 100644 --- a/Util/CARLA.sublime-project +++ b/Util/CARLA.sublime-project @@ -25,6 +25,7 @@ ], "folder_exclude_patterns": [ + "*.egg-info", ".clang", ".codelite", ".kdev4", @@ -36,9 +37,9 @@ "Dist", "Doxygen", "Intermediate", - "PythonAPI/build", - "PythonAPI/dependencies", - "PythonAPI/dist", + "PythonAPI/carla/build", + "PythonAPI/carla/dependencies", + "PythonAPI/carla/dist", "Saved", "Unreal/CarlaUE4/Content*", "Unreal/CarlaUE4/Plugins/Carla/CarlaDependencies",