Skip to content

Commit

Permalink
cmake: package create tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
lamping7 committed May 7, 2018
1 parent aadaa50 commit 5e803c3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 59 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,17 +424,20 @@ 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")
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)
94 changes: 38 additions & 56 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand Down
4 changes: 3 additions & 1 deletion platforms/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ install(
${PROJECT_SOURCE_DIR}/test
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
USE_SOURCE_PERMISSIONS
)

# px4 files
Expand All @@ -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
Expand Down

0 comments on commit 5e803c3

Please sign in to comment.