-
Notifications
You must be signed in to change notification settings - Fork 146
Extend CI to build and test x86 libcuvs_c tarballs #1524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cfb16f9
9cc6c15
96ee53a
f805243
97ed149
5c4f41c
ac37c33
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,29 @@ jobs: | |
| date: ${{ inputs.date }} | ||
| script: ci/build_cpp.sh | ||
| sha: ${{ inputs.sha }} | ||
|
|
||
| rocky8-clib-standalone-build: | ||
| secrets: inherit | ||
| uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| cuda_version: | ||
| - &latest_cuda12 '12.9.1' | ||
| - &latest_cuda13 '13.0.2' | ||
| with: | ||
| build_type: ${{ inputs.build_type || 'branch' }} | ||
| branch: ${{ inputs.branch }} | ||
| arch: "amd64" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we only supporting amd64 with the C library?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have on my todo to extend the matrix to arm + x86 but that isn't a hard requirement for 25.12. If you know how to easily extend the matrix in a custom job I would happily integrate it into this PR.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's defer this until later. You can just add a |
||
| date: ${{ inputs.date }} | ||
| container_image: "rapidsai/ci-wheel:25.12-cuda${{ matrix.cuda_version }}-rockylinux8-py3.10" | ||
| node_type: "cpu16" | ||
| name: "${{ matrix.cuda_version }}, amd64, rockylinux8" | ||
| # requires_license_builder: false | ||
| script: "ci/build_standalone_c.sh" | ||
| artifact-name: "libcuvs_c_${{ matrix.cuda_version }}.tar.gz" | ||
| file_to_upload: "libcuvs_c.tar.gz" | ||
| sha: ${{ inputs.sha }} | ||
| rust-build: | ||
| needs: cpp-build | ||
| secrets: inherit | ||
|
|
@@ -51,8 +74,8 @@ jobs: | |
| fail-fast: false | ||
| matrix: | ||
| cuda_version: | ||
| - &latest_cuda12 '12.9.1' | ||
| - &latest_cuda13 '13.0.2' | ||
| - *latest_cuda12 | ||
| - *latest_cuda13 | ||
| with: | ||
| build_type: ${{ inputs.build_type || 'branch' }} | ||
| branch: ${{ inputs.branch }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| TOOLSET_VERSION=14 | ||
| CMAKE_VERSION=3.31.8 | ||
robertmaynard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| CMAKE_ARCH=x86_64 | ||
|
|
||
| BUILD_C_LIB_TESTS="OFF" | ||
| if [[ "${1:-}" == "--build-tests" ]]; then | ||
| BUILD_C_LIB_TESTS="ON" | ||
| fi | ||
|
|
||
| dnf install -y \ | ||
| patch \ | ||
| tar \ | ||
| make | ||
|
|
||
| # Fetch and install CMake. | ||
| if [ ! -e "/usr/local/bin/cmake" ]; then | ||
| pushd /usr/local | ||
| wget --quiet https://github.com/Kitware/CMake/releases/download/v"${CMAKE_VERSION}"/cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}".tar.gz | ||
| tar zxf cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}".tar.gz | ||
| rm cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}".tar.gz | ||
| ln -s /usr/local/cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}"/bin/cmake /usr/local/bin/cmake | ||
| popd | ||
| fi | ||
|
|
||
| source rapids-configure-sccache | ||
|
|
||
| source rapids-date-string | ||
|
|
||
| rapids-print-env | ||
|
|
||
| rapids-logger "Begin cpp build" | ||
|
|
||
| sccache --zero-stats | ||
|
|
||
|
|
||
| RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) | ||
| export RAPIDS_PACKAGE_VERSION | ||
|
|
||
| RAPIDS_ARTIFACTS_DIR=${RAPIDS_ARTIFACTS_DIR:-"${PWD}/artifacts"} | ||
| mkdir -p "${RAPIDS_ARTIFACTS_DIR}" | ||
| export RAPIDS_ARTIFACTS_DIR | ||
|
|
||
| scl enable gcc-toolset-${TOOLSET_VERSION} -- \ | ||
| cmake -S cpp -B cpp/build/ \ | ||
| -DCMAKE_CUDA_HOST_COMPILER=/opt/rh/gcc-toolset-${TOOLSET_VERSION}/root/usr/bin/gcc \ | ||
| -DCMAKE_CUDA_ARCHITECTURES=RAPIDS \ | ||
| -DBUILD_SHARED_LIBS=OFF \ | ||
| -DCUTLASS_ENABLE_TESTS=OFF \ | ||
| -DDISABLE_OPENMP=OFF \ | ||
| -DBUILD_TESTS=OFF \ | ||
| -DBUILD_SHARED_LIBS=ON \ | ||
| -DCUVS_STATIC_RAPIDS_LIBRARIES=ON | ||
| cmake --build cpp/build "-j${PARALLEL_LEVEL}" | ||
|
|
||
| rapids-logger "Begin c build" | ||
|
|
||
| scl enable gcc-toolset-${TOOLSET_VERSION} -- \ | ||
| cmake -S c -B c/build \ | ||
| -DCMAKE_CUDA_HOST_COMPILER=/opt/rh/gcc-toolset-${TOOLSET_VERSION}/root/usr/bin/gcc \ | ||
| -DCUVSC_STATIC_CUVS_LIBRARY=ON \ | ||
| -DCMAKE_PREFIX_PATH="$PWD/cpp/build/" \ | ||
| -DBUILD_TESTS=${BUILD_C_LIB_TESTS} | ||
| cmake --build c/build "-j${PARALLEL_LEVEL}" | ||
|
|
||
| rapids-logger "Begin c install" | ||
| cmake --install c/build --prefix c/build/install | ||
|
|
||
| # need to install the tests | ||
| if [ "${BUILD_C_LIB_TESTS}" != "OFF" ]; then | ||
| cmake --install c/build --prefix c/build/install --component testing | ||
| fi | ||
|
|
||
|
|
||
| rapids-logger "Begin gathering licenses" | ||
| cp LICENSE c/build/install/ | ||
| if [ -e "./tool/extract_licenses_via_spdx.py" ]; then | ||
| python ./tool/extract_licenses_via_spdx.py "." --with-licenses >> c/build/install/LICENSE | ||
| fi | ||
|
|
||
| rapids-logger "Begin c tarball creation" | ||
| tar czf libcuvs_c.tar.gz -C c/build/install/ . | ||
| ls -lh libcuvs_c.tar.gz | ||
|
|
||
| sccache --show-adv-stats | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| CMAKE_VERSION=4.1.2 | ||
| CMAKE_ARCH=x86_64 | ||
|
|
||
| # Fetch and install CMake. | ||
| if [ ! -e "/usr/local/bin/cmake" ]; then | ||
| pushd /usr/local | ||
| wget --quiet https://github.com/Kitware/CMake/releases/download/v"${CMAKE_VERSION}"/cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}".tar.gz | ||
| tar zxf cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}".tar.gz | ||
| rm cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}".tar.gz | ||
| ln -s /usr/local/cmake-"${CMAKE_VERSION}"-linux-"${CMAKE_ARCH}"/bin/cmake /usr/local/bin/cmake | ||
| popd | ||
| fi | ||
|
|
||
| # Download the standalone C library artifact | ||
| payload_name="libcuvs_c_${RAPIDS_CUDA_VERSION}.tar.gz" | ||
| pkg_name="libcuvs_c.tar.gz" | ||
| rapids-logger "Download ${payload_name} artifacts from previous jobs" | ||
| DOWNLOAD_LOCATION=$(rapids-download-from-github "${payload_name}") | ||
|
|
||
| # Extract the artifact to a staging directory | ||
| INSTALL_PREFIX="${PWD}/libcuvs_c_install" | ||
| mkdir -p "${INSTALL_PREFIX}" | ||
| ls -l "${DOWNLOAD_LOCATION}" | ||
| tar -xf "${DOWNLOAD_LOCATION}/${pkg_name}" -C "${INSTALL_PREFIX}" | ||
|
|
||
| rapids-logger "Run C API tests" | ||
| ls -l "${INSTALL_PREFIX}" | ||
| cd "$INSTALL_PREFIX"/bin/gtests/libcuvs | ||
| ctest -j8 --output-on-failure | ||
|
|
||
| rapids-logger "C API tests completed successfully" |
Uh oh!
There was an error while loading. Please reload this page.