Skip to content
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

Only install conda package and test #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 49 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,39 @@ language: c

env:
global:
- OBSPY_VERSION=1.0.3
- PYTHON_VERSION=3.6
- OBSPY_VERSION=1.1.0

sudo: false

matrix:
include:
- os: linux
env: CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py27
env: PYTHON_VERSION=2.7 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py27
- os: linux
env: CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py27 ARCHITECTURE_32BIT="True"
addons:
apt:
packages:
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- libstdc++6:i386
- gcc-multilib
env: PYTHON_VERSION=2.7 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py27 ARCHITECTURE_32BIT="True"
- os: osx
env: CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py27
env: PYTHON_VERSION=2.7 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py27

- os: linux
env: CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py35
env: PYTHON_VERSION=3.6 CONDA_PLATFORM=linux-64 CONDA_PYSUFFIX=py36
- os: linux
env: CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py35 ARCHITECTURE_32BIT="True"
addons:
apt:
packages:
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- libstdc++6:i386
- gcc-multilib
env: PYTHON_VERSION=3.5 CONDA_PLATFORM=linux-32 CONDA_PYSUFFIX=py35 ARCHITECTURE_32BIT="True"
- os: osx
env: CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py35
env: PYTHON_VERSION=3.6 CONDA_PLATFORM=osx-64 CONDA_PYSUFFIX=py36

# it seems Travis is now ignoring addons/apt/packages when nested into
# matrix/includes, so manually install those packages:
# $ travis lint .travis.yml
# Warnings for .travis.yml:
# [x] in matrix.include section: unexpected key addons, dropping
# See also
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
before_install:
- |
if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then
sudo apt-get -qq update;
sudo apt-get install -y libstdc++6:i386 gcc-multilib;
fi

install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
Expand All @@ -47,49 +48,48 @@ install:
else
export ARCH="_64"
fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-${OS}-x86${ARCH}.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- if [[ "$PYTHON_VERSION" == "2.7" ]]; then
export MINICONDA="Miniconda2-latest";
else
export MINICONDA="Miniconda3-3.5.5";
fi
- wget https://repo.continuum.io/miniconda/${MINICONDA}-${OS}-x86${ARCH}.sh -O miniconda.sh;
- yes yes | 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 --add channels conda-forge
- conda config --add channels conda-forge
- |
if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then
conda config --add channels obspy
fi
- conda create -q -n test python=$PYTHON_VERSION
- source activate test
# Useful for debugging any issues with conda
- conda info -a
# Install constructor
- conda install -q --yes constructor
- if [[ "$PYTHON_VERSION" == "2.7" ]]; then
conda install mock;
fi
- |
if [[ "$ARCHITECTURE_32BIT" == "True" ]]; then
# linux32 doesnt have basemap-data-hires and also no geographiclib
conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy pyshp cryptography
else
conda install obspy==${OBSPY_VERSION} ipython jupyter basemap nomkl sqlalchemy pyshp cryptography basemap-data-hires geographiclib
fi
# list package versions
- conda list
# try to fix build problems on osx by adding conda-forge channel with top priority
- conda config --add channels conda-forge
- conda config --add channels conda-forge
# build installer
- constructor --verbose --platform=${CONDA_PLATFORM} ${OBSPY_VERSION}_${CONDA_PYSUFFIX}
- conda env export
- conda list --explicit

script:
# We change directories to make sure that python won't find the copy
# of obspy in the source directory, see
# https://github.com/numpy/numpy/blob/master/.travis.yml#L44
- ls -la ObsPy*.sh
- mkdir empty
- cd empty
- bash ../ObsPy*.sh -b -p $HOME/obspy-anaconda
- $HOME/obspy-anaconda/bin/python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r
- cd ..
- python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r

notifications:
email: false

deploy:
provider: releases
api_key:
secure: r3IIcaiBrVGGGzmn8WpZ5MYehLIKNzwpq8jVwlVrmjVxqbDLbeM2sC1zyGGzmrzcYf7BLQpb1hDZ/E8cod9tDmmuqqjwn5dx9/FtCFF/02aMacD7UmND8J3xEJPChu9gHkmgwSQlih/WELH/qDvKvg8mgWThHtX3Klpre42EJGv2btGFkxTr1zELwBZM9Omn0QNs6eHdnncW12iRYGwpw8jSIZtqZ3X/Mp2EcfspJKqqV0TL322480yU6EGAZq7ZvtZTjj+tor0zx3S2HVLcZlzYmUS9EjJLOMWsGrXYOXxyZxSqYiXye00nNgHeSGxXpejjc3Ipf8rZzw4q5zEooURiIAZ8DPjKLdvnTdRnGi5FVFVUnjYDiO6j6WQliUlGna/9N9C2+UfflAhoOSl96vZDKfcNThJkaa/4gdDB9Z5OGkoGlksaY7tYuyBOs9sZP9B55vgJULEsJRFaa+FtkUfwywtvDWAUzzzJTkh0/uKATXiCJXk6t4GKGuhj5WoV/Vp8bxVQBPofHEEepd4lK3V49XJGInYtJ+2YG5oUvQDGIMxqJQNWcxJaPjWdxCPi9iawOIf7fL6OOgB4uLtSIqPgevXKf5VPDSTMM+DssJa5M0iRlgPUNCBKEJB/+w5eBNCE4x/RZhxBMQb5FznJ3vQfaq3v10qen2jeSY0IUJk=
file_glob: true
file: "ObsPy*.sh"
skip_cleanup: true
on:
tags: true
repo: obspy/anaconda-installers
# try to upload all binaries to one spot..
name: "${OBSPY_VERSION}"
draft: false
prerelease: false
68 changes: 24 additions & 44 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,36 @@ environment:
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\misc\\appveyor\\run_with_env.cmd"
OBSPY_VERSION: "1.0.3"
PYTHON_VERSION: "3.6"
OBSPY_VERSION: "1.1.0"

matrix:
# Pre-installed Python versions, which Appveyor may upgrade to
# a later point release.
# See: http://www.appveyor.com/docs/installed-software#python

- PYTHON: "C:\\Miniconda36-x64"
- PYTHON: "C:\\Miniconda-x64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
CONDA_PLATFORM: "win-64"
CONDA_PYSUFFIX: "py27"

- PYTHON: "C:\\Miniconda36"
- PYTHON: "C:\\Miniconda"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
CONDA_PLATFORM: "win-32"
CONDA_PYSUFFIX: "py27"

- PYTHON: "C:\\Miniconda36-x64"
- PYTHON: "C:\\Miniconda35-x64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
CONDA_PLATFORM: "win-64"
CONDA_PYSUFFIX: "py35"
CONDA_PYSUFFIX: "py36"

- PYTHON: "C:\\Miniconda36"
- PYTHON: "C:\\Miniconda35"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "32"
CONDA_PLATFORM: "win-32"
CONDA_PYSUFFIX: "py35"
CONDA_PYSUFFIX: "py36"

platform:
- x64
Expand All @@ -59,47 +62,24 @@ install:
- "python -c \"import sys; print(sys.version)\""
# Install the build and runtime dependencies of the project.
- "conda update -q --yes conda"
# Install constructor
- "conda install -q --yes constructor"
- "conda config --add channels conda-forge"
- "conda config --add channels conda-forge"
- "conda info -a"
- "conda create -q --yes -n test python=%PYTHON_VERSION%"
- "activate test"
- ps: |
If ($env:PYTHON_VERSION -eq "2.7") {
conda install --yes mock
}
- "conda install --yes obspy==%OBSPY_VERSION% ipython jupyter basemap basemap-data-hires sqlalchemy pyshp mkl geographiclib cryptography"
# list package versions
- "conda list"
# patch constructor's makensis call to maximum verbosity, see conda/constructor#94
- "python patch_makensis_verbosity.py"
# build installer
- "constructor --verbose --platform=%CONDA_PLATFORM% %OBSPY_VERSION%_%CONDA_PYSUFFIX%"
- "conda env export"
- "conda list --explicit"

# Not a .NET project, we build ObsPy in the install step instead
build: false

test_script:
- ps: "ls ObsPy*.exe"
- "for %%# in (ObsPy*.exe) do set \"file_name=%%~nx#\""
- "echo %file_name%"
# instructions for silent installation of Anaconda installer: https://conda.io/docs/help/silent.html
- "start /wait \"\" %file_name% /InstallationType=JustMe /RegisterPython=0 /AddToPath=1 /S /D=C:\\ObsPy-Anaconda"
# XXX - "C:\\ObsPy-Anaconda\\python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r"
# XXX for now only test core, to get passing tests, should be reverted!
- "C:\\ObsPy-Anaconda\\python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r core"

on_success:
- ps: "ls ObsPy*.exe"

artifacts:
- path: 'ObsPy*.exe'

# Deploying binary installer as a release attachment seems to not work across
# repositories, i.e. we can't automatically deploy to obspy/obspy from
# obspy/anconda-installers, so rely on manually attaching installers to github
# releases..
deploy:
release: $(OBSPY_VERSION)
description: 'Anaconda ObsPy installers'
provider: GitHub
auth_token:
secure: PAE+Y4BDSdConf033yv0vKhmeIevni93HJAX1qg/FpV+IU9eeUTDCTdbHjP0lblY
artifact: /ObsPy*.exe/
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true # deploy on tag push only
- "python -m obspy.scripts.runtests --no-flake8 -n anaconda-installers -r core"