From 5e803c30b7b63bf0f52859a1fc76437574484f80 Mon Sep 17 00:00:00 2001 From: Anthony Lamping Date: Mon, 7 May 2018 12:38:53 -0400 Subject: [PATCH] cmake: package create tarball --- CMakeLists.txt | 7 ++- Jenkinsfile | 94 ++++++++++++++-------------------- platforms/posix/CMakeLists.txt | 4 +- 3 files changed, 46 insertions(+), 59 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10e51179427c..698c939f48bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -424,7 +424,6 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_DEBIAN_PACKAGE_SECTION "devel") set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.") -set(CPACK_GENERATOR "ZIP") set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}") set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${git_version}") set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2") @@ -432,9 +431,13 @@ set(CPACK_PACKAGING_INSTALL_PREFIX "") set(CPACK_SET_DESTDIR "OFF") if ("${CMAKE_SYSTEM}" MATCHES "Linux") + set(CPACK_GENERATOR "TBZ2") find_program(DPKG_PROGRAM dpkg) if (EXISTS ${DPKG_PROGRAM}) list (APPEND CPACK_GENERATOR "DEB") endif() +else() + set(CPACK_GENERATOR "ZIP") endif() -include(CPack) + +include(CPack) \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index d5594e033456..9546cbca3780 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -99,10 +99,10 @@ pipeline { sh "make distclean" sh "ccache -z" sh "make posix_sitl_default" - sh "ccache -s" sh "make posix_sitl_default sitl_gazebo" sh "make posix_sitl_default package" - stash name: "px4_sitl_package", includes: "build/posix_sitl_default/*.zip" + sh "ccache -s" + stash name: "px4_sitl_package", includes: "build/posix_sitl_default/*.bz2" sh "make distclean" } } @@ -273,16 +273,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -306,16 +304,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tailsitter' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tailsitter' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -339,16 +335,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tiltrotor' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tiltrotor' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -372,16 +366,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -405,16 +397,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -438,16 +428,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -471,16 +459,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -504,16 +490,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mavros_offboard_attctl_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' @@ -537,16 +521,14 @@ pipeline { sh 'export' sh 'make distclean; rm -rf .ros; rm -rf .gazebo' unstash 'px4_sitl_package' - sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip' + sh 'tar -xjpf build/posix_sitl_default/px4-posix_sitl_default*.bz2' sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/' - sh 'chmod +x px4-posix_sitl_default*/share/px4/px4' - sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mavros_offboard_posctl_test.py' - sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test' - sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' + sh 'px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test' + sh 'px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`' } post { always { - sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' + sh 'px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg' archiveArtifacts '.ros/**/*.pdf' archiveArtifacts '.ros/**/*.csv' sh 'make distclean' diff --git a/platforms/posix/CMakeLists.txt b/platforms/posix/CMakeLists.txt index 8f370176babc..26405401c9cd 100644 --- a/platforms/posix/CMakeLists.txt +++ b/platforms/posix/CMakeLists.txt @@ -110,6 +110,7 @@ install( ${PROJECT_SOURCE_DIR}/test DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME} + USE_SOURCE_PERMISSIONS ) # px4 files @@ -127,11 +128,12 @@ install( ${PROJECT_SOURCE_DIR}/Tools/ecl_ekf DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/Tools + USE_SOURCE_PERMISSIONS ) # px4 Tools files install( - FILES + PROGRAMS ${PROJECT_SOURCE_DIR}/Tools/setup_gazebo.bash ${PROJECT_SOURCE_DIR}/Tools/upload_log.py DESTINATION