diff --git a/ci/submodule-sync.sh b/ci/submodule-sync.sh index 25cc6b990..ea7c06b7e 100755 --- a/ci/submodule-sync.sh +++ b/ci/submodule-sync.sh @@ -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. @@ -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} \