Test conda recipe on Travis and AppVeyor
This commit is contained in:
parent
c45488dfdf
commit
4f38844b6a
5 changed files with 72 additions and 21 deletions
|
@ -1,15 +1,42 @@
|
||||||
version: 1.0.{build}
|
version: '{build}'
|
||||||
image: Visual Studio 2015
|
image: Visual Studio 2015
|
||||||
|
platform:
|
||||||
|
- x86
|
||||||
|
- x64
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- PATH: C:\Python27\;C:\Python27\Scripts\;%PATH%
|
- PYTHON: 27
|
||||||
- PATH: C:\Python27-x64\;C:\Python27-x64\Scripts\;%PATH%
|
- PYTHON: 35
|
||||||
- PATH: C:\Python35\;C:\Python35\Scripts\;%PATH%
|
- CONDA: 27
|
||||||
- PATH: C:\Python35-x64\;C:\Python35-x64\Scripts\;%PATH%
|
- CONDA: 35
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- platform: x86
|
||||||
|
CONDA: 27
|
||||||
install:
|
install:
|
||||||
- cmd: git submodule update -q --init --recursive
|
- ps: |
|
||||||
|
git submodule update -q --init --recursive
|
||||||
|
if ($env:PYTHON) {
|
||||||
|
if ($env:PLATFORM -eq "x64") { $env:PYTHON = "$env:PYTHON-x64" }
|
||||||
|
$env:PATH = "C:\Python$env:PYTHON\;C:\Python$env:PYTHON\Scripts\;$env:PATH"
|
||||||
|
pip install --disable-pip-version-check --user --upgrade pip
|
||||||
|
} elseif ($env:CONDA) {
|
||||||
|
if ($env:CONDA -eq "27") { $env:CONDA = "" }
|
||||||
|
if ($env:PLATFORM -eq "x64") { $env:CONDA = "$env:CONDA-x64" }
|
||||||
|
$env:PATH = "C:\Miniconda$env:CONDA\;C:\Miniconda$env:CONDA\Scripts\;$env:PATH"
|
||||||
|
conda config --set always_yes yes --set changeps1 no
|
||||||
|
conda config --add channels conda-forge
|
||||||
|
conda update -q conda
|
||||||
|
conda install -q conda-build
|
||||||
|
}
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: python setup.py sdist
|
- ps: |
|
||||||
- cmd: pip install --verbose dist\cmake_example-0.0.1.zip
|
if ($env:PYTHON) {
|
||||||
|
python setup.py sdist
|
||||||
|
pip install --verbose dist\cmake_example-0.0.1.zip
|
||||||
|
} elseif ($env:CONDA) {
|
||||||
|
conda build conda.recipe
|
||||||
|
conda install --use-local cmake_example
|
||||||
|
}
|
||||||
test_script:
|
test_script:
|
||||||
- cmd: python tests\test.py
|
- ps: python tests\test.py
|
||||||
|
|
38
.travis.yml
38
.travis.yml
|
@ -5,6 +5,8 @@ os:
|
||||||
env:
|
env:
|
||||||
- PYTHON=2.7
|
- PYTHON=2.7
|
||||||
- PYTHON=3.5
|
- PYTHON=3.5
|
||||||
|
- CONDA=2.7
|
||||||
|
- CONDA=3.5
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -17,13 +19,35 @@ addons:
|
||||||
- python3.5-dev
|
- python3.5-dev
|
||||||
- cmake
|
- cmake
|
||||||
before_install:
|
before_install:
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
|
- |
|
||||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$PYTHON" = "3.5" ]; then brew update; brew install python3; fi
|
if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
|
||||||
- pip install --user virtualenv
|
if [ -n "$PYTHON" ]; then
|
||||||
- virtualenv -p python$PYTHON venv
|
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$PYTHON" = "3.5" ]; then
|
||||||
- source venv/bin/activate
|
brew update; brew install python3;
|
||||||
|
fi
|
||||||
|
pip install --user --upgrade pip virtualenv
|
||||||
|
virtualenv -p python$PYTHON venv
|
||||||
|
source venv/bin/activate
|
||||||
|
elif [ -n "$CONDA" ]; then
|
||||||
|
if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=Linux-x86_64; else OS=MacOSX-x86_64; fi
|
||||||
|
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda${CONDA:0:1}-latest-$OS.sh
|
||||||
|
bash miniconda.sh -b -p $HOME/miniconda
|
||||||
|
export PATH="$HOME/miniconda/bin:$PATH"
|
||||||
|
conda config --set always_yes yes --set changeps1 no
|
||||||
|
conda config --add channels conda-forge
|
||||||
|
conda update -q conda
|
||||||
|
conda install -q conda-build
|
||||||
|
conda create -q -n test-environment python=$CONDA
|
||||||
|
source activate test-environment
|
||||||
|
fi
|
||||||
install:
|
install:
|
||||||
- python setup.py sdist
|
- |
|
||||||
- pip install --verbose dist/*.tar.gz
|
if [ -n "$PYTHON" ]; then
|
||||||
|
python setup.py sdist
|
||||||
|
pip install --verbose dist/*.tar.gz
|
||||||
|
elif [ -n "$CONDA" ]; then
|
||||||
|
conda build conda.recipe
|
||||||
|
conda install --use-local cmake_example
|
||||||
|
fi
|
||||||
script:
|
script:
|
||||||
- python tests/test.py
|
- python tests/test.py
|
||||||
|
|
|
@ -1,5 +1,2 @@
|
||||||
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
|
|
||||||
set DISTUTILS_USE_SDK=1
|
|
||||||
set MSSdk=1
|
|
||||||
"%PYTHON%" setup.py install
|
"%PYTHON%" setup.py install
|
||||||
if errorlevel 1 exit 1
|
if errorlevel 1 exit 1
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
unset MACOSX_DEPLOYMENT_TARGET
|
||||||
${PYTHON} setup.py install;
|
${PYTHON} setup.py install;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
package:
|
package:
|
||||||
name: cmake_example
|
name: cmake_example
|
||||||
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
|
version: {{ environ.get('GIT_DESCRIBE_TAG', 'dev') }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
|
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
|
||||||
{% if environ.get('GIT_DESCRIBE_NUMBER', '0') == '0' %}string: py{{ environ.get('PY_VER').replace('.', '') }}_0
|
{% if environ.get('GIT_DESCRIBE_NUMBER', '0') == '0' %}string: py{{ environ.get('PY_VER').replace('.', '') }}_0
|
||||||
{% else %}string: py{{ environ.get('PY_VER').replace('.', '') }}_{{ environ.get('GIT_BUILD_STR', 'GIT_STUB') }}{% endif %}
|
{% else %}string: py{{ environ.get('PY_VER').replace('.', '') }}_{{ environ.get('GIT_BUILD_STR', 'GIT_STUB') }}{% endif %}
|
||||||
|
script_env:
|
||||||
|
- CC
|
||||||
|
- CXX
|
||||||
|
|
||||||
source:
|
source:
|
||||||
git_url: ../
|
git_url: ../
|
||||||
|
|
Loading…
Add table
Reference in a new issue