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
|
language: python
|
||||||
|
|
||||||
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:
|
git:
|
||||||
depth: 10
|
depth: 50
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
|
@ -20,20 +20,13 @@ install:
|
||||||
- conda config --set channel_priority strict
|
- conda config --set channel_priority strict
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- conda create -n py38 python=3.8 pytest numpy scipy
|
- conda create -n py$TRAVIS_PYTHON_VERSION python=$TRAVIS_PYTHON_VERSION pytest numpy scipy
|
||||||
- conda activate py38
|
- conda activate py$TRAVIS_PYTHON_VERSION
|
||||||
- pip install .
|
- conda update pytest
|
||||||
- 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
|
|
||||||
- pip install .
|
- pip install .
|
||||||
- pytest
|
- pytest
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- conda activate py37
|
- conda activate py$TRAVIS_PYTHON_VERSION
|
||||||
- conda install conda-build anaconda-client
|
- conda install conda-build anaconda-client
|
||||||
- bash recipe/conda_upload.sh
|
- bash recipe/conda_upload.sh
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
## adapted on https://gist.github.com/zshaheen/fe76d1507839ed6fbfbccef6b9c13ed9
|
## adapted on https://gist.github.com/zshaheen/fe76d1507839ed6fbfbccef6b9c13ed9
|
||||||
|
|
||||||
PKG_NAME=brukeropusreader
|
PKG_NAME=brukeropusreader
|
||||||
ANACONDA_USER=spectrocat
|
OS=noarch
|
||||||
OS=noarch ## OS=$TRAVIS_OS_NAME-64
|
|
||||||
conda config --set anaconda_upload no
|
conda config --set anaconda_upload no
|
||||||
|
|
||||||
## TAG
|
## TAG
|
||||||
|
@ -34,7 +33,7 @@ echo "user: $USER current branch: $TRAVIS_BRANCH last_tag: $LAST_TAG next_tag:
|
||||||
|
|
||||||
if [[ $TRAVIS_BRANCH == "master" ]]; then
|
if [[ $TRAVIS_BRANCH == "master" ]]; then
|
||||||
## we build the current master repository (i.e.the last development version)
|
## we build the current master repository (i.e.the last development version)
|
||||||
export DEVSTRING="dev"
|
export DEVSTRING="latest"
|
||||||
export VERSION="$NEXT_TAG"
|
export VERSION="$NEXT_TAG"
|
||||||
echo "***************************************************************************************************************"
|
echo "***************************************************************************************************************"
|
||||||
echo "--> BUILDING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
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 "--> UPLOADING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2 to <dev> anaconda repository"
|
||||||
echo "***************************************************************************************************************"
|
echo "***************************************************************************************************************"
|
||||||
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER -l dev "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER -l dev "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TRAVIS_BRANCH == $TRAVIS_TAG ]]; then
|
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 "--> UPLOADING $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2 to <main> anaconda repository"
|
||||||
echo "***************************************************************************************************************"
|
echo "***************************************************************************************************************"
|
||||||
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
anaconda -t "$CONDA_UPLOAD_TOKEN" upload --force -u $ANACONDA_USER "$CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION-$DEVSTRING.tar.bz2"
|
||||||
|
exit $?
|
||||||
fi
|
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 $?
|
exit $?
|
|
@ -18,7 +18,6 @@ build:
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
build:
|
build:
|
||||||
- {{ compiler('cxx') }}
|
|
||||||
- python
|
- python
|
||||||
host:
|
host:
|
||||||
- python
|
- python
|
||||||
|
@ -31,6 +30,7 @@ requirements:
|
||||||
- scipy
|
- scipy
|
||||||
test:
|
test:
|
||||||
- python {{ python }}
|
- python {{ python }}
|
||||||
|
- pytest
|
||||||
|
|
||||||
test:
|
test:
|
||||||
script_env:
|
script_env:
|
||||||
|
@ -40,10 +40,12 @@ test:
|
||||||
- brukeropusreader
|
- brukeropusreader
|
||||||
|
|
||||||
about:
|
about:
|
||||||
home: "https://github.com/qedsoftware/brukeropusreader"
|
home: "https://github.com/spectrochempy/brukeropusreader"
|
||||||
license: GPLv3
|
license: GPLv3
|
||||||
license_family: GPL3
|
license_family: GPL3
|
||||||
summary: "Bruker OPUS File Reader"
|
summary: "Bruker OPUS File Reader"
|
||||||
|
doc_url: "https://github.com/spectrochempy/brukeropusreader"
|
||||||
|
dev_url: "https://github.com/spectrochempy/brukeropusreader"
|
||||||
|
|
||||||
extra:
|
extra:
|
||||||
recipe-maintainers:
|
recipe-maintainers:
|
||||||
|
|
Loading…
Reference in New Issue