Skip to content

Commit

Permalink
Make submodule-sync always try update cudf-pins (#2504)
Browse files Browse the repository at this point in the history
Signed-off-by: Peixin Li <[email protected]>
  • Loading branch information
pxLi authored Oct 16, 2024
1 parent 41945c6 commit e118e6e
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions ci/submodule-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,19 @@ if [ -n "$CUDF_TAG" ]; then
else
git submodule update --remote --merge
fi

cudf_pins_only=false
cudf_sha=$(git -C thirdparty/cudf rev-parse HEAD)
if [[ "${cudf_sha}" == "${cudf_prev_sha}" ]]; then
echo "Submodule is up to date."
exit 0
echo "cuDF submodule is up to date. Try update cudf-pins..."
cudf_pins_only=true
else
echo "Try update cudf submodule to ${cudf_sha}..."
git add .
git commit -s -m "Update submodule cudf to ${cudf_sha}"
fi

echo "Try update cudf submodule to ${cudf_sha}..."
git add .

echo "Test against ${cudf_sha}..."

echo "Build libcudf only to update pinned versions..."
MVN="mvn -Dmaven.wagon.http.retryHandler.count=3 -B"
set +e
# Don't do a full build. Just try to update/build CUDF with no patches on top of it.
Expand Down Expand Up @@ -101,9 +103,17 @@ sed -i -e 's/4\.0\.1\.0/3.0.6/' \
# the updated versions.json generated by the build
echo "Update cudf submodule to ${cudf_sha} with updated pinned versions"
git add .
git diff-index --quiet HEAD || git commit -s -m "Update submodule cudf to ${cudf_sha}"
if ! git diff-index --quiet HEAD; then
# We perform a squash merge for submodule-sync commits
git commit -s -m "Update pinned versions for cudf ${cudf_sha}"
elif ${cudf_pins_only}; then
echo "No changes to commit. Exit early..."
exit 0
fi

sha=$(git rev-parse HEAD)

echo "Test against ${cudf_sha}..."
set +e
# now build and test everything with the patches in place
${MVN} clean verify ${MVN_MIRROR} \
Expand Down

0 comments on commit e118e6e

Please sign in to comment.