Skip to content

Commit

Permalink
handle more RAPIDS version formats in update-version.sh, refactor dep…
Browse files Browse the repository at this point in the history
…endencies.yaml (#174)

Contributes to rapidsai/build-planning#13.

Updates `update-version.sh` to correctly handle RAPIDS dependencies like `cudf-cu12==24.2.*`.

This also pulls in some dependency refactoring originally added in #161, which allows greater use of dependencies.yaml globs (and therefore less maintenance effort to support new CUDA versions).

### How I tested this

The portability of this updated `sed` command was tested here: rapidsai/cudf#14825 (comment).

In this repo, I ran the following:

```shell
./ci/release/update-version.sh '0.36.00'
git diff

./ci/release/update-version.sh '0.37.00
git diff
```

Confirmed that that first `git diff` changed all the things I expected, and that second one showed 0 changes.

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Bradley Dice (https://github.com/bdice)
  - https://github.com/jakirkham

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)
  - https://github.com/jakirkham

URL: #174
  • Loading branch information
jameslamb authored Jan 25, 2024
1 parent 470b844 commit ed7c281
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.ref_type == 'branch'
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.02
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.04
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
docs-build:
needs: conda-cpp-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.02
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.04
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand Down
2 changes: 1 addition & 1 deletion ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libucxx

export RAPIDS_VERSION_NUMBER="24.02"
export RAPIDS_VERSION_NUMBER="24.04"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-logger "Build CPP docs"
Expand Down
26 changes: 21 additions & 5 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
NEXT_RAPIDS_VERSION="$(curl -sL https://version.gpuci.io/ucx-py/${NEXT_SHORT_TAG})"

# Need to distutils-normalize the versions for some use cases
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_RAPIDS_VERSION}'))")
echo "Next tag is ${NEXT_SHORT_TAG_PEP440}"
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")
NEXT_RAPIDS_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_RAPIDS_VERSION}'))")
echo "Next tag is ${NEXT_RAPIDS_SHORT_TAG_PEP440}"

echo "Preparing release: $NEXT_FULL_TAG"

Expand All @@ -44,6 +45,7 @@ sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/distributed
# bump RAPIDS libs
sed_runner "/- librmm =/ s/=.*/=${NEXT_RAPIDS_VERSION}/g" conda/recipes/ucxx/meta.yaml
sed_runner "/- rmm =/ s/=.*/=${NEXT_RAPIDS_VERSION}/g" conda/recipes/ucxx/meta.yaml
sed_runner "/- rapids-dask-dependency =/ s/=.*/=${NEXT_RAPIDS_VERSION}/g" conda/recipes/ucxx/meta.yaml

# doxyfile update
sed_runner 's/PROJECT_NUMBER = .*/PROJECT_NUMBER = '${NEXT_FULL_TAG}'/g' cpp/doxygen/Doxyfile
Expand All @@ -54,12 +56,26 @@ DEPENDENCIES=(
dask-cudf
librmm
rmm
rapids-dask-dependency
)
for DEP in "${DEPENDENCIES[@]}"; do
for FILE in dependencies.yaml conda/environments/*.yaml; do
sed_runner "/-.* ${DEP}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}\.*/g" ${FILE};
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_RAPIDS_SHORT_TAG_PEP440}.*/g" "${FILE}"
done
sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}\.*\"/g" python/pyproject.toml;
sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_RAPIDS_SHORT_TAG_PEP440}\.*\"/g" python/pyproject.toml
sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_RAPIDS_SHORT_TAG_PEP440}\.*\"/g" python/distributed-ucxx/pyproject.toml
done

UCXX_DEPENDENCIES=(
ucxx
distributed-ucxx
)
for DEP in "${UCXX_DEPENDENCIES[@]}"; do
for FILE in dependencies.yaml; do
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*/g" "${FILE}"
done
sed_runner "/\"${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}\.*\"/g" python/pyproject.toml
sed_runner "/\"${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}\.*\"/g" python/distributed-ucxx/pyproject.toml
done

# rapids-cmake version
Expand All @@ -68,4 +84,4 @@ sed_runner 's/'"branch-.*\/RAPIDS.cmake"'/'"branch-${NEXT_RAPIDS_VERSION}\/RAPID
for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_RAPIDS_VERSION}/g" "${FILE}"
done
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_RAPIDS_VERSION}\"/g" ci/build_docs.sh
5 changes: 3 additions & 2 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ dependencies:
- cupy>=12.0.0
- cxx-compiler
- cython>=3.0.0
- dask
- dask-cuda==24.4.*
- dask-cudf==24.4.*
- distributed
- doxygen=1.9.1
- fmt>=10.1.1,<11
- gmock>=1.13.0
Expand All @@ -39,8 +37,11 @@ dependencies:
- pytest-asyncio
- pytest-rerunfailures
- python>=3.9,<3.11
- rapids-dask-dependency==24.4.*
- rmm==24.4.*
- scikit-build-core>=0.7.0
- setuptools>=64.0.0
- spdlog>=1.12.0,<1.13
- tomli
- ucx
name: all_cuda-118_arch-x86_64
5 changes: 3 additions & 2 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ dependencies:
- cupy>=12.0.0
- cxx-compiler
- cython>=3.0.0
- dask
- dask-cuda==24.4.*
- dask-cudf==24.4.*
- distributed
- doxygen=1.9.1
- fmt>=10.1.1,<11
- gmock>=1.13.0
Expand All @@ -39,8 +37,11 @@ dependencies:
- pytest-asyncio
- pytest-rerunfailures
- python>=3.9,<3.11
- rapids-dask-dependency==24.4.*
- rmm==24.4.*
- scikit-build-core>=0.7.0
- setuptools>=64.0.0
- spdlog>=1.12.0,<1.13
- tomli
- ucx
name: all_cuda-120_arch-x86_64
3 changes: 1 addition & 2 deletions conda/recipes/ucxx/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ outputs:
- tomli
run:
- python * *_cpython
- dask >=2023.9.2
- distributed >=2023.9.2
- rapids-dask-dependency =24.04
- {{ pin_subpackage('ucxx', max_pin='x.x') }}
test:
imports:
Expand Down
2 changes: 1 addition & 1 deletion cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = libucxx
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.36.00
PROJECT_NUMBER = 0.37.00

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Loading

0 comments on commit ed7c281

Please sign in to comment.