enhance(ci): Add multiple package build
The CI docker file now drives a CI build script which
will execute the unit and application based tests, and
if successful will build run-time and development .deb
and .rpm packages. Packages are left in /tmp by default
and are indexed by build_packages.yml which is also left
in /tmp.
Change-Id: Ieaa97e1cab1d9cbb721e19d667192e336becec08
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9ca0ed..7c6e1cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,7 +79,7 @@
-DGIT_ID=${git_id}
-DMAJOR_VER=${major_version}
-DMINOR_VER=${minor_version}
- -DPATCH_VER=${patch_level}${spoiled_str}
+ -DPATCH_VER=${patch_level}
)
# ---------------- suss out pkg gen tools so we don't fail generating packages that the system cannot support --------------
@@ -87,9 +87,14 @@
if( DEV_PKG )
set( dev_tag "-dev" )
+ set( pkg_name "rmr-dev" )
+else()
+ set( pkg_name "rmr" )
endif()
-set( pkg_label "${CMAKE_PROJECT_NAME}-${major_version}.${minor_version}.${patch_level}.${CMAKE_SYSTEM_PROCESSOR}${dev_tag}" )
-message( "+++ building ${pkg_label}${spoiled_str}" )
+set( rpm_pkg_label "${CMAKE_PROJECT_NAME}${dev_tag}${spoiled_str}-${major_version}.${minor_version}.${patch_level}-${CMAKE_SYSTEM_PROCESSOR}" )
+set( deb_pkg_label "${CMAKE_PROJECT_NAME}${dev_tag}${spoiled_str}_${major_version}.${minor_version}.${patch_level}_${CMAKE_SYSTEM_PROCESSOR}" )
+message( "+++ building ${deb_pkg_label}" )
+message( "+++ building ${rpm_pkg_label}" )
set( out_yml /tmp/build_output.yml ) # we will record package names (we record only untainted names)
find_program( rpm NAMES rpmbuild ) # rpm package gen requires this to be installed
@@ -108,12 +113,12 @@
)
execute_process(
- COMMAND bash -c " echo deb: ${CMAKE_CURRENT_BINARY_DIR}/${pkg_label}.deb >>${out_yml}"
+ COMMAND bash -c " echo deb: ${CMAKE_CURRENT_BINARY_DIR}/${deb_pkg_label}.deb >>${out_yml}"
)
if( gen_rpm )
execute_process(
- COMMAND bash -c " echo rpm: ${CMAKE_CURRENT_BINARY_DIR}/${pkg_label}.rpm >>${out_yml}"
+ COMMAND bash -c " echo rpm: ${CMAKE_CURRENT_BINARY_DIR}/${rpm_pkg_label}.rpm >>${out_yml}"
)
endif()
@@ -314,6 +319,7 @@
IF( EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" )
include( InstallRequiredSystemLibraries )
+ set( CPACK_PACKAGE_NAME ${pkg_name} )
set( CPACK_set_DESTDIR "on" )
set( CPACK_PACKAGING_INSTALL_PREFIX "${install_root}" )
set( CPACK_GENERATOR "${pkg_list}" )
@@ -325,7 +331,8 @@
set( CPACK_PACKAGE_VERSION_MAJOR "${major_version}" )
set( CPACK_PACKAGE_VERSION_MINOR "${minor_version}" )
set( CPACK_PACKAGE_VERSION_PATCH "${patch_level}" )
- set( CPACK_PACKAGE_FILE_NAME "${pkg_label}${spoiled_str}" )
+ set( CPACK_DEBIAN_FILE_NAME "${deb_pkg_label}.deb" )
+ set( CPACK_RPM_FILE_NAME "${rpm_pkg_label}.rpm" )
# we build and ship the libraries, so there is NO dependency