-
Notifications
You must be signed in to change notification settings - Fork 13
Enhancement for better deployment #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e680389
416be9f
9e44fd9
4b6901e
604bf03
d121e41
5646259
a2b22b0
9c42de2
800a14d
2a8fe2e
f68a9be
da1cbf8
49c9213
7ceedca
eecb822
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,121 @@ | ||
| language: python | ||
| python: | ||
| - '3.6' | ||
| - '3.7-dev' | ||
|
|
||
| git: | ||
| depth: 200 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't go back to any old version of git so no need for this line |
||
| sudo: required | ||
| dist: trusty | ||
| matrix: | ||
| include: | ||
| - name: "Bionic python 3.7" | ||
| os: linux | ||
| dist: bionic | ||
| python: 3.7 | ||
| env: | ||
| - REPO=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
| - OS=linux-64 | ||
| - name: "trusty python 3.6" | ||
| os: linux | ||
| dist: trusty | ||
| python: 3.6 | ||
| env: | ||
| - REPO=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
| - OS=linux-64 | ||
| - name: "xenial python 3.7" | ||
| os: linux | ||
| dist: xenial | ||
| python: 3.7 | ||
| env: | ||
| - REPO=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
| - OS=linux-64 | ||
| - name: "xenial python 3.6" | ||
| os: linux | ||
| dist: xenial | ||
| python: 3.6 | ||
| env: | ||
| - REPO=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
| - OS=linux-64 | ||
| - name: "osx python 3.7" | ||
| os: osx | ||
| language: generic | ||
| env: | ||
| - REPO=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh | ||
| - TRAVIS_PYTHON_VERSION=3.7 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Variable TRAVIS_PYTHON_VERSION is not defined in all cases, is it normal ?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, it is defined when it's the default platform language. However on Mac it is not possible to define a job with default language "python" (thus the https://docs.travis-ci.com/user/multi-os/#python-example-unsupported-languages |
||
| - OS=osx-64 | ||
| - name: "osx python 3.6" | ||
| os: osx | ||
| language: generic | ||
| env: | ||
| - REPO=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh | ||
| - TRAVIS_PYTHON_VERSION=3.6 | ||
| - OS=osx-64 | ||
|
|
||
| before_install: | ||
| - sudo apt-get update | ||
| - ldd --version | ||
| - gcc --version | ||
| - export START=$(pwd) | ||
|
|
||
| install: | ||
| - if [[ "$TRAVIS_PYTHON_VERSION" == "3.7-dev" ]]; then export VADD="py37"; else export VADD="py36"; fi | ||
| - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | ||
| -O miniconda.sh | ||
| - bash miniconda.sh -b -p $HOME/miniconda | ||
| - export PATH="$HOME/miniconda/bin:$PATH" | ||
| - hash -r | ||
| - conda config --set always_yes yes --set changeps1 no | ||
| - conda install conda-build | ||
| - conda update -q conda | ||
| - conda update -n root conda-build | ||
| - conda config --set anaconda_upload no | ||
| - conda config --append channels conda-forge | ||
| - conda config --append channels tofuproject | ||
| - conda info -a | ||
| - if [[ "$TRAVIS_PYTHON_VERSION" == "3.7-dev" ]]; then export THIS_PY_VERSION="3.7"; | ||
| else THIS_PY_VERSION=$TRAVIS_PYTHON_VERSION; | ||
| fi | ||
| - conda install -q python=$THIS_PY_VERSION conda-build anaconda-client nose | ||
| nose-timer coverage codecov | ||
| - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") | ||
| - export VERSION=$(echo $REV | tr - .) | ||
| - echo $REV | ||
| - conda build conda_recipe | ||
| - export PKG_DIR=$HOME/miniconda/conda-bld/linux-64/ | ||
| - conda install tofu --use-local | ||
| - wget "$REPO" -O miniconda.sh | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change here since we created an environmental variable for the source of the conda repo |
||
| - bash miniconda.sh -b -p $HOME/miniconda | ||
| - export PATH="$HOME/miniconda/bin:$PATH" | ||
| - hash -r | ||
| - conda config --set always_yes yes --set changeps1 no | ||
| - conda update -q conda | ||
| - conda config --append channels conda-forge | ||
| - conda config --append channels tofuproject | ||
| - conda info -a | ||
| - conda install -q python="$TRAVIS_PYTHON_VERSION" conda-verify | ||
| nose nose-timer coverage codecov | ||
| - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") | ||
| - export VERSION=$(echo $REV | tr - .) | ||
| - echo $REV | ||
| - pip install -e ".[dev]" | ||
|
Didou09 marked this conversation as resolved.
|
||
|
|
||
| script: | ||
| - cd $HOME | ||
| - nosetests tofu.tests --nocapture -v --with-id --with-timer --with-coverage | ||
| --cover-package=tofu | ||
| - cd $HOME | ||
| - nosetests tofu.tests --nocapture -v --with-id --with-timer --with-coverage | ||
| --cover-package=tofu | ||
|
|
||
| after_success: | ||
| - codecov | ||
| - chmod +x $START/anaconda_upload.sh | ||
| - echo $TRAVIS_TAG | ||
| - codecov | ||
| - chmod +x $START/anaconda_upload.sh | ||
| - echo $TRAVIS_TAG | ||
|
|
||
| before_deploy: | ||
| - ls $START | ||
| - cd $START | ||
| - ls $START | ||
| - cd $START | ||
|
|
||
| deploy: | ||
| - provider: script | ||
| user: "ToFuProject" | ||
| script: $START/anaconda_upload.sh | ||
| on: | ||
| tags: true | ||
| all_branches: true | ||
| branch: master | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to deploy for all branches only master |
||
| skip_cleanup: true | ||
| - provider: pypi | ||
| user: "Didou09" | ||
| distributions: "sdist" | ||
| skip_existing: true | ||
| skip_cleanup: true | ||
| on: | ||
| tags: true | ||
| branch: master | ||
| password: | ||
| secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= | ||
| - provider: pypi | ||
| user: "Didou09" | ||
| distributions: "bdist_wheel" | ||
| skip_existing: true | ||
| skip_cleanup: true | ||
| on: | ||
| tags: true | ||
| all_branches: true | ||
| condition: $OS = osx-64 | ||
| branch: master | ||
| password: | ||
| secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= | ||
| - provider: pypi | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I have created an account on test.pipy.org |
||
| user: "Didou09" | ||
| distributions: "sdist" | ||
| skip_existing: true | ||
| skip_cleanup: true | ||
| on: | ||
| branch: deploy-test | ||
| server: https://test.pypi.org/legacy/ | ||
| password: | ||
| secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,11 @@ | ||
| # Only need to change these two variables | ||
| PKG_NAME=tofu | ||
| USER=ToFuProject | ||
| OS=linux-64 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now this is was created in .travis.yml |
||
|
|
||
| #mkdir ~/conda-bld | ||
| #conda config --set anaconda_upload no | ||
| #conda update -n root conda-build | ||
| #conda config --append channels conda-forge | ||
| #conda config --append channels tofuproject | ||
| #export CONDA_BLD_PATH=~/conda-bld | ||
| #export VERSION=`date +%Y.%m.%d` | ||
| #export VERSION=$(head -n 1 version.txt) | ||
|
|
||
| #conda build conda_recipe | ||
| conda config --set anaconda_upload no | ||
| conda install anaconda-client conda-build | ||
| conda build conda_recipe | ||
| export PKG_REAL=$(conda build . --output | tail -1) | ||
| echo "Available conda packages:" | ||
| echo $(find $CONDA_BLD_PATH/$OS/ -type f -name $PKG_NAME*.tar.bz2) | ||
| PKG_REAL=$(find $CONDA_BLD_PATH/$OS/ -type f -name $PKG_NAME-$VERSION-$VADD*.tar.bz2) | ||
| echo $PKG_REAL | ||
| anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l main $PKG_REAL --force | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,24 +4,19 @@ package: | |
|
|
||
| source: | ||
| git_url: https://github.com/ToFuProject/tofu.git | ||
| #git_branch: {{ environ['TRAVIS_BRANCH'] }} | ||
| git_rev: {{ environ['REV'] }} | ||
| # "patches:" might be the answer for clang compilers ? | ||
|
|
||
| build: | ||
| script_env: | ||
| # - REV | ||
|
Didou09 marked this conversation as resolved.
|
||
| - VERSION | ||
| - TRAVIS_BRANCH | ||
| - CONDA_BLD_PATH | ||
|
|
||
| requirements: | ||
|
|
||
| # build: necessary for build.sh | ||
| # here same as run, as we are using cython | ||
| build: | ||
| - python | ||
| - setuptools | ||
| - setuptools >=40.8.0 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated dependency |
||
| - setuptools_scm | ||
| - numpy | ||
| - scipy | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.7 version now is available