FIX: problem regarding travis build and anaconda upload
This commit is contained in:
parent
6f08be0fca
commit
9b1fd2030b
21
.travis.yml
21
.travis.yml
|
@ -1,11 +1,11 @@
|
|||
language: python
|
||||
|
||||
python:
|
||||
- "3.7" # we built a noarch (so in principle any recent version of python work)
|
||||
- "3.7"
|
||||
|
||||
# limit git clone depth to 10 commits
|
||||
# limit git clone depth to 50 commits
|
||||
git:
|
||||
depth: 10
|
||||
depth: 50
|
||||
|
||||
install:
|
||||
- sudo apt-get update
|
||||
|
@ -20,20 +20,13 @@ install:
|
|||
- conda config --set channel_priority strict
|
||||
|
||||
script:
|
||||
- conda create -n py38 python=3.8 pytest numpy scipy
|
||||
- conda activate py38
|
||||
- pip install .
|
||||
- pytest
|
||||
- conda create -n py36 python=3.6 pytest numpy scipy
|
||||
- conda activate py36
|
||||
- pip install .
|
||||
- pytest
|
||||
- conda create -n py37 python=3.7 pytest numpy scipy
|
||||
- conda activate py37
|
||||
- conda create -n py$TRAVIS_PYTHON_VERSION python=$TRAVIS_PYTHON_VERSION pytest numpy scipy
|
||||
- conda activate py$TRAVIS_PYTHON_VERSION
|
||||
- conda update pytest
|
||||
- pip install .
|
||||
- pytest
|
||||
|
||||
after_success:
|
||||
- conda activate py37
|
||||
- conda activate py$TRAVIS_PYTHON_VERSION
|
||||
- conda install conda-build anaconda-client
|
||||
- bash recipe/conda_upload.sh
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
## adapted on https://gist.github.com/zshaheen/fe76d1507839ed6fbfbccef6b9c13ed9
|
||||
|
||||
PKG_NAME=brukeropusreader
|
||||
ANACONDA_USER=spectrocat
|
||||
OS=noarch ## OS=$TRAVIS_OS_NAME-64
|
||||
OS=noarch
|
||||
conda config --set anaconda_upload no
|
||||
|
||||
## TAG
|
||||
|
@ -34,7 +33,7 @@ echo "user: $USER current branch: $TRAVIS_BRANCH last_tag: $LAST_TAG next_tag:
|
|||
|
||||
if [[ $TRAVIS_BRANCH == "master" ]]; then
|
||||
## we build the current master repository (i.e.the last development version)
|
||||
export DEVSTRING="dev"
|
||||
export DEVSTRING="latest"
|
||||
export VERSION="$NEXT_TAG"
|
||||
echo "***************************************************************************************************************"
|
||||
echo "--> BUILDING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||
|
@ -44,6 +43,7 @@ if [[ $TRAVIS_BRANCH == "master" ]]; then
|
|||
echo "--> UPLOADING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2 to <dev> anaconda repository"
|
||||
echo "***************************************************************************************************************"
|
||||
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER -l dev "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then
|
||||
|
@ -58,6 +58,34 @@ if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then
|
|||
echo "--> UPLOADING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2 to <main> anaconda repository"
|
||||
echo "***************************************************************************************************************"
|
||||
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ ! $NUMBER ]
|
||||
then
|
||||
NUMBER="0"
|
||||
fi
|
||||
|
||||
if [[ $TRAVIS_BRANCH == "develop" ]]; then
|
||||
## we build the current develop repository (for testing purpose)
|
||||
export DEVSTRING="test$NUMBER"
|
||||
export VERSION="$NEXT_TAG"
|
||||
echo "***************************************************************************************************************"
|
||||
echo "--> BUILDING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||
echo "***************************************************************************************************************"
|
||||
conda build .
|
||||
echo "***************************************************************************************************************"
|
||||
echo "--> UPLOADING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2 to <test> anaconda repository"
|
||||
echo "***************************************************************************************************************"
|
||||
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER -l test "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
## this is a local "dev" release not yet merged with develop (will not be uploaded)
|
||||
export DEVSTRING="test$NUMBER"
|
||||
export VERSION="$NEXT_TAG"
|
||||
echo "***************************************************************************************************************"
|
||||
echo "--> BUILDING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||
echo "***************************************************************************************************************"
|
||||
conda build .
|
||||
exit $?
|
|
@ -18,7 +18,6 @@ build:
|
|||
|
||||
requirements:
|
||||
build:
|
||||
- {{ compiler('cxx') }}
|
||||
- python
|
||||
host:
|
||||
- python
|
||||
|
@ -31,6 +30,7 @@ requirements:
|
|||
- scipy
|
||||
test:
|
||||
- python {{ python }}
|
||||
- pytest
|
||||
|
||||
test:
|
||||
script_env:
|
||||
|
@ -40,10 +40,12 @@ test:
|
|||
- brukeropusreader
|
||||
|
||||
about:
|
||||
home: "https://github.com/qedsoftware/brukeropusreader"
|
||||
home: "https://github.com/spectrochempy/brukeropusreader"
|
||||
license: GPLv3
|
||||
license_family: GPL3
|
||||
summary: "Bruker OPUS File Reader"
|
||||
doc_url: "https://github.com/spectrochempy/brukeropusreader"
|
||||
dev_url: "https://github.com/spectrochempy/brukeropusreader"
|
||||
|
||||
extra:
|
||||
recipe-maintainers:
|
||||
|
|
Loading…
Reference in New Issue