Skip to content
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

Allow RAPIDS workflow to run on an arbitrary branch. #3945

Merged
merged 1 commit into from
Feb 26, 2025
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
15 changes: 15 additions & 0 deletions .github/workflows/build-rapids.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: Build all RAPIDS repositories

on:
workflow_dispatch:
workflow_call:
inputs:
override_cccl_tag:
description: "If set, override the tag used for the CCCL repository."
required: false
default: ""
type: string
override_cccl_version:
description: "If set, override the version used by rapids-cmake to patch CCCL."
required: false
default: ""
type: string
enable_slack_alerts:
description: "If true, a message will be posted to the CCCL GHA CI Alert channel if the workflow fails."
required: false
Expand Down Expand Up @@ -57,6 +68,8 @@ jobs:
role-duration-seconds: 43200 # 12h
- name: Run command # Do not change this step's name, it is checked in parse-job-times.py
env:
CCCL_TAG: ${{ inputs.override_cccl_tag }}
CCCL_VERSION: ${{ inputs.override_cccl_version }}
CI: true
RAPIDS_LIBS: ${{ matrix.libs }}
# Uncomment any of these to customize the git repo and branch for a RAPIDS lib:
Expand Down Expand Up @@ -146,6 +159,8 @@ jobs:
--docker \
--cuda ${{matrix.cuda}} \
--host rapids-conda \
--env "CCCL_TAG=${CCCL_TAG}" \
--env "CCCL_VERSION=${CCCL_VERSION}" \
--env "AWS_ROLE_ARN=" \
--env "AWS_REGION=$AWS_REGION" \
--env "SCCACHE_REGION=$AWS_REGION" \
Expand Down
31 changes: 29 additions & 2 deletions ci/rapids/post-create-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,36 @@ _create_rapids_cmake_override_json() {
rapids_cmake_upstream="$(yq '.x-git-defaults.upstream' /opt/rapids-build-utils/manifest.yaml)";
fi

# Define CCCL_TAG to override the default CCCL SHA. Otherwise the current HEAD of the local checkout is used.
if test -n "${CCCL_TAG-}"; then
# If CCCL_TAG is defined, fetch it to the local checkout
git fetch origin "${CCCL_TAG}";
cccl_sha="$(git -C "${HOME}/cccl" rev-parse FETCH_HEAD)";
else
cccl_sha="$(git -C "${HOME}/cccl" rev-parse HEAD)";
fi
echo "CCCL_VERSION: ${CCCL_VERSION-}";
echo "CCCL_TAG: ${CCCL_TAG-}";
echo "cccl_sha: ${cccl_sha}";

echo
echo "Replacing CCCL repo information in rapids-cmake versions.json:";
curl -fsSL -o- "https://raw.githubusercontent.com/${rapids_cmake_upstream}/rapids-cmake/${rapids_cmake_tag}/rapids-cmake/cpm/versions.json" \
| jq -r ".packages.CCCL *= {\"git_url\": \"${HOME}/cccl\", \"git_tag\": \"$(git -C "${HOME}/cccl" rev-parse HEAD)\", \"always_download\": true}" \
| tee ~/rapids-cmake-override-versions.json;
| jq -r ".packages.CCCL *= {\"git_url\": \"${HOME}/cccl\", \"git_tag\": \"${cccl_sha}\", \"always_download\": true}" \
> ~/rapids-cmake-override-versions-cccl-repo.json;

if test -n "${CCCL_VERSION-}"; then
echo "Patching CCCL_VERSION in rapids-cmake versions.json:";
jq -r ".packages.CCCL.version = \"${CCCL_VERSION}\"" ~/rapids-cmake-override-versions-cccl-repo.json \
> ~/rapids-cmake-override-versions.json;
else
echo "Using the default CCCL version in rapids-cmake versions.json:";
mv ~/rapids-cmake-override-versions-cccl-repo.json ~/rapids-cmake-override-versions.json;
fi

echo
echo "Final rapids-cmake-override-versions.json:";
cat ~/rapids-cmake-override-versions.json;

# Define default CMake args for each repo
local -a cmake_args=(BUILD_TESTS BUILD_BENCHMARKS BUILD_PRIMS_BENCH BUILD_CUGRAPH_MG_TESTS);
Expand Down
Loading