diff --git a/.github/workflows/multi_arch_build_portable_linux_artifacts.yml b/.github/workflows/multi_arch_build_portable_linux_artifacts.yml index d3bf9349890..951e35374a3 100644 --- a/.github/workflows/multi_arch_build_portable_linux_artifacts.yml +++ b/.github/workflows/multi_arch_build_portable_linux_artifacts.yml @@ -148,6 +148,10 @@ jobs: echo "Artifacts:" ls -lh "${BUILD_DIR}"/artifacts/*.tar.xz 2>/dev/null || echo "No artifacts found" + - name: Test Packaging + run: | + ctest --test-dir ${BUILD_DIR} --output-on-failure + - name: Configure AWS credentials for artifact uploads if: ${{ always() }} uses: ./.github/actions/configure_aws_artifacts_credentials diff --git a/.github/workflows/multi_arch_build_windows_artifacts.yml b/.github/workflows/multi_arch_build_windows_artifacts.yml index a592415f811..ed58eacb685 100644 --- a/.github/workflows/multi_arch_build_windows_artifacts.yml +++ b/.github/workflows/multi_arch_build_windows_artifacts.yml @@ -169,6 +169,12 @@ jobs: echo "Artifacts:" ls -lh "${BUILD_DIR}"/artifacts/*.tar.xz 2>/dev/null || echo "No artifacts found" + # TODO(scotttodd): enable once these tests pass + # therock-examples-cpp-sdk-user can't find hipsparselt-config.cmake + # - name: Test Packaging + # run: | + # ctest --test-dir ${BUILD_DIR} --output-on-failure + - name: Configure AWS credentials for artifact uploads if: ${{ always() }} uses: ./.github/actions/configure_aws_artifacts_credentials diff --git a/CMakeLists.txt b/CMakeLists.txt index 6119398bfbd..ecdd777da5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -395,23 +395,35 @@ if(THEROCK_BUNDLE_SYSDEPS) if(NOT MESON_BUILD) message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON on Linux requires (easiest: `pip install meson`)") endif() + # Core sysdeps (always part of the 'sysdeps' artifact) set(THEROCK_BUNDLED_BZIP2 therock-bzip2) set(THEROCK_BUNDLED_ELFUTILS therock-elfutils) - set(THEROCK_BUNDLED_EXPAT therock-expat) - set(THEROCK_BUNDLED_GMP therock-gmp) - set(THEROCK_BUNDLED_HWLOC therock-hwloc) set(THEROCK_BUNDLED_LIBBACKTRACE therock-libbacktrace) set(THEROCK_BUNDLED_LIBCAP therock-libcap) set(THEROCK_BUNDLED_LIBDRM therock-libdrm) set(THEROCK_BUNDLED_LIBLZMA therock-liblzma) set(THEROCK_BUNDLED_LIBMNL therock-libmnl) set(THEROCK_BUNDLED_LIBNL therock-libnl) - set(THEROCK_BUNDLED_MPFR therock-mpfr) - set(THEROCK_BUNDLED_NCURSES therock-ncurses) set(THEROCK_BUNDLED_NUMACTL therock-numactl) set(THEROCK_BUNDLED_SQLITE3 therock-sqlite3) set(THEROCK_BUNDLED_ZLIB therock-zlib) set(THEROCK_BUNDLED_ZSTD therock-zstd) + # Optional sysdeps (gated on their artifact feature flags) + if(THEROCK_ENABLE_SYSDEPS_EXPAT) + set(THEROCK_BUNDLED_EXPAT therock-expat) + endif() + if(THEROCK_ENABLE_SYSDEPS_GMP) + set(THEROCK_BUNDLED_GMP therock-gmp) + endif() + if(THEROCK_ENABLE_SYSDEPS_HWLOC) + set(THEROCK_BUNDLED_HWLOC therock-hwloc) + endif() + if(THEROCK_ENABLE_SYSDEPS_MPFR) + set(THEROCK_BUNDLED_MPFR therock-mpfr) + endif() + if(THEROCK_ENABLE_SYSDEPS_NCURSES) + set(THEROCK_BUNDLED_NCURSES therock-ncurses) + endif() if(THEROCK_ENABLE_SYSDEPS_AMD_MESA) set(THEROCK_BUNDLED_AMDMESA therock-amd-mesa) endif() @@ -421,17 +433,27 @@ if(THEROCK_BUNDLE_SYSDEPS) message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON on macOS requires `meson` (easiest: `pip install meson`)") endif() # macOS bundled deps - note: libcap, libdrm, numactl are Linux-specific + # Core sysdeps set(THEROCK_BUNDLED_BZIP2 therock-bzip2) set(THEROCK_BUNDLED_ELFUTILS therock-elfutils) - set(THEROCK_BUNDLED_EXPAT therock-expat) - set(THEROCK_BUNDLED_GMP therock-gmp) set(THEROCK_BUNDLED_LIBBACKTRACE therock-libbacktrace) set(THEROCK_BUNDLED_LIBLZMA therock-liblzma) - set(THEROCK_BUNDLED_MPFR therock-mpfr) - set(THEROCK_BUNDLED_NCURSES therock-ncurses) set(THEROCK_BUNDLED_SQLITE3 therock-sqlite3) set(THEROCK_BUNDLED_ZLIB therock-zlib) set(THEROCK_BUNDLED_ZSTD therock-zstd) + # Optional sysdeps + if(THEROCK_ENABLE_SYSDEPS_EXPAT) + set(THEROCK_BUNDLED_EXPAT therock-expat) + endif() + if(THEROCK_ENABLE_SYSDEPS_GMP) + set(THEROCK_BUNDLED_GMP therock-gmp) + endif() + if(THEROCK_ENABLE_SYSDEPS_MPFR) + set(THEROCK_BUNDLED_MPFR therock-mpfr) + endif() + if(THEROCK_ENABLE_SYSDEPS_NCURSES) + set(THEROCK_BUNDLED_NCURSES therock-ncurses) + endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(THEROCK_BUNDLED_BZIP2 therock-bzip2) set(THEROCK_BUNDLED_SQLITE3 therock-sqlite3) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 69850db5d99..3bb16298aaa 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -23,10 +23,11 @@ else() ) endif() -# Examples are configured against the installed ROCm prefix. Since -# sanitizer builds do not install HIP, this cpp-sdk-user example test -# is skipped when sanitizers are enabled. -if("${THEROCK_SANITIZER}" STREQUAL "") +# Examples are configured against the installed ROCm prefix. The +# cpp-sdk-user project requires HIP (LANGUAGES CXX HIP), so skip when +# HIP is not enabled (e.g. in early multi-arch CI stages) or when +# sanitizers are enabled (sanitizer builds do not install HIP). +if(THEROCK_ENABLE_HIP_RUNTIME AND "${THEROCK_SANITIZER}" STREQUAL "") add_test( NAME therock-examples-cpp-sdk-user COMMAND diff --git a/third-party/sysdeps/linux/CMakeLists.txt b/third-party/sysdeps/linux/CMakeLists.txt index dcc619f8de2..5e00d04e43c 100644 --- a/third-party/sysdeps/linux/CMakeLists.txt +++ b/third-party/sysdeps/linux/CMakeLists.txt @@ -1,34 +1,25 @@ # Copyright Advanced Micro Devices, Inc. # SPDX-License-Identifier: MIT -# All system deps (alpha unless if different dependency order needed). +# Core sysdeps: This artifact includes libraries that are widely used and are +# typically available on base systems. All of these should be small, fast to +# build, and high fanout to the codebase at large. +# Alpha order unless dependency order needed. add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/bzip2" "${CMAKE_CURRENT_BINARY_DIR}/bzip2") -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/expat" "${CMAKE_CURRENT_BINARY_DIR}/expat") -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/gmp" "${CMAKE_CURRENT_BINARY_DIR}/gmp") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/libbacktrace" "${CMAKE_CURRENT_BINARY_DIR}/libbacktrace") add_subdirectory(libcap) add_subdirectory(libdrm) add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/liblzma" "${CMAKE_CURRENT_BINARY_DIR}/liblzma") add_subdirectory(libmnl) add_subdirectory(libnl) -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/ncurses" "${CMAKE_CURRENT_BINARY_DIR}/ncurses") add_subdirectory(numactl) add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/sqlite3" "${CMAKE_CURRENT_BINARY_DIR}/sqlite3") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/zlib" "${CMAKE_CURRENT_BINARY_DIR}/zlib") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/zstd" "${CMAKE_CURRENT_BINARY_DIR}/zstd") -# System deps that depend on the above. +# Core system deps that depend on the above. add_subdirectory(elfutils) -# MPFR depends on GMP. -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/mpfr" "${CMAKE_CURRENT_BINARY_DIR}/mpfr") -# libpciaccess for PCI device access. -add_subdirectory(libpciaccess) -# hwloc depends on numactl and libpciaccess. -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/hwloc" "${CMAKE_CURRENT_BINARY_DIR}/hwloc") -# Core sysdeps: This artifact includes libraries that are widely used and are typically -# available on base systems. All of these should be small, fast to build, and high -# fanout to the codebase at large. therock_provide_artifact(sysdeps TARGET_NEUTRAL DESCRIPTOR artifact.toml @@ -68,6 +59,7 @@ endif() # Optional sysdep: expat if(THEROCK_ENABLE_SYSDEPS_EXPAT) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/expat" "${CMAKE_CURRENT_BINARY_DIR}/expat") therock_provide_artifact(sysdeps-expat TARGET_NEUTRAL DESCRIPTOR artifact-expat.toml @@ -82,6 +74,7 @@ endif() # Optional sysdep: gmp if(THEROCK_ENABLE_SYSDEPS_GMP) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/gmp" "${CMAKE_CURRENT_BINARY_DIR}/gmp") therock_provide_artifact(sysdeps-gmp TARGET_NEUTRAL DESCRIPTOR artifact-gmp.toml @@ -96,6 +89,7 @@ endif() # Optional sysdep: mpfr (depends on gmp) if(THEROCK_ENABLE_SYSDEPS_MPFR) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/mpfr" "${CMAKE_CURRENT_BINARY_DIR}/mpfr") therock_provide_artifact(sysdeps-mpfr TARGET_NEUTRAL DESCRIPTOR artifact-mpfr.toml @@ -110,6 +104,7 @@ endif() # Optional sysdep: ncurses if(THEROCK_ENABLE_SYSDEPS_NCURSES) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/ncurses" "${CMAKE_CURRENT_BINARY_DIR}/ncurses") therock_provide_artifact(sysdeps-ncurses TARGET_NEUTRAL DESCRIPTOR artifact-ncurses.toml @@ -122,8 +117,9 @@ if(THEROCK_ENABLE_SYSDEPS_NCURSES) ) endif() -# Optional sysdep: libpciaccess +# Optional sysdep: libpciaccess (PCI device access) if(THEROCK_ENABLE_SYSDEPS_LIBPCIACCESS) + add_subdirectory(libpciaccess) therock_provide_artifact(sysdeps-libpciaccess TARGET_NEUTRAL DESCRIPTOR artifact-libpciaccess.toml @@ -137,6 +133,7 @@ endif() # Optional sysdep: hwloc (depends on numactl and libpciaccess) if(THEROCK_ENABLE_SYSDEPS_HWLOC) + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../common/hwloc" "${CMAKE_CURRENT_BINARY_DIR}/hwloc") therock_provide_artifact(sysdeps-hwloc TARGET_NEUTRAL DESCRIPTOR artifact-hwloc.toml