Skip to content

Commit

Permalink
updated travis and conda
Browse files Browse the repository at this point in the history
  • Loading branch information
zshaheen committed Jun 13, 2017
1 parent dc90d47 commit 744623f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
os:
- linux
- osx
# - osx
language: python
- "2.7"

Expand All @@ -27,4 +27,5 @@ script:
- python run_tests.py -v2

after_success:
- if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then conda install conda-build && conda install anaconda-client && cd conda-recipes/pcmdi_metrics && bash conda_upload.sh; fi
# - if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then conda install conda-build && conda install anaconda-client && cd conda-recipes/pcmdi_metrics && bash conda_upload.sh; fi
- conda install conda-build && conda install anaconda-client && cd conda-recipes/pcmdi_metrics && bash conda_upload.sh
37 changes: 21 additions & 16 deletions conda-recipes/pcmdi_metrics/conda_upload.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
#!/usr/bin/env bash
PKG_NAME=pcmdi_metrics
USER=PCMDI
OS=linux-64
echo "Trying to upload conda"
if [ `uname` == "Linux" ]; then
OS=linux-64
echo "Linux OS"
export PATH="$HOME/miniconda2/bin:$PATH"
conda update -y -q conda
else
echo "Mac OS"
OS=osx-64
fi

mkdir ~/conda-bld
conda config --set anaconda_upload no
export CONDA_BLD_PATH=~/conda-bld
export CONDA_BLD_PATH=${HOME}/conda-bld
export VERSION=`date +%Y.%m.%d`
echo "Cloning recipes"
git clone git:https://github.com/UV-CDAT/conda-recipes
cd conda-recipes
# uvcdat creates issues for build -c uvcdat confises package and channel
rm -rf uvcdat
ln -s ../../conda-recipes/pcmdi_metrics pcmdi_metrics
python ./prep_for_build.py
conda build pcmdi_metrics -c conda-forge -c pcmdi
anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-`date +%Y*`-py27_0.tar.bz2 --force


mkdir ~/conda-bld
conda config --set anaconda_upload no
export CONDA_BLD_PATH=~/conda-bld
export VERSION=`date +%Y.%m.%d`
conda build .
anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-0.tar.bz2 --force

mv meta.yaml meta-no-nox.yaml
mv meta-nox.yaml meta.yaml
conda build .
mv meta.yaml meta-nox.yaml
mv meta-no-nox.yaml meta.yaml
anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l nightly $CONDA_BLD_PATH/$OS/$PKG_NAME-nox-$VERSION-0.tar.bz2 --force

16 changes: 6 additions & 10 deletions conda-recipes/pcmdi_metrics/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
package:
name: pcmdi_metrics
version: {{ environ['VERSION'] }}
version: 1.1.2

source:
git_url: git:https://github.com/PCMDI/pcmdi_metrics

build:
script: python setup.py install
script_env:
- VERSION
- CONDA_BLD_PATH

requirements:
build:
- python
- setuptools
- numpy
run:
- vcs >=2.6
- vcsaddons
- cdms2 >2.6
- genutil
- cdutil
- unidata
- vcs 2.10
- vcsaddons 2.10
- cdms2 2.10
- genutil 2.10
- cdutil 2.10
- cdp
- matplotlib
- numpy
Expand Down

0 comments on commit 744623f

Please sign in to comment.