From 8c16c0693168beedb1972d57fd741a9c7c4de8c9 Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Wed, 1 Feb 2023 18:26:35 -0500 Subject: [PATCH 1/4] Move date to build string in `conda` recipe This PR moves the date string from the version to the build string for conda recipes in this repository. This is necessary to ensure that the conda packages resulting from PR builds can be installed in the same environment as nightly conda packages. This is useful for testing purposes. Additionally, this PR adds the `PKG_HASH` value to our build string. This value is a hash computed from the dependency names and versions used to build our packages. Typically the `PKG_HASH` value is included in packages when the build string is omitted, as seen on most `conda-forge` packages. Including it in our build string will help ensure that new packages are published whenever our dependencies change (which is important in the case of shared library updates). xref: https://github.com/rapidsai/rmm/pull/1195 --- conda/recipes/kvikio/meta.yaml | 7 ++++--- conda/recipes/libkvikio/meta.yaml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/conda/recipes/kvikio/meta.yaml b/conda/recipes/kvikio/meta.yaml index d138bff435..a953c3cc03 100644 --- a/conda/recipes/kvikio/meta.yaml +++ b/conda/recipes/kvikio/meta.yaml @@ -1,9 +1,10 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2023, NVIDIA CORPORATION. -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} {% set py_version = environ.get('CONDA_PY', 36) %} {% set cuda_version = '.'.join(environ.get('CUDA', '11.5').split('.')[:2]) %} {% set cuda_major = cuda_version.split('.')[0] %} +{% set date_string = environ['RAPIDS_DATE_STRING'] %} package: name: kvikio @@ -14,7 +15,7 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda_{{ cuda_major }}_py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + string: cuda_{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_h{{ PKG_HASH }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: - VERSION_SUFFIX - PARALLEL_LEVEL diff --git a/conda/recipes/libkvikio/meta.yaml b/conda/recipes/libkvikio/meta.yaml index 77696df2d7..a931f8f8d5 100644 --- a/conda/recipes/libkvikio/meta.yaml +++ b/conda/recipes/libkvikio/meta.yaml @@ -1,8 +1,9 @@ -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2023, NVIDIA CORPORATION. -{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') + environ.get('VERSION_SUFFIX', '') %} +{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} {% set cuda_version='.'.join(environ.get('CUDA', '11.5').split('.')[:2]) %} {% set cuda_major=cuda_version.split('.')[0] %} +{% set date_string = environ['RAPIDS_DATE_STRING'] %} package: name: libkvikio @@ -13,7 +14,7 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ date_string }}_h{{ PKG_HASH }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: - PARALLEL_LEVEL - VERSION_SUFFIX From 700c523f56a9273f507141157c17786a95da304b Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Thu, 2 Feb 2023 15:10:45 -0500 Subject: [PATCH 2/4] add `RAPIDS_DATE_STRING` workaround for Jenkins builds --- ci/cpu/build.sh | 5 +---- ci/gpu/build.sh | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index d11e817696..41d139363a 100644 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -26,10 +26,7 @@ export CONDA_BLD_DIR="$WORKSPACE/.conda-bld" # Switch to project root; also root of repo checkout cd "$WORKSPACE" -# If nightly build, append current YYMMDD to version -if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then - export VERSION_SUFFIX=`date +%y%m%d` -fi +export RAPIDS_DATE_STRING=$(git show --no-patch --date=format:'%y%m%d' --format='%cd') ################################################################################ # SETUP - Check environment diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 70c9c34352..01d6d24651 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -30,6 +30,8 @@ export GIT_DESCRIBE_TAG=`git describe --tags` export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` unset GIT_DESCRIBE_TAG +export RAPIDS_DATE_STRING=$(git show --no-patch --date=format:'%y%m%d' --format='%cd') + ################################################################################ # SETUP - Check environment ################################################################################ From faa8facb56de493a230493dadec57516e84ca02d Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Fri, 3 Feb 2023 10:55:12 -0500 Subject: [PATCH 3/4] rm `PKG_HASH` from build string --- conda/recipes/kvikio/meta.yaml | 2 +- conda/recipes/libkvikio/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/kvikio/meta.yaml b/conda/recipes/kvikio/meta.yaml index a953c3cc03..239a5b6d83 100644 --- a/conda/recipes/kvikio/meta.yaml +++ b/conda/recipes/kvikio/meta.yaml @@ -15,7 +15,7 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda_{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_h{{ PKG_HASH }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + string: cuda_{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: - VERSION_SUFFIX - PARALLEL_LEVEL diff --git a/conda/recipes/libkvikio/meta.yaml b/conda/recipes/libkvikio/meta.yaml index a931f8f8d5..d5290d8a9a 100644 --- a/conda/recipes/libkvikio/meta.yaml +++ b/conda/recipes/libkvikio/meta.yaml @@ -14,7 +14,7 @@ source: build: number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_{{ date_string }}_h{{ PKG_HASH }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} script_env: - PARALLEL_LEVEL - VERSION_SUFFIX From ff2c9970172614f193ac7be4f2ac6fb9d23bb41c Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Fri, 3 Feb 2023 11:11:20 -0500 Subject: [PATCH 4/4] switch back to `date` implementation for now --- ci/cpu/build.sh | 2 +- ci/gpu/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/cpu/build.sh b/ci/cpu/build.sh index 41d139363a..3d9ce6e221 100644 --- a/ci/cpu/build.sh +++ b/ci/cpu/build.sh @@ -26,7 +26,7 @@ export CONDA_BLD_DIR="$WORKSPACE/.conda-bld" # Switch to project root; also root of repo checkout cd "$WORKSPACE" -export RAPIDS_DATE_STRING=$(git show --no-patch --date=format:'%y%m%d' --format='%cd') +export RAPIDS_DATE_STRING=$(date +%y%m%d) ################################################################################ # SETUP - Check environment diff --git a/ci/gpu/build.sh b/ci/gpu/build.sh index 01d6d24651..673b050616 100644 --- a/ci/gpu/build.sh +++ b/ci/gpu/build.sh @@ -30,7 +30,7 @@ export GIT_DESCRIBE_TAG=`git describe --tags` export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` unset GIT_DESCRIBE_TAG -export RAPIDS_DATE_STRING=$(git show --no-patch --date=format:'%y%m%d' --format='%cd') +export RAPIDS_DATE_STRING=$(date +%y%m%d) ################################################################################ # SETUP - Check environment