Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/multi_arch_build_windows_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 31 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 12 additions & 15 deletions third-party/sysdeps/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading