Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
78 lines (66 sloc)
3.08 KB
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
# Build only the master branch, tagged commits, and pull requests | |
branches: | |
only: | |
- master | |
- /\d+\.\d+.*/ | |
# Don't run the (redundant) branch build with a pull request | |
skip_branch_with_pr: true | |
matrix: | |
fast_finish: true | |
environment: | |
global: | |
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the | |
# /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 .\\appveyor\\run_with_env.cmd" | |
PYTHONUNBUFFERED: 1 | |
COVERAGE_DIR: "" | |
MINICONDA: C:\\Miniconda3-x64 | |
matrix: | |
- PYTHON_VERSION: 3.8 | |
- PYTHON_VERSION: 3.7 | |
- PYTHON_VERSION: 3.6 | |
init: | |
# If there is a newer build queued for the same PR, cancel this one. | |
# The AppVeyor 'rollout builds' option is supposed to serve the same | |
# purpose but it is problematic because it tends to cancel builds pushed | |
# directly to master instead of just PR builds (or the converse). | |
# credits: JuliaLang developers. | |
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` | |
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` | |
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` | |
throw "There are newer queued builds for this pull request, failing early." } | |
- ps: | | |
If (($env:SKIP_NOTAG -eq "true") -and ($env:APPVEYOR_REPO_TAG -ne "true")) { | |
throw "Skipping Python version, not a tag." | |
} | |
install: | |
# conda 4.5.11 seems to expect that this directory exists already | |
- mkdir C:\Users\appveyor\.conda | |
- call %MINICONDA%\Scripts\activate.bat | |
# The safety checks are simply intended to ensure that there is enough disk space | |
# and the user has the necessary permissions to make environment changes. In a CI | |
# environment these are not necessary and slow things down noticeably on Windows. | |
- conda config --set always_yes yes --set changeps1 no --set auto_update_conda no --set safety_checks disabled | |
- conda install -q conda pip | |
- conda info -a | |
# Upgrade to the latest version of pip to avoid it displaying warnings | |
# about it being out of date. | |
- pip install --upgrade pip | |
# Create a conda environment using the required packages. | |
- conda create -q --yes -n test python=%PYTHON_VERSION% pytorch scipy cpuonly -c pytorch | |
- activate test | |
- conda install pytest pytest-cov codecov | |
- conda install obspy -c conda-forge | |
# Use conda instead of pip and keep it consistent with travis-ci | |
# - pip install pytest pytest-cov codecov obspy | |
# Using pip instead of setup.py ensures we install a non-compressed version of the package | |
# (as opposed to an egg), which is necessary to collect coverage. | |
# We still get the benefit of testing an installed version over the | |
# test version to iron out installation file-inclusion bugs but can | |
# also collect coverage. | |
- pip install . | |
# Not a .NET project, build in the install setup | |
build: false | |
test_script: | |
- pytest -m "not password" -m "not large_download" tests |