Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.
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
2 changes: 1 addition & 1 deletion ci/checks/changelog.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# COPYRIGHT (c) 2020, NVIDIA CORPORATION.
#########################
# cuSpatial CHANGELOG Tester #
#########################
Expand Down
7 changes: 4 additions & 3 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# COPYRIGHT (c) 2020, NVIDIA CORPORATION.
#####################
# cuSpatial Style Tester #
#####################

# Ignore errors and set path
set +e
PATH=/conda/bin:$PATH
PATH=/opt/conda/bin:$PATH
LC_ALL=C.UTF-8
LANG=C.UTF-8

# Activate common conda env
source activate gdf
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

# Run isort and get results/return code
ISORT=`isort --check-only python/**/*.py`
Expand Down
35 changes: 21 additions & 14 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# COPYRIGHT (c) 2020, NVIDIA CORPORATION.
######################################
# cuSpatial CPU conda build script for CI #
######################################
set -e

# Logger function for build status output
function logger() {
function gpuci_logger() {
echo -e "\n>>>> $@\n"
}

# Set path and build parallel level
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=4
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=-4
export CUDF_HOME="${WORKSPACE}/cudf"
Comment thread
msadang marked this conversation as resolved.
Resolved

# Set home to the job's workspace
Expand All @@ -26,21 +26,28 @@ if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
export VERSION_SUFFIX=`date +%y%m%d`
fi

# Setup 'gpuci_conda_retry' for build retries (results in 2 total attempts)
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30

################################################################################
# SETUP - Check environment
################################################################################

logger "Get env..."
gpuci_logger "Get env"
env

logger "Activate conda env..."
source activate gdf
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids

logger "Check versions..."
gpuci_logger "Check versions"
python --version
gcc --version
g++ --version
conda list
$CC --version
$CXX --version
conda info
conda config --show-sources
conda list --show-channel-urls

# FIX Added to deal with Anancoda SSL verification issues during conda builds
conda config --set ssl_verify False
Expand All @@ -49,17 +56,17 @@ conda config --set ssl_verify False
# BUILD - Conda package builds (conda deps: libcupatial <- cuspatial)
##########################################################################################

logger "Build conda pkg for libcuspatial..."
gpuci_logger "Build conda pkg for libcuspatial"
cd $WORKSPACE
source ci/cpu/libcuspatial/build_libcuspatial.sh

logger "Build conda pkg for cuspatial..."
gpuci_logger "Build conda pkg for cuspatial"
source ci/cpu/cuspatial/build_cuspatial.sh

################################################################################
# UPLOAD - Conda packages
################################################################################

logger "Upload conda pkgs..."
gpuci_logger "Upload conda pkgs"
source ci/cpu/upload_anaconda.sh

2 changes: 1 addition & 1 deletion ci/cpu/cuspatial/build_cuspatial.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set -e

echo "Building cuspatial"
conda build conda/recipes/cuspatial --python=$PYTHON
gpuci_conda_retry build conda/recipes/cuspatial --python=$PYTHON

2 changes: 1 addition & 1 deletion ci/cpu/libcuspatial/build_libcuspatial.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set -e

echo "Building libcuspatial"
conda build conda/recipes/libcuspatial
gpuci_conda_retry build conda/recipes/libcuspatial

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

set -e

export LIBCUSPATIAL_FILE=`conda build conda/recipes/libcuspatial --output`
export CUSPATIAL_FILE=`conda build conda/recipes/cuspatial --python=$PYTHON --output`
export LIBCUSPATIAL_FILE=`gpuci_conda_retry build conda/recipes/libcuspatial --output`
export CUSPATIAL_FILE=`gpuci_conda_retry build conda/recipes/cuspatial --python=$PYTHON --output`

CUDA_REL=${CUDA_VERSION%.*}

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

export DOCS_WORKSPACE=$WORKSPACE/docs
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
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}')
export PROJECTS=(cuspatial)

logger "Check environment..."
gpuci_logger "Check environment"
env

logger "Check GPU usage..."
gpuci_logger "Check GPU usage"
nvidia-smi

logger "Activate conda env..."
source activate rapids
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids
# TODO: Move installs to docs-build-env meta package
conda install -c anaconda markdown beautifulsoup4 jq
gpuci_conda_retry install -c anaconda markdown beautifulsoup4 jq
pip install sphinx-markdown-tables


logger "Check versions..."
gpuci_logger "Check versions"
python --version
$CC --version
$CXX --version
conda list
conda info
conda config --show-sources
conda list --show-channel-urls

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

Expand Down
41 changes: 22 additions & 19 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018, NVIDIA CORPORATION.
# COPYRIGHT (c) 2020, NVIDIA CORPORATION.
#########################################
# cuSpatial GPU build and test script for CI #
#########################################
Expand All @@ -8,7 +8,7 @@ NUMARGS=$#
ARGS=$*

# Logger function for build status output
function logger() {
function gpuci_logger() {
echo -e "\n>>>> $@\n"
}

Expand All @@ -18,8 +18,8 @@ function hasArg {
}

# Set path and build parallel level
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=4
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=-4
export CUDA_REL=${CUDA_VERSION%.*}
export CUDF_HOME="${WORKSPACE}/cudf"
export CUSPATIAL_HOME="${WORKSPACE}"
Expand All @@ -36,32 +36,35 @@ export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'`
# SETUP - Check environment
################################################################################

logger "Check environment..."
gpuci_logger "Check environment"
env

logger "Check GPU usage..."
gpuci_logger "Check GPU usage"
nvidia-smi

logger "Activate conda env..."
source activate gdf
conda install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \
gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids
gpuci_conda_retry install "cudf=${MINOR_VERSION}.*" "cudatoolkit=$CUDA_REL" \
"rapids-build-env=$MINOR_VERSION.*"

# https://docs.rapids.ai/maintainers/depmgmt/
# conda remove -f rapids-build-env
# conda install "your-pkg=1.0.0"
# gpuci_conda_retry install "your-pkg=1.0.0"

logger "Check versions..."
gpuci_logger "Check versions"
python --version
$CC --version
$CXX --version
conda list
conda info
conda config --show-sources
conda list --show-channel-urls

################################################################################
# cuSpatial currently requires a the cudf repo for private headers
################################################################################

logger "Clone cudf"
gpuci_logger "Clone cudf"
git clone https://github.com/rapidsai/cudf.git -b branch-$MINOR_VERSION ${CUDF_HOME}
cd $CUDF_HOME
git submodule update --init --remote --recursive
Expand All @@ -70,7 +73,7 @@ git submodule update --init --remote --recursive
# BUILD - Build libcuspatial and cuSpatial from source
################################################################################

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

Expand All @@ -79,12 +82,12 @@ cd $WORKSPACE
###############################################################################

if hasArg --skip-tests; then
logger "Skipping tests..."
gpuci_logger "Skipping tests"
else
logger "Check GPU usage..."
gpuci_logger "Check GPU usage"
nvidia-smi

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

for gt in ${WORKSPACE}/cpp/build/gtests/* ; do
Expand All @@ -93,10 +96,10 @@ else
${gt} --gtest_output=xml:${WORKSPACE}/test-results/
done

logger "Download/Generate Test Data"
gpuci_logger "Download/Generate Test Data"
#TODO

logger "Test cuSpatial"
gpuci_logger "Test cuSpatial"
#TODO

#Python Unit tests for cuSpatial
Expand Down
3 changes: 2 additions & 1 deletion ci/local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ For a full list of available gpuCI docker images, visit our [DockerHub](https://
Style Check:
```bash
$ bash ci/local/build.sh -r ~/rapids/cuspatial -s
$ source activate rapids # Activate gpuCI conda environment
$ . /opt/conda/etc/profile.d/conda.sh
$ conda activate rapids # Activate gpuCI conda environment
$ cd rapids
$ flake8 python
```
Expand Down