diff --git a/.github/workflows/build-rapids.yml b/.github/workflows/build-rapids.yml index de739c1a161..a60c501278c 100644 --- a/.github/workflows/build-rapids.yml +++ b/.github/workflows/build-rapids.yml @@ -3,6 +3,11 @@ name: Build all RAPIDS repositories on: workflow_call: inputs: + override_cccl_tag: + description: "If set, override the tag used for the CCCL repository." + 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 @@ -57,6 +62,7 @@ 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 }} CI: true RAPIDS_LIBS: ${{ matrix.libs }} # Uncomment any of these to customize the git repo and branch for a RAPIDS lib: @@ -146,6 +152,7 @@ jobs: --docker \ --cuda ${{matrix.cuda}} \ --host rapids-conda \ + --env "CCCL_TAG=${CCCL_TAG}" \ --env "AWS_ROLE_ARN=" \ --env "AWS_REGION=$AWS_REGION" \ --env "SCCACHE_REGION=$AWS_REGION" \ diff --git a/.github/workflows/ci-workflow-pull-request.yml b/.github/workflows/ci-workflow-pull-request.yml index 3c4a4e09700..e53f968bcb8 100644 --- a/.github/workflows/ci-workflow-pull-request.yml +++ b/.github/workflows/ci-workflow-pull-request.yml @@ -201,6 +201,8 @@ jobs: contents: read pull-requests: read uses: ./.github/workflows/build-rapids.yml + with: + override_cccl_tag: "branch/2.8.x" build-matx: name: Build MatX diff --git a/ci/rapids/post-create-command.sh b/ci/rapids/post-create-command.sh index dea94465948..066c696c18e 100755 --- a/ci/rapids/post-create-command.sh +++ b/ci/rapids/post-create-command.sh @@ -64,8 +64,19 @@ _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_TAG: ${CCCL_TAG-HEAD}"; + echo "cccl_sha: ${cccl_sha}"; + 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}" \ + | jq -r ".packages.CCCL *= {\"git_url\": \"${HOME}/cccl\", \"git_tag\": \"${cccl_sha}\", \"always_download\": true}" \ | tee ~/rapids-cmake-override-versions.json; # Define default CMake args for each repo