Fix DEB and RPM dependency spec + test building docs in CI (#426)
* Update cmake/rocprofiler_config_packaging.cmake
- rocprofiler_set_package_depends which ensure CPACK_DEBIAN_PACKAGE_DEPENDS, CPACK_RPM_PACKAGE_REQUIRES, and component variants are properly formatted
* Update continuous_integration.yml
- Set ROCPROFILER_DEP_ROCMCORE to ON (test multiple dependencies)
- Set ROCPROFILER_BUILD_DOCS to ON (test building/packaging docs)
* Update docs/CMakeLists.txt
- remove '--' after cmake -E env
[ROCm/rocprofiler-sdk commit: 14cd132b89]
This commit is contained in:
committed by
GitHub
parent
7d792a85e8
commit
65231c485c
@@ -116,6 +116,8 @@ jobs:
|
||||
--gpu-targets ${{ env.GPU_LIST }}
|
||||
${{ matrix.ci-flags }}
|
||||
--
|
||||
-DROCPROFILER_DEP_ROCMCORE=ON
|
||||
-DROCPROFILER_BUILD_DOCS=ON
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
|
||||
-DCMAKE_INSTALL_PREFIX=/opt/rocprofiler/v2
|
||||
-DCPACK_GENERATOR='DEB;RPM;TGZ'
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
# configure packaging settings
|
||||
#
|
||||
|
||||
function(rocprofiler_set_package_depends _VARIABLE _VALUE _INFO)
|
||||
string(REPLACE ";" ", " _DEPENDS "${_VALUE}")
|
||||
set(${_VARIABLE}
|
||||
"${_DEPENDS}"
|
||||
CACHE STRING "${_INFO} package dependencies" FORCE)
|
||||
rocprofiler_add_feature(${_VARIABLE} "${_INFO} package dependencies")
|
||||
endfunction()
|
||||
|
||||
# Add packaging directives
|
||||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-sdk)
|
||||
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
||||
@@ -102,9 +110,12 @@ foreach(COMPONENT_GROUP ${ROCPROFILER_COMPONENT_GROUPS})
|
||||
|
||||
string(TOUPPER "${COMPONENT_GROUP}" UCOMPONENT)
|
||||
set(CPACK_DEBIAN_${UCOMPONENT}_PACKAGE_NAME "${_NAME}")
|
||||
set(CPACK_DEBIAN_${UCOMPONENT}_PACKAGE_DEPENDS "${_DEP}")
|
||||
set(CPACK_RPM_${UCOMPONENT}_PACKAGE_NAME "${_NAME}")
|
||||
set(CPACK_RPM_${UCOMPONENT}_PACKAGE_REQUIRES "${_DEP}")
|
||||
|
||||
rocprofiler_set_package_depends(CPACK_DEBIAN_${UCOMPONENT}_PACKAGE_DEPENDS "${_DEP}"
|
||||
"Debian")
|
||||
rocprofiler_set_package_depends(CPACK_RPM_${UCOMPONENT}_PACKAGE_REQUIRES "${_DEP}"
|
||||
"RedHat")
|
||||
|
||||
foreach(COMPONENT ${COMPONENT_GROUP_${COMPONENT_GROUP}_COMPONENTS})
|
||||
cpack_add_component(${COMPONENT} REQUIRED GROUP "${COMPONENT_GROUP}")
|
||||
@@ -143,11 +154,8 @@ if(rocm_version_FOUND)
|
||||
set(_ROCM_SMI_SUFFIX
|
||||
" (>= ${rocm_version_MAJOR_VERSION}.0.0.${rocm_version_NUMERIC_VERSION})")
|
||||
endif()
|
||||
string(REPLACE ";" ", " _DEBIAN_PACKAGE_DEPENDS "${_DEBIAN_PACKAGE_DEPENDS}")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS
|
||||
"${_DEBIAN_PACKAGE_DEPENDS}"
|
||||
CACHE STRING "Debian package dependencies" FORCE)
|
||||
rocprofiler_add_feature(CPACK_DEBIAN_PACKAGE_DEPENDS "Debian package dependencies")
|
||||
rocprofiler_set_package_depends(CPACK_DEBIAN_PACKAGE_DEPENDS "${_DEBIAN_PACKAGE_DEPENDS}"
|
||||
"Debian")
|
||||
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
||||
|
||||
# -------------------------------------------------------------------------------------- #
|
||||
|
||||
@@ -44,7 +44,7 @@ function(DOCS_EXECUTE_PROCESS)
|
||||
message(STATUS "[rocprofiler][docs] Executing: ${_MSG}")
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E env HOME=${DOCS_WD} -- ${ARGN}
|
||||
COMMAND ${CMAKE_COMMAND} -E env HOME=${DOCS_WD} ${ARGN}
|
||||
RESULT_VARIABLE _RET
|
||||
OUTPUT_VARIABLE _OUT
|
||||
ERROR_VARIABLE _ERR
|
||||
|
||||
Reference in New Issue
Block a user