Skip to content

Commit

Permalink
new build all option (#3916)
Browse files Browse the repository at this point in the history
option to build all

Renamed the old buildAll function to buildDefault 
Added a check for the "all" argument

Authors:
  - Brad Rees (https://github.com/BradReesWork)

Approvers:
  - Joseph Nke (https://github.com/jnke2016)
  - Rick Ratzel (https://github.com/rlratzel)

URL: #3916
  • Loading branch information
BradReesWork authored Oct 12, 2023
1 parent f605d6a commit 63e282e
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ VALIDARGS="
uninstall
libcugraph
libcugraph_etl
pylibcugraph
cugraph
cugraph-service
pylibcugraph
cpp-mgtests
cugraph-pyg
cugraph-dgl
nx-cugraph
cpp-mgtests
docs
all
-v
-g
-n
Expand All @@ -52,13 +53,14 @@ HELP="$0 [<target> ...] [<flag> ...]
libcugraph - build libcugraph.so and SG test binaries
libcugraph_etl - build libcugraph_etl.so and SG test binaries
pylibcugraph - build the pylibcugraph Python package
cugraph-pyg - build the cugraph-pyg Python package
cugraph - build the cugraph Python package
nx-cugraph - build the nx-cugraph Python package
cugraph-service - build the cugraph-service_client and cugraph-service_server Python package
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
cugraph-pyg - build the cugraph-pyg Python package
cugraph-dgl - build the cugraph-dgl extensions for DGL
nx-cugraph - build the nx-cugraph Python package
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
docs - build the docs
all - build everything
and <flag> is:
-v - verbose build mode
-g - build for debug
Expand All @@ -71,7 +73,7 @@ HELP="$0 [<target> ...] [<flag> ...]
--clean - clean an individual target (note: to do a complete rebuild, use the clean target described above)
-h - print this text
default action (no args) is to build and install 'libcugraph' then 'libcugraph_etl' then 'pylibcugraph' then 'cugraph' targets
default action (no args) is to build and install 'libcugraph' then 'libcugraph_etl' then 'pylibcugraph' and then 'cugraph' targets
libcugraph build dir is: ${LIBCUGRAPH_BUILD_DIR}
Expand Down Expand Up @@ -119,7 +121,7 @@ function hasArg {
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
}

function buildAll {
function buildDefault {
(( ${NUMARGS} == 0 )) || !(echo " ${ARGS} " | grep -q " [^-][a-zA-Z0-9\_\-]\+ ")
}

Expand Down Expand Up @@ -170,7 +172,7 @@ fi
if hasArg --without_cugraphops; then
BUILD_WITH_CUGRAPHOPS=OFF
fi
if hasArg cpp-mgtests; then
if hasArg cpp-mgtests || hasArg all; then
BUILD_CPP_MG_TESTS=ON
fi
if hasArg --cmake_default_generator; then
Expand Down Expand Up @@ -240,7 +242,7 @@ fi

################################################################################
# Configure, build, and install libcugraph
if buildAll || hasArg libcugraph; then
if buildDefault || hasArg libcugraph || hasArg all; then
if hasArg --clean; then
if [ -d ${LIBCUGRAPH_BUILD_DIR} ]; then
find ${LIBCUGRAPH_BUILD_DIR} -mindepth 1 -delete
Expand Down Expand Up @@ -270,7 +272,7 @@ if buildAll || hasArg libcugraph; then
fi

# Configure, build, and install libcugraph_etl
if buildAll || hasArg libcugraph_etl; then
if buildDefault || hasArg libcugraph_etl || hasArg all; then
if hasArg --clean; then
if [ -d ${LIBCUGRAPH_ETL_BUILD_DIR} ]; then
find ${LIBCUGRAPH_ETL_BUILD_DIR} -mindepth 1 -delete
Expand Down Expand Up @@ -301,7 +303,7 @@ if buildAll || hasArg libcugraph_etl; then
fi

# Build, and install pylibcugraph
if buildAll || hasArg pylibcugraph; then
if buildDefault || hasArg pylibcugraph || hasArg all; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/pylibcugraph
else
Expand All @@ -328,7 +330,7 @@ if buildAll || hasArg pylibcugraph; then
fi

# Build and install the cugraph Python package
if buildAll || hasArg cugraph; then
if buildDefault || hasArg cugraph || hasArg all; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph
else
Expand All @@ -355,7 +357,7 @@ if buildAll || hasArg cugraph; then
fi

# Install the cugraph-service-client and cugraph-service-server Python packages
if hasArg cugraph-service; then
if hasArg cugraph-service || hasArg all; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph-service
else
Expand All @@ -365,7 +367,7 @@ if hasArg cugraph-service; then
fi

# Build and install the cugraph-pyg Python package
if hasArg cugraph-pyg; then
if hasArg cugraph-pyg || hasArg all; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph-pyg
else
Expand All @@ -374,7 +376,7 @@ if hasArg cugraph-pyg; then
fi

# Install the cugraph-dgl extensions for DGL
if hasArg cugraph-dgl; then
if hasArg cugraph-dgl || hasArg all; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/cugraph-dgl
else
Expand All @@ -383,7 +385,7 @@ if hasArg cugraph-dgl; then
fi

# Build and install the nx-cugraph Python package
if hasArg nx-cugraph; then
if hasArg nx-cugraph || hasArg all; then
if hasArg --clean; then
cleanPythonDir ${REPODIR}/python/nx-cugraph
else
Expand All @@ -392,7 +394,7 @@ if hasArg nx-cugraph; then
fi

# Build the docs
if hasArg docs; then
if hasArg docs || hasArg all; then
if [ ! -d ${LIBCUGRAPH_BUILD_DIR} ]; then
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
cd ${LIBCUGRAPH_BUILD_DIR}
Expand Down

0 comments on commit 63e282e

Please sign in to comment.