-
Notifications
You must be signed in to change notification settings - Fork 94
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 #13 from raydouglass/bld-gpuci-scripts
[REVIEW] Add ci scripts & conda recipe
- Loading branch information
Showing
9 changed files
with
263 additions
and
2 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,27 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2019, NVIDIA CORPORATION. | ||
################################################################################ | ||
# dask-cuda Style Tester | ||
################################################################################ | ||
|
||
# Ignore errors and set path | ||
set +e | ||
PATH=/conda/bin:$PATH | ||
|
||
# Activate common conda env | ||
source activate gdf | ||
|
||
# Run flake8 and get results/return code | ||
FLAKE=`flake8 python` | ||
RETVAL=$? | ||
|
||
# Output results if failure otherwise show pass | ||
if [ "$FLAKE" != "" ]; then | ||
echo -e "\n\n>>>> FAILED: flake8 style check; begin output\n\n" | ||
echo -e "$FLAKE" | ||
echo -e "\n\n>>>> FAILED: flake8 style check; end output\n\n" | ||
else | ||
echo -e "\n\n>>>> PASSED: flake8 style check\n\n" | ||
fi | ||
|
||
exit $RETVAL |
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 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2019, NVIDIA CORPORATION. | ||
################################################################################ | ||
# dask-cuda cpu build | ||
################################################################################ | ||
set -e | ||
|
||
# Logger function for build status output | ||
function logger() { | ||
echo -e "\n>>>> $@\n" | ||
} | ||
|
||
# Set path and build parallel level | ||
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH | ||
|
||
# Set home to the job's workspace | ||
export HOME=$WORKSPACE | ||
|
||
# Switch to project root; also root of repo checkout | ||
cd $WORKSPACE | ||
|
||
# Get latest tag and number of commits since tag | ||
export GIT_DESCRIBE_TAG=`git describe --abbrev=0 --tags` | ||
export GIT_DESCRIBE_NUMBER=`git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count` | ||
|
||
################################################################################ | ||
# SETUP - Check environment | ||
################################################################################ | ||
|
||
logger "Get env..." | ||
env | ||
|
||
logger "Activate conda env..." | ||
source activate gdf | ||
|
||
logger "Check versions..." | ||
python --version | ||
gcc --version | ||
g++ --version | ||
conda list | ||
|
||
# FIX Added to deal with Anancoda SSL verification issues during conda builds | ||
conda config --set ssl_verify False | ||
|
||
################################################################################ | ||
# BUILD - Conda package build | ||
################################################################################ | ||
|
||
conda build conda/recipes/dask-cuda --python=${PYTHON} | ||
|
||
################################################################################ | ||
# UPLOAD - Conda package | ||
################################################################################ | ||
|
||
logger "Upload conda pkg..." | ||
source ci/cpu/upload-anaconda.sh |
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,36 @@ | ||
#!/bin/bash | ||
# | ||
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh | ||
|
||
set -e | ||
|
||
export UPLOADFILE=`conda build conda/recipes/dask-cuda --python=$PYTHON --output` | ||
CUDA_REL=${CUDA:0:3} | ||
if [ "${CUDA:0:2}" == '10' ]; then | ||
# CUDA 10 release | ||
CUDA_REL=${CUDA:0:4} | ||
fi | ||
|
||
SOURCE_BRANCH=master | ||
|
||
if [ "$LABEL_MAIN" == "1" ]; then | ||
LABEL_OPTION="--label main --label cuda${CUDA_REL}" | ||
else | ||
LABEL_OPTION="--label dev --label cuda${CUDA_REL}" | ||
fi | ||
echo "LABEL_OPTION=${LABEL_OPTION}" | ||
|
||
# Restrict uploads to master branch | ||
if [ ${GIT_BRANCH} != ${SOURCE_BRANCH} ]; then | ||
echo "Skipping upload" | ||
return 0 | ||
fi | ||
|
||
if [ -z "$MY_UPLOAD_KEY" ]; then | ||
echo "No upload key" | ||
return 0 | ||
fi | ||
|
||
echo "Upload" | ||
echo ${UPLOADFILE} | ||
anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --force ${UPLOADFILE} |
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,47 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# Logger function for build status output | ||
function logger() { | ||
echo -e "\n>>>> $@\n" | ||
} | ||
|
||
# Set path and build parallel level | ||
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH | ||
|
||
# Set home to the job's workspace | ||
export HOME=$WORKSPACE | ||
|
||
# Switch to project root; also root of repo checkout | ||
cd $WORKSPACE | ||
|
||
# Get latest tag and number of commits since tag | ||
export GIT_DESCRIBE_TAG=`git describe --abbrev=0 --tags` | ||
export GIT_DESCRIBE_NUMBER=`git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count` | ||
|
||
################################################################################ | ||
# SETUP - Check environment | ||
################################################################################ | ||
|
||
logger "Get env..." | ||
env | ||
|
||
logger "Activate conda env..." | ||
source activate gdf | ||
|
||
logger "Check versions..." | ||
python --version | ||
gcc --version | ||
g++ --version | ||
conda list | ||
|
||
# FIX Added to deal with Anancoda SSL verification issues during conda builds | ||
conda config --set ssl_verify False | ||
|
||
################################################################################ | ||
# TEST - Run tests | ||
################################################################################ | ||
|
||
pip install -e . | ||
pip install pytest | ||
pytest --cache-clear --junitxml=${WORKSPACE}/junit-libgdf.xml -v |
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,52 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2019, NVIDIA CORPORATION. | ||
################################################################################ | ||
# dask-cuda version updater | ||
################################################################################ | ||
|
||
## Usage | ||
# bash update-version.sh <type> | ||
# where <type> is either `major`, `minor`, `patch` | ||
|
||
set -e | ||
|
||
# Grab argument for release type | ||
RELEASE_TYPE=$1 | ||
|
||
# Get current version and calculate next versions | ||
CURRENT_TAG=`git describe --abbrev=0 --tags | tr -d 'v'` | ||
CURRENT_MAJOR=`echo $CURRENT_TAG | awk '{split($0, a, "."); print a[1]}'` | ||
CURRENT_MINOR=`echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}'` | ||
CURRENT_PATCH=`echo $CURRENT_TAG | awk '{split($0, a, "."); print a[3]}'` | ||
NEXT_MAJOR=$((CURRENT_MAJOR + 1)) | ||
NEXT_MINOR=$((CURRENT_MINOR + 1)) | ||
NEXT_PATCH=$((CURRENT_PATCH + 1)) | ||
NEXT_FULL_TAG="" | ||
NEXT_SHORT_TAG="" | ||
|
||
# Determine release type | ||
if [ "$RELEASE_TYPE" == "major" ]; then | ||
NEXT_FULL_TAG="${NEXT_MAJOR}.0.0" | ||
NEXT_SHORT_TAG="${NEXT_MAJOR}.0" | ||
elif [ "$RELEASE_TYPE" == "minor" ]; then | ||
NEXT_FULL_TAG="${CURRENT_MAJOR}.${NEXT_MINOR}.0" | ||
NEXT_SHORT_TAG="${CURRENT_MAJOR}.${NEXT_MINOR}" | ||
elif [ "$RELEASE_TYPE" == "patch" ]; then | ||
NEXT_FULL_TAG="${CURRENT_MAJOR}.${CURRENT_MINOR}.${NEXT_PATCH}" | ||
NEXT_SHORT_TAG="${CURRENT_MAJOR}.${CURRENT_MINOR}" | ||
else | ||
echo "Incorrect release type; use 'major', 'minor', or 'patch' as an argument" | ||
exit 1 | ||
fi | ||
|
||
# Move to root of repo | ||
cd ../.. | ||
echo "Preparing '$RELEASE_TYPE' release [$CURRENT_TAG -> $NEXT_FULL_TAG]" | ||
|
||
# Inplace sed replace; workaround for Linux and Mac | ||
function sed_runner() { | ||
sed -i.bak ''"$1"'' $2 && rm -f ${2}.bak | ||
} | ||
|
||
|
||
# No-op |
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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
python setup.py install |
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,37 @@ | ||
# Copyright (c) 2019, NVIDIA CORPORATION. | ||
|
||
# Usage: | ||
# conda build -c conda-forge -c defaults . | ||
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} | ||
{% set git_revision_count=environ.get('GIT_DESCRIBE_NUMBER', 0) %} | ||
package: | ||
name: dask-cuda | ||
version: {{ version }} | ||
|
||
source: | ||
path: ../../.. | ||
|
||
build: | ||
number: {{ git_revision_count }} | ||
string: {{ git_revision_count }} | ||
|
||
requirements: | ||
build: | ||
- python x.x | ||
- dask-core>=1.1.4 | ||
- distributed>=1.25.2 | ||
run: | ||
- python x.x | ||
- dask-core>=1.1.4 | ||
- distributed>=1.25.2 | ||
|
||
test: | ||
imports: | ||
- dask_cuda | ||
|
||
|
||
about: | ||
home: http://rapids.ai/ | ||
license: Apache-2.0 | ||
license_file: ../../../LICENSE | ||
summary: dask-cuda library |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
dask | ||
dask-core>=1.1.4 | ||
distributed>=1.25.2 |
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 |
---|---|---|
|
@@ -7,10 +7,13 @@ | |
with open(os.path.join(os.path.dirname(__file__), "README.md")) as f: | ||
long_description = f.read() | ||
|
||
version = os.environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev0').lstrip('v') | ||
setup( | ||
name="dask-cuda", | ||
version=version, | ||
description="Utilities for Dask and CUDA interactions", | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url="https://github.com/rapidsai/dask-cuda", | ||
author="RAPIDS development team", | ||
author_email="[email protected]", | ||
|
@@ -20,8 +23,8 @@ | |
"Topic :: Database", | ||
"Topic :: Scientific/Engineering", | ||
"License :: OSI Approved :: Apache License", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
], | ||
packages=find_packages(exclude=["docs", "tests", "tests.*", "docs.*"]), | ||
install_requires=open('requirements.txt').read().strip().split('\n'), | ||
|