Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c170600
Update conda and wheel builds to use `sccache-dist`
trxcllnt Nov 4, 2025
63c4cc4
Sort compilations by duration (descending)
trxcllnt Nov 4, 2025
6e08d85
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 4, 2025
962cdc5
use default value for NVCC_APPEND_FLAGS if unset
trxcllnt Nov 4, 2025
de57522
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 5, 2025
943b518
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 5, 2025
5caaabd
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 6, 2025
e2695f2
disable build cache for stress tests
trxcllnt Nov 6, 2025
8deeb4f
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 7, 2025
aa1a866
don't stop the server
trxcllnt Nov 7, 2025
541b568
use cpu16 instances for C++ builds
trxcllnt Nov 7, 2025
4acd9ba
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 7, 2025
0a2af73
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 7, 2025
c9ef7bb
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 8, 2025
073d6cb
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 10, 2025
3b1a94a
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 10, 2025
989bac5
remove SCCACHE_NO_CACHE=1
trxcllnt Nov 10, 2025
3bc8c22
use cpu8 GHA runners
trxcllnt Nov 10, 2025
d0b1934
lazily start the sccache daemon
trxcllnt Nov 11, 2025
05f4425
stop the sccache daemon instead of zeroing so that the first invocati…
trxcllnt Nov 11, 2025
fec50bb
list SCCACHE_DIST_AUTH_TOKEN as a conda build secret
trxcllnt Nov 11, 2025
24ee094
set portable to true
trxcllnt Nov 11, 2025
035e9bb
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 11, 2025
4db76a2
test cpu8 -> cpu4
trxcllnt Nov 11, 2025
6f28e97
Revert "test cpu8 -> cpu4"
trxcllnt Nov 12, 2025
fa35145
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 13, 2025
28fa7c3
use rapidsai/shared-workflows@main again
trxcllnt Nov 13, 2025
a4ab02b
use cpu16 for C++ builds
trxcllnt Nov 13, 2025
76a808f
revert diskann portable var change
trxcllnt Nov 13, 2025
e945542
pass SCCACHE_NO_CACHE and SCCACHE_RECACHE through to conda-build
trxcllnt Nov 13, 2025
a474775
test SCCACHE_RECACHE=1
trxcllnt Nov 13, 2025
ff6c97c
Merge branch 'main' of github.com:rapidsai/cuvs into fea/use-sccache-…
trxcllnt Nov 15, 2025
2b30b49
remove SCCACHE_RECACHE=1
trxcllnt Nov 15, 2025
5373e81
print stats in CI on server shutdown
trxcllnt Nov 15, 2025
3689b02
revert changes to CMakeLists.txt
trxcllnt Nov 15, 2025
e539832
add sccache-dist-token-secret-name to rocky8-clib-standalone-build
trxcllnt Nov 15, 2025
d9e3a3e
stop sccache server
trxcllnt Nov 15, 2025
973d5ec
install and use ninja
trxcllnt Nov 15, 2025
9c249dc
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 17, 2025
c91d77b
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 17, 2025
d9ee82a
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 17, 2025
0c24f17
fix bad version update
trxcllnt Nov 18, 2025
9b70e9d
fix bad version update
trxcllnt Nov 18, 2025
9e6e380
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 18, 2025
b71ae4c
use sccache in ci/build_rust.sh
trxcllnt Nov 18, 2025
e6692e1
fix lint
trxcllnt Nov 18, 2025
6587e23
ignore shellcheck
trxcllnt Nov 18, 2025
91792de
disable sccache-dist in rust-build because conda rust toolchains are …
trxcllnt Nov 18, 2025
b411a54
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 18, 2025
6382ab0
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 19, 2025
2a89f60
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 19, 2025
e705201
print env in build_wheel.sh
trxcllnt Nov 19, 2025
51c62dc
use S3 as the preprocessor cache location
trxcllnt Nov 19, 2025
91d4734
use S3 as the preprocessor cache location in devcontainers
trxcllnt Nov 19, 2025
ab5a180
fix lint
trxcllnt Nov 19, 2025
9a53167
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 20, 2025
f557a4b
add sccache-dist envvars to cuvs-bench-cpu recipe
trxcllnt Nov 20, 2025
0c54f1f
Apply suggestions from code review
trxcllnt Nov 20, 2025
85f79a3
Merge branch 'release/25.12' of github.com:rapidsai/cuvs into fea/use…
trxcllnt Nov 20, 2025
483a38a
enable sccache-dist in java jobs
trxcllnt Nov 22, 2025
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
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# syntax=docker/dockerfile:1.5

ARG BASE
Expand Down Expand Up @@ -42,6 +45,7 @@ ENV HISTFILE="/home/coder/.cache/._bash_history"
ENV AWS_ROLE_ARN="arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs"
ENV SCCACHE_REGION="us-east-2"
ENV SCCACHE_BUCKET="rapids-sccache-devs"
ENV SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true
ENV SCCACHE_IDLE_TIMEOUT=0

###
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ jobs:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
node_type: cpu16
script: ci/build_cpp.sh
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN

rocky8-clib-standalone-build:
secrets: inherit
Expand All @@ -63,6 +65,7 @@ jobs:
artifact-name: "libcuvs_c_${{ matrix.cuda_version }}.tar.gz"
file_to_upload: "libcuvs_c.tar.gz"
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
rust-build:
needs: cpp-build
secrets: inherit
Expand All @@ -84,6 +87,7 @@ jobs:
node_type: "gpu-l4-latest-1"
script: "ci/build_rust.sh"
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
go-build:
needs: cpp-build
secrets: inherit
Expand Down Expand Up @@ -127,6 +131,7 @@ jobs:
artifact-name: "cuvs-java-cuda${{ matrix.cuda_version }}"
file_to_upload: "java/cuvs-java/target/"
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
python-build:
needs: [cpp-build]
secrets: inherit
Expand All @@ -137,6 +142,7 @@ jobs:
date: ${{ inputs.date }}
script: ci/build_python.sh
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
upload-conda:
needs: [cpp-build, python-build]
secrets: inherit
Expand Down Expand Up @@ -173,11 +179,13 @@ jobs:
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
node_type: cpu16
script: ci/build_wheel_libcuvs.sh
# build for every combination of arch and CUDA version, but only for the latest Python
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
package-name: libcuvs
package-type: cpp
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
wheel-publish-libcuvs:
needs: wheel-build-libcuvs
secrets: inherit
Expand All @@ -198,8 +206,10 @@ jobs:
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
node_type: cpu8
script: ci/build_wheel_cuvs.sh
package-name: cuvs
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
package-type: python
wheel-publish-cuvs:
needs: wheel-build-cuvs
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ jobs:
build_type: pull-request
node_type: cpu16
script: ci/build_cpp.sh
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
conda-cpp-tests:
needs: [conda-cpp-build, changed-files]
secrets: inherit
Expand All @@ -152,6 +153,7 @@ jobs:
with:
build_type: pull-request
script: ci/test_cpp.sh
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
conda-cpp-checks:
needs: conda-cpp-build
secrets: inherit
Expand All @@ -174,6 +176,7 @@ jobs:
with:
build_type: pull-request
script: ci/test_python.sh
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
rocky8-clib-standalone-build:
needs: [checks]
secrets: inherit
Expand All @@ -195,6 +198,7 @@ jobs:
artifact-name: "libcuvs_c_${{ matrix.cuda_version }}.tar.gz"
file_to_upload: "libcuvs_c.tar.gz"
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
rocky8-clib-tests:
needs: [rocky8-clib-standalone-build, changed-files]
secrets: inherit
Expand Down Expand Up @@ -235,6 +239,7 @@ jobs:
script: "ci/test_java.sh"
artifact-name: "cuvs-java-cuda${{ matrix.cuda_version }}"
file_to_upload: "java/cuvs-java/target/"
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
rust-build:
needs: [conda-cpp-build, changed-files]
secrets: inherit
Expand All @@ -254,6 +259,7 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:25.12-cuda${{ matrix.cuda_version }}-ubuntu24.04-py3.13"
script: "ci/build_rust.sh"
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
go-build:
needs: [conda-cpp-build, changed-files]
secrets: inherit
Expand Down Expand Up @@ -289,20 +295,24 @@ jobs:
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/25.12
with:
build_type: pull-request
node_type: cpu16
script: ci/build_wheel_libcuvs.sh
# build for every combination of arch and CUDA version, but only for the latest Python
matrix_filter: group_by([.ARCH, (.CUDA_VER|split(".")|map(tonumber)|.[0])]) | map(max_by(.PY_VER|split(".")|map(tonumber)))
package-name: libcuvs
package-type: cpp
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
wheel-build-cuvs:
needs: wheel-build-libcuvs
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@release/25.12
with:
build_type: pull-request
node_type: cpu8
script: ci/build_wheel_cuvs.sh
package-name: cuvs
package-type: python
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
wheel-tests-cuvs:
needs: [wheel-build-cuvs, changed-files]
secrets: inherit
Expand All @@ -311,6 +321,7 @@ jobs:
with:
build_type: pull-request
script: ci/test_wheel_cuvs.sh
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
devcontainer:
secrets: inherit
needs: telemetry-setup
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
date: ${{ inputs.date }}
script: ci/test_cpp.sh
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
conda-python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@release/25.12
Expand All @@ -50,6 +51,7 @@ jobs:
date: ${{ inputs.date }}
script: ci/test_python.sh
sha: ${{ inputs.sha }}
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
conda-java-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/25.12
Expand All @@ -70,6 +72,7 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci-conda:25.12-cuda${{ matrix.cuda_version }}-ubuntu24.04-py3.13"
script: "ci/test_java.sh"
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
wheel-tests-cuvs:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@release/25.12
Expand All @@ -79,3 +82,4 @@ jobs:
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
script: ci/test_wheel_cuvs.sh
sccache-dist-token-secret-name: GIST_REPO_READ_ORG_GITHUB_TOKEN
5 changes: 2 additions & 3 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
set -euo pipefail

source rapids-configure-sccache

source rapids-date-string

export CMAKE_GENERATOR=Ninja
Expand All @@ -14,8 +13,7 @@ rapids-print-env

rapids-logger "Begin cpp build"

sccache --zero-stats

sccache --stop-server 2>/dev/null || true

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version)
export RAPIDS_PACKAGE_VERSION
Expand All @@ -35,6 +33,7 @@ rattler-build build --recipe conda/recipes/libcuvs \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats
sccache --stop-server >/dev/null 2>&1 || true

# remove build_cache directory
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache
9 changes: 9 additions & 0 deletions ci/build_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

set -euo pipefail

source rapids-configure-sccache

export SCCACHE_S3_KEY_PREFIX="cuvs-java/${RAPIDS_CONDA_ARCH}/cuda${RAPIDS_CUDA_VERSION%%.*}/maven/objects-cache"
export SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX="cuvs-java/${RAPIDS_CONDA_ARCH}/cuda${RAPIDS_CUDA_VERSION%%.*}/maven/preprocessor-cache"
export SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true

# TODO: Remove this argument-handling when build and test workflows are separated,
# and test_java.sh no longer calls build_java.sh
# ref: https://github.com/rapidsai/cuvs/issues/868
Expand Down Expand Up @@ -49,5 +55,8 @@ export RAPIDS_CUDA_MAJOR

bash ./build.sh java "${EXTRA_BUILD_ARGS[@]}"

sccache --show-adv-stats
sccache --stop-server >/dev/null 2>&1 || true

rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
13 changes: 5 additions & 8 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
set -euo pipefail

source rapids-configure-sccache

source rapids-date-string

export CMAKE_GENERATOR=Ninja
Expand All @@ -20,20 +19,17 @@ version=$(rapids-generate-version)
export RAPIDS_PACKAGE_VERSION=${version}
echo "${version}" > VERSION

sccache --zero-stats


# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
source rapids-rattler-channel-string

rapids-logger "Prepending channel ${CPP_CHANNEL} to RATTLER_CHANNELS"

RATTLER_CHANNELS=("--channel" "${CPP_CHANNEL}" "${RATTLER_CHANNELS[@]}")

sccache --zero-stats

rapids-logger "Building cuvs"

sccache --stop-server 2>/dev/null || true

# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
Expand All @@ -42,15 +38,15 @@ rattler-build build --recipe conda/recipes/cuvs \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats
sccache --zero-stats
sccache --stop-server >/dev/null 2>&1 || true

rattler-build build --recipe conda/recipes/cuvs-bench \
--test skip \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats
sccache --zero-stats
sccache --stop-server >/dev/null 2>&1 || true

# Build cuvs-bench-cpu only in one CUDA major version since it only depends on
# python version
Expand All @@ -60,4 +56,5 @@ if [[ ${RAPIDS_CUDA_MAJOR} == "13" ]]; then
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"
sccache --show-adv-stats
sccache --stop-server >/dev/null 2>&1 || true
fi
17 changes: 16 additions & 1 deletion ci/build_rust.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

set -euo pipefail
Expand All @@ -25,8 +25,20 @@ set +eu
conda activate rust
set -eu

source rapids-configure-sccache

# Don't use the build cluster because conda rust toolchains are too large
export SCCACHE_NO_DIST_COMPILE=1
export SCCACHE_S3_KEY_PREFIX="cuvs-rs/${RAPIDS_CONDA_ARCH}/cuda${RAPIDS_CUDA_VERSION%%.*}"
export SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX="cuvs-rs/${RAPIDS_CONDA_ARCH}/cuda${RAPIDS_CUDA_VERSION%%.*}/wheel/preprocessor-cache"
export SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true

rapids-print-env

rapids-logger "Begin rust build"

sccache --stop-server 2>/dev/null || true

# we need to set up LIBCLANG_PATH to allow rust bindgen to work,
# grab it from the conda env
LIBCLANG_PATH=$(dirname "$(find /opt/conda -name libclang.so | head -n 1)")
Expand All @@ -35,6 +47,9 @@ echo "LIBCLANG_PATH=$LIBCLANG_PATH"

bash ./build.sh rust

sccache --show-adv-stats
sccache --stop-server >/dev/null 2>&1 || true

# Also test out that we can publish cuvs-sys via a dry-run
pushd ./rust/cuvs-sys
cargo publish --dry-run
Expand Down
Loading