diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d2ce0aff9d..dab8c67104 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -530,6 +530,7 @@ jobs: build-images: needs: + - build-details - wheel-publish-cuopt - wheel-publish-cuopt-server - wheel-publish-cuopt-sh-client @@ -546,3 +547,4 @@ jobs: sha: ${{ inputs.sha }} date: ${{ inputs.date }} build_type: ${{ inputs.build_type || 'branch' }} + build-datetime: ${{ needs.build-details.outputs.build-datetime }} diff --git a/.github/workflows/build_test_publish_images.yaml b/.github/workflows/build_test_publish_images.yaml index b4f92013b5..f82b29222f 100644 --- a/.github/workflows/build_test_publish_images.yaml +++ b/.github/workflows/build_test_publish_images.yaml @@ -14,6 +14,10 @@ on: type: string build_type: type: string + build-datetime: + type: string + required: true + description: 'Build datetime from compute-build-details, matching the published wheels' arch: type: string default: '["amd64", "arm64"]' @@ -83,19 +87,22 @@ jobs: - name: Compute cuopt version id: compute-cuopt-ver + env: + BUILD_DATETIME: ${{ inputs.build-datetime }} run: | - source rapids-datetime-string - # .post makes every nightly version unique (see ci/build_wheel.sh); ignored on release builds. - ver=$(RAPIDS_VERSION_SUFFIX=".post${RAPIDS_DATETIME_STRING}" rapids-generate-version) + # .post matches the suffix ci/build_wheel.sh gave the published wheels. + # The value comes from the same compute-build-details job that stamped them, so the + # pin resolves to this run's build. It is a no-op on release builds. + ver=$(RAPIDS_VERSION_SUFFIX=".post${BUILD_DATETIME}" rapids-generate-version) # Remove starting 0s from version 25.08.0a18 -> 25.8.0a18 CUOPT_VER=$(echo "$ver" | sed -E 's/\.0+([0-9])/\.\1/g') - echo "CUOPT_VER=$CUOPT_VER" >> $GITHUB_OUTPUT + echo "CUOPT_VER=$CUOPT_VER" >> "$GITHUB_OUTPUT" if rapids-is-release-build; then IMAGE_TAG_PREFIX="$CUOPT_VER" else IMAGE_TAG_PREFIX=$(echo "$CUOPT_VER" | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)a.*/\1a/') fi - echo "IMAGE_TAG_PREFIX=$IMAGE_TAG_PREFIX" >> $GITHUB_OUTPUT + echo "IMAGE_TAG_PREFIX=$IMAGE_TAG_PREFIX" >> "$GITHUB_OUTPUT" build-images: name: Build images