Skip to content

Commit

Permalink
Move date to build string in conda recipe
Browse files Browse the repository at this point in the history
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: rapidsai/rmm#1195
  • Loading branch information
ajschmidt8 committed Feb 1, 2023
1 parent 3c4c422 commit d367c64
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 15 deletions.
7 changes: 4 additions & 3 deletions conda/recipes/rapids-build-env/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-2023, NVIDIA CORPORATION.

{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') + environ.get('VERSION_SUFFIX', '') %}
{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') %}
{% set minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %}
{% set cuda_version = '.'.join(environ.get('CUDA_VER', '10.0').split('.')[:2]) %}
{% set py_version = environ.get('CONDA_PY', 36) %}
{% set cuda_major=cuda_version.split('.')[0] %}
{% set date_string = environ['RAPIDS_DATE_STRING'] %}

###
# Versions referenced below are set in `conda/recipe/*versions.yaml` except for
Expand All @@ -26,7 +27,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:
- CUDA_VERSION
- RAPIDS_VER
Expand Down
7 changes: 4 additions & 3 deletions conda/recipes/rapids-doc-env/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-2023, NVIDIA CORPORATION.

{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') + environ.get('VERSION_SUFFIX', '') %}
{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') %}
{% set minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %}
{% set py_version = environ.get('CONDA_PY', 36) %}
{% set date_string = environ['RAPIDS_DATE_STRING'] %}

###
# Versions referenced below are set in `conda/recipe/*versions.yaml` except for
Expand All @@ -24,7 +25,7 @@ source:

build:
number: {{ GIT_DESCRIBE_NUMBER }}
string: py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
string: py{{ py_version }}_{{ date_string }}_h{{ PKG_HASH }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script_env:
- RAPIDS_VER
- VERSION_SUFFIX
Expand Down
7 changes: 4 additions & 3 deletions conda/recipes/rapids-notebook-env/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-2023, NVIDIA CORPORATION.

{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') + environ.get('VERSION_SUFFIX', '') %}
{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') %}
{% set minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %}
{% set cuda_version = '.'.join(environ.get('CUDA_VER', '10.0').split('.')[:2]) %}
{% set py_version = environ.get('CONDA_PY', 36) %}
{% set cuda_major=cuda_version.split('.')[0] %}
{% set date_string = environ['RAPIDS_DATE_STRING'] %}

###
# Versions referenced below are set in `conda/recipe/*versions.yaml` except for
Expand All @@ -26,7 +27,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:
- CUDA_VERSION
- RAPIDS_VER
Expand Down
7 changes: 4 additions & 3 deletions conda/recipes/rapids-xgboost/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2019, NVIDIA CORPORATION.
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') + environ.get('VERSION_SUFFIX', '') %}
{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') %}
{% set minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %}
{% set cuda_version = '.'.join(environ.get('CUDA_VER', '10.0').split('.')[:2]) %}
{% set py_version = environ.get('CONDA_PY', 36) %}
{% set cuda_major=cuda_version.split('.')[0] %}
{% set date_string = environ['RAPIDS_DATE_STRING'] %}

###
# Versions referenced below are set in `conda/recipe/*versions.yaml` except for
Expand All @@ -26,7 +27,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:
- CUDA_VERSION
- RAPIDS_VER
Expand Down
7 changes: 4 additions & 3 deletions conda/recipes/rapids/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Copyright (c) 2019, NVIDIA CORPORATION.
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') + environ.get('VERSION_SUFFIX', '') %}
{% set rapids_version = environ.get('RAPIDS_VER', '0.0.0') %}
{% set minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %}
{% set cuda_version = '.'.join(environ.get('CUDA_VER', '10.0').split('.')[:2]) %}
{% set py_version = environ.get('CONDA_PY', 36) %}
{% set cuda_major=cuda_version.split('.')[0] %}
{% set date_string = environ['RAPIDS_DATE_STRING'] %}

###
# Versions referenced below are set in `conda/recipe/*versions.yaml` except for
Expand All @@ -26,7 +27,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:
- CUDA_VERSION
- RAPIDS_VER
Expand Down

0 comments on commit d367c64

Please sign in to comment.