diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 261c4d6d..e82c3992 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,11 +34,15 @@ concurrency: permissions: {} jobs: + build-details: + uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main build: + needs: [build-details] secrets: inherit # zizmor: ignore[secrets-inherit] uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main with: build_type: ${{ inputs.build_type || 'branch' }} + build-datetime: ${{ needs.build-details.outputs.build-datetime }} branch: ${{ inputs.branch }} date: ${{ inputs.date }} script: ci/build_python.sh diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index d033a1fe..1c9bbc9d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -15,12 +15,15 @@ jobs: pr-builder: needs: - build + - build-details - checks - check-nightly-ci - test-conda-nightly-env uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main permissions: contents: read + build-details: + uses: rapidsai/shared-workflows/.github/workflows/compute-build-details.yaml@main check-nightly-ci: runs-on: ubuntu-latest permissions: @@ -51,11 +54,12 @@ jobs: persist-credentials: false - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 build: - needs: checks + needs: [build-details, checks] secrets: inherit # zizmor: ignore[secrets-inherit] uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main with: build_type: pull-request + build-datetime: ${{ needs.build-details.outputs.build-datetime }} script: ci/build_python.sh pure-conda: cuda_major permissions: diff --git a/ci/build_python.sh b/ci/build_python.sh index 9dc72106..0796643a 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -1,11 +1,11 @@ #!/bin/bash -# Copyright (c) 2022-2025, NVIDIA CORPORATION. +# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. set -euo pipefail source rapids-configure-sccache -source rapids-date-string +source rapids-datetime-string RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) export RAPIDS_PACKAGE_VERSION diff --git a/ci/check_conda_nightly_env.py b/ci/check_conda_nightly_env.py index 43c4c309..f9a2b89d 100644 --- a/ci/check_conda_nightly_env.py +++ b/ci/check_conda_nightly_env.py @@ -1,4 +1,4 @@ -# Copyright (c) 2024-2025, NVIDIA CORPORATION. +# Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. import json import re import sys @@ -33,16 +33,16 @@ def get_package_date(package): if package["name"] in EXCLUDED_PACKAGES: return None - # Matches 6 digits starting with "2", which should be YYMMDD - date_re = r"(?:^|_)(2\d{5})_" + # Matches 12 digits starting with "2", which should be YYMMDDhhmmss + date_re = r"(?:^|_)(2\d{11})_" # Use regex to find the date string in the input match = re.search(date_re, package["build_string"]) if match: - # Convert the date string to a datetime object - date_string = match.group(1) - date_object = datetime.strptime(date_string, "%y%m%d") + # Convert the date-time string to a datetime object + datetime_string = match.group(1) + date_object = datetime.strptime(datetime_string, "%y%m%d%H%M%S") return date_object print( diff --git a/conda/recipes/rapids-xgboost/recipe.yaml b/conda/recipes/rapids-xgboost/recipe.yaml index 984467c1..500738e1 100644 --- a/conda/recipes/rapids-xgboost/recipe.yaml +++ b/conda/recipes/rapids-xgboost/recipe.yaml @@ -5,7 +5,7 @@ context: rapids_version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }} cuda_version: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[:2] | join(".") }} cuda_major: '${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[0] }}' - date_string: '${{ env.get("RAPIDS_DATE_STRING") }}' + datetime_string: '${{ env.get("RAPIDS_DATETIME_STRING") }}' head_rev: ${{ git.head_rev(".")[:8] }} package: @@ -17,7 +17,7 @@ source: build: noarch: python - string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }} + string: cuda${{ cuda_major }}_${{ datetime_string }}_${{ head_rev }} requirements: host: diff --git a/conda/recipes/rapids/recipe.yaml b/conda/recipes/rapids/recipe.yaml index 18e6ba18..3071a599 100644 --- a/conda/recipes/rapids/recipe.yaml +++ b/conda/recipes/rapids/recipe.yaml @@ -6,7 +6,7 @@ context: minor_version: ${{ (version | split("."))[:2] | join(".") }} cuda_version: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[:2] | join(".") }} cuda_major: '${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[0] }}' - date_string: '${{ env.get("RAPIDS_DATE_STRING") }}' + datetime_string: '${{ env.get("RAPIDS_DATETIME_STRING") }}' head_rev: ${{ git.head_rev(".")[:8] }} package: @@ -18,7 +18,7 @@ source: build: noarch: python - string: cuda${{ cuda_major }}_${{ date_string }}_${{ head_rev }} + string: cuda${{ cuda_major }}_${{ datetime_string }}_${{ head_rev }} requirements: host: