Skip to content

Commit

Permalink
ENH Build with cmake --build & Pass ccache variables to conda recip…
Browse files Browse the repository at this point in the history
…e & use Ninja in CI (#1415)

- Build using `cmake --build`
- Add ccache env variables to conda recipe
- Use Ninja in CI

Authors:
  - Jordan Jacobelli (@Ethyling)

Approvers:
  - Dillon Cullinan (@dillon-cullinan)

URL: #1415
  • Loading branch information
jjacobelli authored Feb 23, 2021
1 parent 369beee commit 89bffa5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CUGRAPH_BUILD_DIR=${REPODIR}/python/build
BUILD_DIRS="${LIBCUGRAPH_BUILD_DIR} ${CUGRAPH_BUILD_DIR}"

# Set defaults for vars modified by flags to this script
VERBOSE=""
VERBOSE_FLAG=""
BUILD_TYPE=Release
INSTALL_TARGET=install
BUILD_DISABLE_DEPRECATION_WARNING=ON
Expand Down Expand Up @@ -86,7 +86,7 @@ fi

# Process flags
if hasArg -v; then
VERBOSE=1
VERBOSE_FLAG="-v"
fi
if hasArg -g; then
BUILD_TYPE=Debug
Expand Down Expand Up @@ -143,7 +143,7 @@ if buildAll || hasArg libcugraph; then
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS} \
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
${REPODIR}/cpp
make -j${PARALLEL_LEVEL} VERBOSE=${VERBOSE} ${INSTALL_TARGET}
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target ${INSTALL_TARGET} ${VERBOSE_FLAG}
fi

# Build and install the cugraph Python package
Expand All @@ -169,7 +169,7 @@ if buildAll || hasArg docs; then
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS}
fi
cd ${LIBCUGRAPH_BUILD_DIR}
make -j${PARALLEL_LEVEL} VERBOSE=${VERBOSE} docs_cugraph
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target docs_cugraph ${VERBOSE_FLAG}
cd ${REPODIR}/docs
make html
fi
5 changes: 4 additions & 1 deletion ci/cpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018-2020, NVIDIA CORPORATION.
# Copyright (c) 2018-2021, NVIDIA CORPORATION.
#########################################
# cuGraph CPU conda build script for CI #
#########################################
Expand All @@ -24,6 +24,9 @@ fi
export GPUCI_CONDA_RETRY_MAX=1
export GPUCI_CONDA_RETRY_SLEEP=30

# Use Ninja to build
export CMAKE_GENERATOR="Ninja"

################################################################################
# SETUP - Check environment
################################################################################
Expand Down
7 changes: 7 additions & 0 deletions conda/recipes/libcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ build:
- CUDAHOSTCXX
- PARALLEL_LEVEL
- VERSION_SUFFIX
- CCACHE_DIR
- CCACHE_NOHASHDIR
- CCACHE_COMPILERCHECK
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER

requirements:
build:
Expand Down

0 comments on commit 89bffa5

Please sign in to comment.