Skip to content

Commit

Permalink
Use custom conda build directory for ccache (#368)
Browse files Browse the repository at this point in the history
This changes the conda build directory to be a consistent directory when building packages. The resulting work directory from conda must be moved to a repo specific folder for project flash to work.

Authors:
  - Dillon Cullinan (https://github.com/dillon-cullinan)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Paul Taylor (https://github.com/trxcllnt)

URL: #368
  • Loading branch information
dillon-cullinan authored Apr 16, 2021
1 parent a7f61a1 commit d7cbb99
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
15 changes: 9 additions & 6 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ export CUDA_REL=${CUDA_VERSION%.*}
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30

# Use Ninja to build
# Use Ninja to build, setup conda build dir
export CMAKE_GENERATOR="Ninja"
export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld"

# Switch to project root; also root of repo checkout
cd $WORKSPACE
Expand Down Expand Up @@ -69,19 +70,21 @@ conda config --set ssl_verify False
if [ "$BUILD_LIBCUSPATIAL" == '1' ]; then
gpuci_logger "Build conda pkg for libcuspatial"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build conda/recipes/libcuspatial
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuspatial
else
gpuci_conda_retry build --dirty --no-remove-work-dir conda/recipes/libcuspatial
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcuspatial
mkdir -p ${CONDA_BLD_DIR}/libcuspatial/work
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcuspatial/work
fi
fi

if [ "$BUILD_CUSPATIAL" == '1' ]; then
gpuci_logger "Build conda pkg for cuspatial"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build conda/recipes/cuspatial
gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cuspatial
else
gpuci_conda_retry build --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ conda/recipes/cuspatial
gpuci_conda_retry build --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/cuspatial/cpu/.conda-bld/ conda/recipes/cuspatial
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions ci/cpu/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fi
################################################################################

gpuci_logger "Get conda file output locations"
export LIBCUSPATIAL_FILE=`conda build conda/recipes/libcuspatial --output`
export CUSPATIAL_FILE=`conda build conda/recipes/cuspatial --python=$PYTHON --output`
export LIBCUSPATIAL_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcuspatial --output`
export CUSPATIAL_FILE=`conda build --croot ${CONDA_BLD_DIR} conda/recipes/cuspatial --python=$PYTHON --output`

################################################################################
# UPLOAD - Conda packages
Expand Down
5 changes: 3 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CUDA_REL=${CUDA_VERSION%.*}
export CUDF_HOME="${WORKSPACE}/cudf"
export CUSPATIAL_HOME="${WORKSPACE}"
export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/cuspatial/cpu/.conda-bld/

# Set home to the job's workspace
export HOME=$WORKSPACE
Expand Down Expand Up @@ -130,11 +131,11 @@ else

cd $WORKSPACE/python

CONDA_FILE=`find $WORKSPACE/ci/artifacts/cuspatial/cpu/conda-bld/ -name "libcuspatial*.tar.bz2"`
CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -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 ${CONDA_ARTIFACT_PATH} "$CONDA_FILE"

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

Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/libcuspatial/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package:
version: {{ version }}

source:
path: ../../..
git_url: ../../..

build:
number: {{ GIT_DESCRIBE_NUMBER }}
Expand Down

0 comments on commit d7cbb99

Please sign in to comment.