-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathupload.sh
executable file
·44 lines (34 loc) · 1.42 KB
/
upload.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh
set -e
# Setup 'gpuci_retry' for upload retries (results in 4 total attempts)
export GPUCI_RETRY_MAX=3
export GPUCI_RETRY_SLEEP=30
# Set default label options if they are not defined elsewhere
export LABEL_OPTION=${LABEL_OPTION:-"--label main"}
# Skip uploads unless BUILD_MODE == "branch"
if [ ${BUILD_MODE} != "branch" ]; then
echo "Skipping upload"
return 0
fi
# Skip uploads if there is no upload key
if [ -z "$MY_UPLOAD_KEY" ]; then
echo "No upload key"
return 0
fi
################################################################################
# SETUP - Get conda file output locations
################################################################################
gpuci_logger "Get conda file output locations"
export DASKCUDA_FILE=`conda build conda/recipes/dask-cuda --python=$PYTHON --output`
################################################################################
# UPLOAD - Conda packages
################################################################################
gpuci_logger "Starting conda uploads"
if [ "$UPLOAD_DASKCUDA" == "1" ]; then
test -e ${DASKCUDA_FILE}
echo "Upload Dask-cuda"
echo ${DASKCUDA_FILE}
gpuci_retry anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --skip-existing ${DASKCUDA_FILE}
fi