-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from robertmaynard/fea/add_basic_ci
Add initial CI that generates docs and runs rapids-cmake tests
- Loading branch information
Showing
3 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2021, NVIDIA CORPORATION. | ||
############################# | ||
# rapids-cmake Style Tester # | ||
############################# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2021, NVIDIA CORPORATION. | ||
######################################### | ||
# rapids-cmake Docs build script for CI # | ||
######################################### | ||
|
||
if [ -z "$PROJECT_WORKSPACE" ]; then | ||
echo ">>>> ERROR: Could not detect PROJECT_WORKSPACE in environment" | ||
echo ">>>> WARNING: This script contains git commands meant for automated building, do not run locally" | ||
exit 1 | ||
fi | ||
|
||
export DOCS_WORKSPACE=$WORKSPACE/docs | ||
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH | ||
export HOME=$WORKSPACE | ||
export PROJECT_WORKSPACE=/rapids/rapids-cmake | ||
export LIBCUDF_KERNEL_CACHE_PATH="$HOME/.jitify-cache" | ||
export NIGHTLY_VERSION=$(echo $BRANCH_VERSION | awk -F. '{print $2}') | ||
export PROJECTS=(rapids-cmake) | ||
|
||
gpuci_logger "Check environment" | ||
env | ||
|
||
gpuci_logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
gpuci_logger "Activate conda env" | ||
. /opt/conda/etc/profile.d/conda.sh | ||
conda activate rapids | ||
|
||
gpuci_logger "Check versions" | ||
python --version | ||
$CC --version | ||
$CXX --version | ||
|
||
gpuci_logger "Check conda environment" | ||
conda info | ||
conda config --show-sources | ||
conda list --show-channel-urls | ||
|
||
# Build Doxygen docs | ||
gpuci_logger "Build Sphinx docs" | ||
cd $PROJECT_WORKSPACE/docs | ||
make html | ||
|
||
#Commit to Website | ||
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/* | ||
done | ||
|
||
mv $PROJECT_WORKSPACE/docs/_build/html/* $DOCS_WORKSPACE/api/rapids-cmake/$BRANCH_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2021, NVIDIA CORPORATION. | ||
################################################# | ||
# rapids-cmake GPU build and test script for CI # | ||
################################################# | ||
|
||
set -e | ||
NUMARGS=$# | ||
ARGS=$* | ||
|
||
# Arg parsing function | ||
function hasArg { | ||
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ") | ||
} | ||
|
||
# Set path and build parallel level | ||
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH | ||
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4} | ||
export CUDA_REL=${CUDA_VERSION%.*} | ||
|
||
# Set home to the job's workspace | ||
export HOME="$WORKSPACE" | ||
|
||
# Parse git describei | ||
cd "$WORKSPACE" | ||
# export GIT_DESCRIBE_TAG=`git describe --abbrev=0 --tags` | ||
# export GIT_DESCRIBE_NUMBER=`git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count` | ||
# export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` | ||
|
||
export MINOR_VERSION=21.08 # hard-coded as rapids-cmake doesn't have tags yet | ||
|
||
################################################################################ | ||
# SETUP - Check environment | ||
################################################################################ | ||
|
||
gpuci_logger "Check environment" | ||
env | ||
|
||
gpuci_logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
gpuci_logger "Activate conda env" | ||
. /opt/conda/etc/profile.d/conda.sh | ||
conda activate rapids | ||
|
||
gpuci_logger "Installing packages needed for rapids-cmake" | ||
gpuci_conda_retry install -y \ | ||
"cudatoolkit=$CUDA_REL" \ | ||
"rapids-build-env=$MINOR_VERSION.*" | ||
|
||
gpuci_logger "Check compiler versions" | ||
python --version | ||
$CC --version | ||
$CXX --version | ||
|
||
gpuci_logger "Check conda environment" | ||
conda info | ||
conda config --show-sources | ||
conda list --show-channel-urls | ||
|
||
################################################################################ | ||
# BUILD - Build rapids-cmake tests | ||
################################################################################ | ||
|
||
gpuci_logger "Setup rapids-cmake" | ||
cmake -S "$WORKSPACE/testing/" -B "$WORKSPACE/build" | ||
|
||
|
||
################################################################################ | ||
# TEST - Run Tests for rapids-cmake | ||
################################################################################ | ||
|
||
if hasArg --skip-tests; then | ||
gpuci_logger "Skipping Tests" | ||
exit 0 | ||
fi | ||
|
||
gpuci_logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
gpuci_logger "Tests for rapids-cmake" | ||
cd "$WORKSPACE/build" | ||
ctest -j4 -VV |