-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into test-coverage
- Loading branch information
Showing
16 changed files
with
396 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
language: shell | ||
|
||
env: | ||
global: | ||
- CIBW_SKIP="cp27*" | ||
- CIBW_BEFORE_BUILD="pip install cython numpy" | ||
- TWINE_USERNAME=__token__ | ||
# TWINE_PASSWORD should be set to an API token in the Travis settings | ||
jobs: | ||
- CONDA_PYTHON=3.5 | ||
- CONDA_PYTHON=3.6 | ||
- CONDA_PYTHON=3.7 | ||
- CONDA_PYTHON=3.8 | ||
|
||
os: | ||
- linux | ||
- windows | ||
- osx | ||
|
||
stages: | ||
- test | ||
- name: deploy | ||
if: tag IS PRESENT AND repo = sintefmath/Splipy | ||
|
||
before_install: | ||
- source ./ci/before_install.sh | ||
|
||
install: | ||
- source ./ci/install.sh | ||
- conda install -y python=${CONDA_PYTHON} | ||
- pip install -r requirements.txt | ||
- pip install twine cibuildwheel==1.1.0 | ||
- |- | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
pip install opencv-python | ||
fi | ||
- conda list | ||
|
||
script: | ||
- python setup.py install | ||
- pytest test --benchmark-skip | ||
|
||
jobs: | ||
include: | ||
- stage: deploy | ||
name: Deploy source distribution | ||
script: python setup.py sdist --formats=gztar | ||
after_success: python -m twine upload --skip-existing dist/*.tar.gz | ||
- stage: deploy | ||
name: Build and deploy Linux wheels | ||
services: docker | ||
script: python -m cibuildwheel --output-dir wheelhouse | ||
after_success: python -m twine upload --skip-existing wheelhouse/*.whl | ||
- stage: deploy | ||
name: Build and deploy OSX wheels | ||
os: osx | ||
script: python -m cibuildwheel --output-dir wheelhouse | ||
after_success: python -m twine upload --skip-existing wheelhouse/*.whl | ||
- stage: deploy | ||
name: Build and deploy Windows wheels | ||
os: windows | ||
script: python -m cibuildwheel --output-dir wheelhouse | ||
after_success: python -m twine upload --skip-existing wheelhouse/*.whl | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
global-include *.pyx | ||
global-include *.pxd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Set conda path info | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
export MINICONDA_PATH=$HOME/miniconda; | ||
export MINICONDA_SUB_PATH=$MINICONDA_PATH/bin; | ||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | ||
export MINICONDA_PATH=$HOME/miniconda; | ||
export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH`; | ||
export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts; | ||
fi; | ||
export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin; | ||
|
||
# Obtain miniconda installer | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
mkdir -p $HOME/download; | ||
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | ||
echo "downloading miniconda.sh for linux"; | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/download/miniconda.sh; | ||
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then | ||
echo "downloading miniconda.sh for osx"; | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O $HOME/download/miniconda.sh; | ||
fi; | ||
fi; | ||
|
||
# Install openssl for Windows | ||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | ||
choco install openssl.light; | ||
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Installing miniconda | ||
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then | ||
echo "installing miniconda for posix"; | ||
bash $HOME/download/miniconda.sh -b -u -p $MINICONDA_PATH; | ||
elif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | ||
echo "folder $MINICONDA_SUB_PATH does not exist" | ||
echo "installing miniconda for windows"; | ||
choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'"; | ||
fi; | ||
|
||
export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH"; | ||
|
||
# Checking miniconda existance | ||
echo "checking if folder $MINICONDA_SUB_PATH exists" | ||
if [[ -d $MINICONDA_SUB_PATH ]]; then | ||
echo "folder $MINICONDA_SUB_PATH exists" | ||
else | ||
echo "folder $MINICONDA_SUB_PATH does not exist" | ||
fi; | ||
|
||
source $MINICONDA_PATH/etc/profile.d/conda.sh; | ||
hash -r; | ||
echo $TRAVIS_OS_NAME | ||
echo $CONDA_PYTHON | ||
python --version | ||
conda config --set always_yes yes --set changeps1 no; | ||
conda update -q conda; | ||
|
||
# Free channel has Python < 3.7 | ||
conda config --set restore_free_channel true; | ||
|
||
# Useful for debugging any issues with conda | ||
conda info -a | ||
|
||
# See if test-environment already available | ||
echo "create test-environment"; | ||
conda create -n test-environment; | ||
|
||
conda activate test-environment | ||
conda list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Cython==0.29.15 | ||
numpy==1.18.1 | ||
pytest==5.3.5 | ||
scipy==1.4.1 | ||
pytest-benchmark==3.2.3 | ||
h5py==2.10.0 | ||
tqdm==4.41.1 | ||
nutils==4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.