Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spaces in build.sh paths #385

Merged
merged 7 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ set -e
# Set path and build parallel level
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CUDF_HOME="${WORKSPACE}/cudf"
export CUDF_HOME="$WORKSPACE/cudf"

export GIT_DESCRIBE=`git describe --tags`
export MINOR_VERSION=`echo $GIT_DESCRIBE | grep -o -E '([0-9]+\.[0-9]+)'`

# Set home to the job's workspace
export HOME=$WORKSPACE
export HOME="$WORKSPACE"

# Determine CUDA release version
export CUDA_REL=${CUDA_VERSION%.*}
Expand All @@ -27,7 +27,7 @@ export GPUCI_CONDA_RETRY_SLEEP=30
export CMAKE_GENERATOR="Ninja"

# Switch to project root; also root of repo checkout
cd $WORKSPACE
cd "$WORKSPACE"

# If nightly build, append current YYMMDD to version
if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
Expand Down Expand Up @@ -81,7 +81,7 @@ if [ "$BUILD_CUSPATIAL" == '1' ]; then
gpuci_conda_retry build conda/recipes/cuspatial
else
gpuci_conda_retry build --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ conda/recipes/cuspatial
-c "$WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/" conda/recipes/cuspatial
jolorunyomi marked this conversation as resolved.
Show resolved Hide resolved
fi
fi

Expand Down
12 changes: 6 additions & 6 deletions ci/docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ if [ -z "$PROJECT_WORKSPACE" ]; then
exit 1
fi

export DOCS_WORKSPACE=$WORKSPACE/docs
export DOCS_WORKSPACE="$WORKSPACE/docs"
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export HOME=$WORKSPACE
export HOME="$WORKSPACE"
export PROJECT_WORKSPACE=/rapids/cuspatial
export LIBCUDF_KERNEL_CACHE_PATH="$HOME/.jitify-cache"
export NIGHTLY_VERSION=$(echo $BRANCH_VERSION | awk -F. '{print $2}')
Expand Down Expand Up @@ -44,18 +44,18 @@ conda list --show-channel-urls

# Build Python docs
gpuci_logger "Build Sphinx docs"
cd $PROJECT_WORKSPACE/docs
cd "$PROJECT_WORKSPACE/docs"
make html

#Commit to Website
cd $DOCS_WORKSPACE
cd "$DOCS_WORKSPACE"

for PROJECT in ${PROJECTS[@]}; do
if [ ! -d "api/$PROJECT/$BRANCH_VERSION" ]; then
mkdir -p api/$PROJECT/$BRANCH_VERSION
fi
rm -rf $DOCS_WORKSPACE/api/$PROJECT/$BRANCH_VERSION/*
rm -rf "$DOCS_WORKSPACE/api/"$PROJECT/$BRANCH_VERSION/*
jolorunyomi marked this conversation as resolved.
Show resolved Hide resolved
done

mv $PROJECT_WORKSPACE/docs/build/html/* $DOCS_WORKSPACE/api/cuspatial/$BRANCH_VERSION
mv "$PROJECT_WORKSPACE/docs/build/html/"* "$DOCS_WORKSPACE/api/cuspatial/"$BRANCH_VERSION
jolorunyomi marked this conversation as resolved.
Show resolved Hide resolved

34 changes: 17 additions & 17 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ function hasArg {
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CUDA_REL=${CUDA_VERSION%.*}
export CUDF_HOME="${WORKSPACE}/cudf"
export CUSPATIAL_HOME="${WORKSPACE}"
export CUDF_HOME="$WORKSPACE/cudf"
export CUSPATIAL_HOME="$WORKSPACE"

# Set home to the job's workspace
export HOME=$WORKSPACE
export HOME="$WORKSPACE"

# Parse git describe
cd $WORKSPACE
cd "$WORKSPACE"
export GIT_DESCRIBE_TAG=`git describe --tags`
export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'`

Expand Down Expand Up @@ -72,7 +72,7 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
################################################################################

gpuci_logger "Build cuSpatial"
cd $WORKSPACE
cd "$WORKSPACE"
./build.sh clean libcuspatial cuspatial tests

###############################################################################
Expand All @@ -86,12 +86,12 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
nvidia-smi

gpuci_logger "GoogleTests"
cd $WORKSPACE/cpp/build
cd "$WORKSPACE/cpp/build"

for gt in ${WORKSPACE}/cpp/build/gtests/* ; do
for gt in "$WORKSPACE/cpp/build/gtests/"* ; do
test_name=$(basename ${gt})
echo "Running GoogleTest $test_name"
${gt} --gtest_output=xml:${WORKSPACE}/test-results/
${gt} --gtest_output=xml:"$WORKSPACE/test-results/"
done

gpuci_logger "Download/Generate Test Data"
Expand All @@ -101,13 +101,13 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
#TODO

#Python Unit tests for cuSpatial
cd $WORKSPACE/python/cuspatial
py.test --cache-clear --junitxml=${WORKSPACE}/junit-cuspatial.xml -v
cd "$WORKSPACE/python/cuspatial"
py.test --cache-clear --junitxml="$WORKSPACE/junit-cuspatial.xml" -v
fi
else
export LD_LIBRARY_PATH="$WORKSPACE/ci/artifacts/cuspatial/cpu/conda_work/cpp/build:$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$WORKSPACE/ci/artifacts/cuspatial/cpu/conda_work/cpp/build":$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
trxcllnt marked this conversation as resolved.
Show resolved Hide resolved

TESTRESULTS_DIR=${WORKSPACE}/test-results/
TESTRESULTS_DIR="$WORKSPACE/test-results/"
mkdir -p ${TESTRESULTS_DIR}
SUITEERROR=0

Expand All @@ -116,7 +116,7 @@ else

gpuci_logger "Running googletests"
# run gtests
cd $WORKSPACE/ci/artifacts/cuspatial/cpu/conda_work/
cd "$WORKSPACE/ci/artifacts/cuspatial/cpu/conda_work/"
for gt in cpp/build/gtests/* ; do
test_name=$(basename ${gt})
echo "Running GoogleTest $test_name"
Expand All @@ -128,21 +128,21 @@ else
fi
done

cd $WORKSPACE/python
cd "$WORKSPACE/python"

CONDA_FILE=`find $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ -name "libcuspatial*.tar.bz2"`
CONDA_FILE=`find "$WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/" -name "libcuspatial*.tar.bz2"`
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
gpuci_logger "Installing $CONDA_FILE"
conda install -c $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ "$CONDA_FILE"
conda install -c "$WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/" "$CONDA_FILE"

export LIBCUGRAPH_BUILD_DIR="$WORKSPACE/ci/artifacts/cuspatial/cpu/conda_work/build"

gpuci_logger "Building cuspatial"
"$WORKSPACE/build.sh" -v cuspatial

gpuci_logger "Run pytests"
py.test --cache-clear --junitxml=${WORKSPACE}/junit-cuspatial.xml -v
py.test --cache-clear --junitxml="$WORKSPACE/junit-cuspatial.xml" -v

EXITCODE=$?
if (( ${EXITCODE} != 0 )); then
Expand Down
2 changes: 1 addition & 1 deletion ci/local/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ set -e
WORKSPACE=${REPO_PATH_IN_CONTAINER}
PREBUILD_SCRIPT=${REPO_PATH_IN_CONTAINER}/ci/gpu/prebuild.sh
BUILD_SCRIPT=${REPO_PATH_IN_CONTAINER}/ci/gpu/build.sh
cd \${WORKSPACE}
cd "\$WORKSPACE"
jolorunyomi marked this conversation as resolved.
Show resolved Hide resolved
if [ -f \${PREBUILD_SCRIPT} ]; then
source \${PREBUILD_SCRIPT}
fi
Expand Down