Skip to content

Commit

Permalink
Revert "Update nightly build and deploy script for arm artifacts [ski…
Browse files Browse the repository at this point in the history
…p ci] (NVIDIA#9888)"

This reverts commit b92a0b4.
  • Loading branch information
ttnghia committed Dec 1, 2023
1 parent 688f899 commit 5d31719
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
9 changes: 4 additions & 5 deletions jenkins/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
# POM_FILE: Project pom file to be deployed
# OUT_PATH: The path where jar files are
# CUDA_CLASSIFIERS: Comma separated classifiers, e.g., "cuda11,cuda12"
# CLASSIFIERS: Comma separated classifiers, e.g., "cuda11,cuda12,cuda11-arm64,cuda12-arm64"
###

set -ex
Expand All @@ -49,7 +48,6 @@ ART_GROUP_ID=$(mvnEval $DIST_PL project.groupId)
ART_VER=$(mvnEval $DIST_PL project.version)
DEFAULT_CUDA_CLASSIFIER=$(mvnEval $DIST_PL cuda.version)
CUDA_CLASSIFIERS=${CUDA_CLASSIFIERS:-"$DEFAULT_CUDA_CLASSIFIER"}
CLASSIFIERS=${CLASSIFIERS:-"$CUDA_CLASSIFIERS"} # default as CUDA_CLASSIFIERS for compatibility

SQL_PL=${SQL_PL:-"sql-plugin"}
POM_FILE=${POM_FILE:-"$DIST_PL/target/parallel-world/META-INF/maven/${ART_GROUP_ID}/${ART_ID}/pom.xml"}
Expand All @@ -59,8 +57,9 @@ SIGN_TOOL=${SIGN_TOOL:-"gpg"}
FPATH="$OUT_PATH/$ART_ID-$ART_VER"
DEPLOY_TYPES=''
DEPLOY_FILES=''
DEPLOY_TYPES=$(echo $CLASSIFIERS | sed -e 's;[^,]*;jar;g')
DEPLOY_FILES=$(echo $CLASSIFIERS | sed -e "s;\([^,]*\);${FPATH}-\1.jar;g")
IFS=',' read -a CUDA_CLASSIFIERS_ARR <<< "$CUDA_CLASSIFIERS"
DEPLOY_TYPES=$(echo $CUDA_CLASSIFIERS | sed -e 's;[^,]*;jar;g')
DEPLOY_FILES=$(echo $CUDA_CLASSIFIERS | sed -e "s;\([^,]*\);${FPATH}-\1.jar;g")

# dist does not have javadoc and sources jars, use 'sql-plugin' instead
source jenkins/version-def.sh >/dev/null 2&>1
Expand Down Expand Up @@ -104,4 +103,4 @@ $DEPLOY_CMD -DpomFile=$POM_FILE \
-Djavadoc=$FPATH-javadoc.jar \
-Dfiles=$DEPLOY_FILES \
-Dtypes=$DEPLOY_TYPES \
-Dclassifiers=$CLASSIFIERS
-Dclassifiers=$CUDA_CLASSIFIERS
29 changes: 7 additions & 22 deletions jenkins/spark-nightly-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ ART_GROUP_ID=$(mvnEval project.groupId)
ART_VER=$(mvnEval project.version)
DEFAULT_CUDA_CLASSIFIER=${DEFAULT_CUDA_CLASSIFIER:-$(mvnEval cuda.version)} # default cuda version
CUDA_CLASSIFIERS=${CUDA_CLASSIFIERS:-"$DEFAULT_CUDA_CLASSIFIER"} # e.g. cuda11,cuda12
CLASSIFIERS=${CLASSIFIERS:-"$CUDA_CLASSIFIERS"} # default as CUDA_CLASSIFIERS for compatibility
IFS=',' read -a CLASSIFIERS_ARR <<< "$CLASSIFIERS"
IFS=',' read -a CUDA_CLASSIFIERS_ARR <<< "$CUDA_CLASSIFIERS"
TMP_PATH="/tmp/$(date '+%Y-%m-%d')-$$"

DIST_FPATH="$DIST_PL/target/$ART_ID-$ART_VER-$DEFAULT_CUDA_CLASSIFIER"
Expand Down Expand Up @@ -73,7 +72,7 @@ function distWithReducedPom {

deploy)
mvnCmd="deploy:deploy-file"
if (( ${#CLASSIFIERS_ARR[@]} > 1 )); then
if (( ${#CUDA_CLASSIFIERS_ARR[@]} > 1 )); then
# try move tmp artifacts back to target folder for simplifying separate release process
mv ${TMP_PATH}/${ART_ID}-${ART_VER}-*.jar ${DIST_PL}/target/
fi
Expand Down Expand Up @@ -103,11 +102,6 @@ function distWithReducedPom {

# option to skip unit tests. Used in our CI to separate test runs in parallel stages
SKIP_TESTS=${SKIP_TESTS:-"false"}
if [[ "${SKIP_TESTS}" == "true" ]]; then
# if skip test, we could try speed up build with multiple-threads
MVN="${MVN} -T1C"
fi

set +H # turn off history expansion
DEPLOY_SUBMODULES=${DEPLOY_SUBMODULES:-"!${DIST_PL}"} # TODO: deploy only required submodules to save time
for buildver in "${SPARK_SHIM_VERSIONS[@]:1}"; do
Expand Down Expand Up @@ -135,34 +129,25 @@ for buildver in "${SPARK_SHIM_VERSIONS[@]:1}"; do
done

installDistArtifact() {
local cuda_version="$1"
local opt="$2"
local cuda_classifier="$1"
$MVN -B clean install \
$opt \
$DIST_PROFILE_OPT \
-Dbuildver=$SPARK_BASE_SHIM_VERSION \
$MVN_URM_MIRROR \
-Dmaven.repo.local=$M2DIR \
-Dcuda.version=$cuda_version \
-Dcuda.version=$cuda_classifier \
-DskipTests=$SKIP_TESTS
}

# build extra cuda classifiers
if (( ${#CLASSIFIERS_ARR[@]} > 1 )); then
if (( ${#CUDA_CLASSIFIERS_ARR[@]} > 1 )); then
mkdir -p ${TMP_PATH}
for classifier in "${CLASSIFIERS_ARR[@]}"; do
for classifier in "${CUDA_CLASSIFIERS_ARR[@]}"; do
if [ "${classifier}" == "${DEFAULT_CUDA_CLASSIFIER}" ]; then
echo "skip default: ${DEFAULT_CUDA_CLASSIFIER} in build extra cuda classifiers step..."
continue
fi

opt=""
if [[ "${classifier}" == *"-arm64" ]]; then
opt="-Parm64"
fi
# pass cuda version and extra opt
installDistArtifact ${classifier%%-*} ${opt}

installDistArtifact ${classifier}
# move artifacts to temp for deployment later
artifactFile="${ART_ID}-${ART_VER}-${classifier}.jar"
mv ${DIST_PL}/target/${artifactFile} ${TMP_PATH}/
Expand Down

0 comments on commit 5d31719

Please sign in to comment.