|
1 | 1 | language: c
|
2 | 2 |
|
3 |
| -env: |
4 |
| - - TRAVIS_PYTHON_VERSION="2.7" |
5 |
| - - TRAVIS_PYTHON_VERSION="3.5" |
6 |
| - - TRAVIS_PYTHON_VERSION="3.6" |
7 |
| - |
8 |
| -os: |
9 |
| - - linux |
10 |
| - - osx |
| 3 | +matrix: |
| 4 | + include: |
| 5 | + - os: osx |
| 6 | + env: |
| 7 | + - TRAVIS_PYTHON_VERSION="2.7" |
| 8 | + - DEPLOYABLE="true" |
| 9 | + - os: osx |
| 10 | + env: |
| 11 | + - TRAVIS_PYTHON_VERSION="3.5" |
| 12 | + - DEPLOYABLE="true" |
| 13 | + - os: osx |
| 14 | + env: |
| 15 | + - TRAVIS_PYTHON_VERSION="3.6" |
| 16 | + - DEPLOYABLE="true" |
| 17 | + - os: linux |
| 18 | + env: |
| 19 | + - TRAVIS_PYTHON_VERSION="2.7" |
| 20 | + - os: linux |
| 21 | + env: |
| 22 | + - TRAVIS_PYTHON_VERSION="3.5" |
| 23 | + - os: linux |
| 24 | + env: |
| 25 | + - TRAVIS_PYTHON_VERSION="3.6" |
| 26 | + - services: docker |
| 27 | + sudo: required |
| 28 | + env: |
| 29 | + - DEPLOY_TARGET="manylinux1" |
| 30 | + - DEPLOYABLE="true" |
11 | 31 |
|
12 | 32 | dist: trusty
|
13 | 33 |
|
14 | 34 | before_install:
|
15 |
| - # fastFM-core depends on cblas |
16 |
| - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y libopenblas-dev; fi |
17 |
| - - if [[ "$TRAVIS_PYTHON_VERSION" =~ "^2" ]]; then |
18 |
| - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then |
19 |
| - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; |
20 |
| - else |
21 |
| - wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh; |
22 |
| - fi |
| 35 | + - | |
| 36 | + # Skip if manylinux1 |
| 37 | + if [ "$DEPLOY_TARGET" = "manylinux1" ]; then |
| 38 | + echo "Skip before_install step..." |
23 | 39 | else
|
24 |
| - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then |
25 |
| - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; |
| 40 | + # fastFM-core depends on cblas |
| 41 | + if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y libopenblas-dev; fi |
| 42 | + if [[ "$TRAVIS_PYTHON_VERSION" =~ "^2" ]]; then |
| 43 | + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then |
| 44 | + wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; |
| 45 | + else |
| 46 | + wget https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh -O miniconda.sh; |
| 47 | + fi |
26 | 48 | else
|
27 |
| - wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; |
| 49 | + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then |
| 50 | + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; |
| 51 | + else |
| 52 | + wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; |
| 53 | + fi |
28 | 54 | fi
|
| 55 | + bash miniconda.sh -b -p $HOME/miniconda |
| 56 | + export PATH="$HOME/miniconda/bin:$PATH" |
| 57 | + hash -r |
| 58 | + conda config --set always_yes yes --set changeps1 no |
| 59 | + conda update -q conda |
| 60 | + # Useful for debugging any issues with conda |
| 61 | + conda info -a |
| 62 | + conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION cython numpy pandas scipy scikit-learn nose |
| 63 | + source activate test-environment |
29 | 64 | fi
|
30 |
| - - bash miniconda.sh -b -p $HOME/miniconda |
31 |
| - - export PATH="$HOME/miniconda/bin:$PATH" |
32 |
| - - hash -r |
33 |
| - - conda config --set always_yes yes --set changeps1 no |
34 |
| - - conda update -q conda |
35 |
| - # Useful for debugging any issues with conda |
36 |
| - - conda info -a |
37 |
| - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION cython numpy pandas scipy scikit-learn nose |
38 |
| - - source activate test-environment |
39 | 65 |
|
40 | 66 | install:
|
41 |
| - - git submodule update --init --recursive |
42 |
| - - make |
43 |
| - - python setup.py bdist_wheel |
44 |
| - - pip install dist/*.whl |
| 67 | + - | |
| 68 | + git submodule update --init --recursive |
| 69 | + if [ "$DEPLOY_TARGET" = "manylinux1" ]; then |
| 70 | + : |
| 71 | + else |
| 72 | + make |
| 73 | + python setup.py bdist_wheel |
| 74 | + pip install dist/*.whl |
| 75 | + fi |
45 | 76 |
|
46 | 77 | script:
|
47 |
| - - nosetests |
48 |
| - |
49 |
| -before_deploy: |
50 |
| - - export RELEASE_PKG_FILE=$(ls dist/*.whl) |
51 |
| - - echo "deploying $RELEASE_PKG_FILE to GitHub releases" |
| 78 | + - | |
| 79 | + if [ "$DEPLOY_TARGET" = "manylinux1" ]; then |
| 80 | + #build for 64-bit |
| 81 | + docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/.travis/build-wheels.sh |
| 82 | + else |
| 83 | + nosetests |
| 84 | + fi |
52 | 85 |
|
53 | 86 | deploy:
|
54 | 87 | provider: releases
|
55 | 88 | api_key:
|
56 | 89 | secure: AJcZoe2+OiMJ4VlSkASAeMc/ii0ZRnj2PFaaL7zlSbx1THMpY/49U5BSyqX1PQioPSlTV3ZsIXI3u7KyqoXIQSXWzAuaBzpLTLS85fGSuTvUuexmaJtKU92OC143tuVVLCPnjC992+1uyctjrxMSqgoaUolfYkEftt5RGrMIKl2duGfDXrPXIueHSl8FQGXkmlY6NqkRx2v5kxsAjFcurvwTNU8ptJ84jVKjrE6t1IB61vp2eUcqVR/z6Lwau6mdvIybglnbH4lCMXP98zEIibLA8vbn3XxrC+0uU7Kjz37K6/CsJEPNL5tujJDMRKAupnrkgPsAGTpsAn6O6uLUz0ISgcen8R6KJ7cBli+cq08OZ3JLLoJpqkni62YVSQV+uYkQk9b5Pu09vUTOozJMnOqLSj9hVIswyxGiFPcTFskMgqMdx15M59gd0YpXH633YqwBgRmWNsctp4BKnTaE3iGW6aZc8lrXxpL7qcVAosjmpjLp3jiPXVSRdYf0yHl6pDUj5ZVyu27kAn1/I9JL0nH19zjXF2tUlEjuT9ydHwnhmsgBN/V+JhZxi7ZeEbOZfY1MfekKM/NwSRehVEp/J0XWqWg+kIXRU/rqY1/w0vLVNFeQirpEjUp39eCBydXeS3Bik8uANW2UTxojJo3LBfLLoAT8ZWFb3YrIBAYkzjc=
|
57 |
| - file: "${RELEASE_PKG_FILE}" |
| 90 | + file_glob: true |
| 91 | + file: dist/fastFM-*.whl |
58 | 92 | skip_cleanup: true
|
59 | 93 | on:
|
60 | 94 | tags: true
|
| 95 | + condision: $DEPLOYEABLE = "true" |
0 commit comments