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
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build and Release

on:
pull_request:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
name: Build and Release
runs-on: runs-on=${{ github.run_id }}/runner=gpu/tag=cudf-test-harness
container:
image: nvidia/cuda:13.1.0-devel-ubuntu24.04

steps:
- uses: runs-on/action@v2
with:
sccache: s3

- name: Configure sccache timeout
run: |
mkdir -p ~/.config/sccache
echo 'server_startup_timeout_ms = 60000' > ~/.config/sccache/config

- name: Install sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10

- name: Pre-start sccache server
run: sccache --start-server

- name: Install build tools
run: |
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
curl
curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc -o /usr/share/keyrings/kitware-archive-keyring.asc
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.asc] https://apt.kitware.com/ubuntu/ noble main' > /etc/apt/sources.list.d/kitware.list
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
ninja-build \
tar \
zlib1g-dev
cmake --version
/usr/local/cuda/bin/nvcc --version

- name: Checkout
uses: actions/checkout@v4

- name: Build
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=sccache \
-DBUILD_TEST_LIB=OFF
cmake --build build

- name: Create bundle
run: |
chmod +x scripts/bundle.sh
./scripts/bundle.sh

- name: Verify bundle
run: |
rm -rf /tmp/cudf-test-harness-bundle
mkdir -p /tmp/cudf-test-harness-bundle
tar -xzf build/bundle/cudf-test-harness-*.tar.gz -C /tmp/cudf-test-harness-bundle
BINARY="$(echo /tmp/cudf-test-harness-bundle/*/cudf-test-harness)"
readelf -d "$BINARY" | grep -F '$ORIGIN/lib'
OUTPUT="$("$BINARY" 2>&1 || true)"
echo "$OUTPUT" | grep 'Usage:'

- name: Upload artifact
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: cudf-test-harness-linux-x86_64
path: build/bundle/*.tar.gz

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: build/bundle/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61 changes: 0 additions & 61 deletions .github/workflows/release.yml

This file was deleted.

10 changes: 7 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ and a non-zero exit code should be returned.

## Building

Expect that this is being build in a CMake project, inside of a conda environment where the following has been run:
Build with CMake:

```
conda install -c rapidsai -c conda-forge -c nvidia rapidsai::libcudf
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DBUILD_TEST_LIB=OFF
cmake --build build
```

The binary should build in debug mode with full debug symbols by default.
The CMake configure step fetches and builds cuDF `26.04.00` from source, including the dependencies managed by cuDF's RAPIDS CMake files. This source-build path requires CMake 3.30.4 or newer and CUDA Toolkit 13.0 or newer. The binary builds in debug mode with full debug symbols by default when `CMAKE_BUILD_TYPE` is not set.

## Links

Expand Down
39 changes: 29 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.26)
cmake_minimum_required(VERSION 3.30.4)

project(cudf-test-harness LANGUAGES CXX CUDA)
project(cudf-test-harness LANGUAGES C CXX CUDA)

# Default to Debug build with full debug symbols
if(NOT CMAKE_BUILD_TYPE)
Expand All @@ -9,13 +9,36 @@ endif()

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)

# Debug flags
set(CMAKE_CXX_FLAGS_DEBUG "-g3 -O0")
set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0")

# Find cuDF
find_package(cudf REQUIRED)
include(FetchContent)
find_package(CUDAToolkit REQUIRED)

if(CUDAToolkit_VERSION VERSION_LESS 13.0)
message(FATAL_ERROR "cuDF 26.04.00 source builds require CUDA Toolkit 13.0 or newer")
endif()

foreach(option
BUILD_TESTS
BUILD_BENCHMARKS
CUDF_BUILD_TESTUTIL
CUDF_BUILD_STREAMS_TEST_UTIL
CUDF_KVIKIO_REMOTE_IO
)
set(${option} OFF CACHE BOOL "Disabled for cudf-test-harness cuDF source build" FORCE)
endforeach()

FetchContent_Declare(
cudf
GIT_REPOSITORY https://github.com/rapidsai/cudf.git
GIT_TAG f9c3cf195768647ac39d98674a614ca414cd1baa
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(cudf)

# Create the executable
add_executable(cudf-test-harness
Expand All @@ -26,25 +49,21 @@ target_include_directories(cudf-test-harness PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)

# Use the conda environment's libstdc++ to match cuDF
# Must be linked before other libraries to override system libstdc++
target_link_libraries(cudf-test-harness PRIVATE
$ENV{CONDA_PREFIX}/lib/libstdc++.so
cudf::cudf
${CMAKE_DL_LIBS}
)

# Set RPATH for bundled distribution (looks for libs relative to binary)
# During build, also include conda lib path
set_target_properties(cudf-test-harness PROPERTIES
BUILD_RPATH "$ENV{CONDA_PREFIX}/lib"
INSTALL_RPATH "$ORIGIN/lib"
BUILD_WITH_INSTALL_RPATH OFF
)

# Install target
install(TARGETS cudf-test-harness
RUNTIME DESTINATION bin
RUNTIME DESTINATION .
COMPONENT harness
)

# Optional: Build test library
Expand Down
13 changes: 2 additions & 11 deletions scripts/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ mkdir -p "$BUNDLE_PATH/lib"

echo "Collecting dependencies for $BINARY..."

# Copy the binary
cp "$BINARY" "$BUNDLE_PATH/"
# Install the binary so CMake applies the bundle RPATH.
cmake --install "$BUILD_DIR" --prefix "$BUNDLE_PATH" --component harness

# Get all shared library dependencies (excluding system libraries we expect to exist)
# We keep: libcu*, libnv*, librmm*, libcudf*, libarrow*, libstdc++, etc.
Expand Down Expand Up @@ -88,15 +88,6 @@ exec "${SCRIPT_DIR}/cudf-test-harness" "$@"
WRAPPER_EOF
chmod +x "$BUNDLE_PATH/cudf-test-harness.sh"

# Also patch the binary's rpath to look in ./lib (for direct execution)
if command -v patchelf &> /dev/null; then
echo "Patching rpath..."
patchelf --set-rpath '$ORIGIN/lib' "$BUNDLE_PATH/cudf-test-harness"
else
echo "Warning: patchelf not found. Install it for direct binary execution."
echo " Without it, use the wrapper script: ./cudf-test-harness.sh"
fi

# Create tarball
echo ""
echo "Creating tarball..."
Expand Down
Loading