|
1 | 1 | sudo: false |
2 | 2 |
|
3 | | -language: python |
| 3 | +language: cpp |
4 | 4 |
|
5 | | -python: |
6 | | - - 2.7 |
7 | | - - 3.5 |
| 5 | +matrix: |
| 6 | + include: |
| 7 | + - env: PYTHON="2.7" CONDA_PY=27 |
| 8 | + os: linux |
| 9 | + dist: trusty |
| 10 | + - env: PYTHON="2.7" CONDA_PY=27 |
| 11 | + os: osx |
| 12 | + osx_image: xcode8.3 |
| 13 | + - env: PYTHON="3.5" CONDA_PY=35 |
| 14 | + os: linux |
| 15 | + dist: trusty |
| 16 | + - env: PYTHON="3.5" CONDA_PY=35 |
| 17 | + os: osx |
| 18 | + osx_image: xcode8.3 |
| 19 | + - env: PYTHON="3.6" CONDA_PY=36 |
| 20 | + os: linux |
| 21 | + dist: trusty |
| 22 | + - env: PYTHON="3.6" CONDA_PY=36 |
| 23 | + os: osx |
| 24 | + osx_image: xcode8.3 |
8 | 25 |
|
9 | 26 | install: |
10 | | - # We do this conditionally because it saves us some downloading if the |
11 | | - # version is the same. |
12 | | - - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then |
| 27 | + - if [ ${PYTHON:0:1} == "2" ]; then |
| 28 | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
13 | 29 | wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; |
14 | | - else |
| 30 | + else |
| 31 | + wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; |
| 32 | + fi; |
| 33 | + else |
| 34 | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then |
15 | 35 | wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; |
16 | | - fi |
17 | | - - bash miniconda.sh -b -p $HOME/miniconda |
| 36 | + else |
| 37 | + wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; |
| 38 | + fi; |
| 39 | + fi; |
| 40 | + - chmod +x miniconda.sh |
| 41 | + # When we are installing the 32 Bit conda on a 64 Bit system, the miniconda |
| 42 | + # installer will ask for a "yes" despite the -b flag, so we pipe in a yes |
| 43 | + - yes | ./miniconda.sh -b -p $HOME/miniconda |
| 44 | + #- bash miniconda.sh -b -p -f $HOME/miniconda |
18 | 45 | - export PATH="$HOME/miniconda/bin:$HOME/miniconda/lib:$PATH" |
19 | 46 | - hash -r |
20 | 47 | - conda config --set always_yes yes --set changeps1 no |
21 | | - - conda update -q conda |
22 | 48 | # Useful for debugging any issues with conda |
23 | 49 | - conda info -a |
24 | | - # download/install pythonocc from DLR-SC channel |
25 | | - - conda config --add channels https://conda.anaconda.org/dlr-sc |
26 | | - # install everything required to build the receipe |
27 | | - - conda install pythonocc-core |
28 | | - |
| 50 | + # osx needs a dedicate environment |
| 51 | + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then |
| 52 | + conda create -n pythonocc-utils-test; |
| 53 | + source activate pythonocc-utils-test; |
| 54 | + fi; |
| 55 | + - conda install -c dlr-sc -c conda-forge -c oce -c pythonocc pythonocc-core=0.18.1 |
29 | 56 |
|
30 | 57 | script: |
| 58 | + # osx needs a dedicate environment |
| 59 | + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then |
| 60 | + source activate pythonocc-utils-test; |
| 61 | + fi; |
31 | 62 | - python setup.py build install |
32 | 63 | - cd test |
33 | 64 | - python occutils_test.py |
|
0 commit comments