forked from gwoptics/learn_laser_interferometry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
81 lines (68 loc) · 3.21 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Configure appveyor for builds.
environment:
# condatoken:
# secure: IgQ0ihtOWOGDj+VRskpoImtpJQaF9LAAwD0rA9/xQXa7fIr3N8+hQM8aAMi/zXC/
# Need this to set up compilation on Windows.
CMD_IN_ENV: cmd /E:ON /V:ON /C Obvious-CI\scripts\obvci_appveyor_python_build_env.cmd
PROJECT_NAME: laser-interferometry
matrix:
# Unfortunately, compiler/SDK configuration for 64 bit builds depends on
# python version. Right now conda build does not configure the SDK, and
# the appveyor setup only sets up the SDK once, so separate by python
# versions.
- TARGET_ARCH: "x64"
PYTHON_BUILD_RESTRICTIONS: "2.7*"
CONDA_PY: "27"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
CONDA_BUILDS: C:\\Miniconda-x64\conda-bld\win-64
- TARGET_ARCH: "x64"
PYTHON_BUILD_RESTRICTIONS: "3.5*"
CONDA_PY: "35"
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
CONDA_BUILDS: C:\\Miniconda35-x64\conda-bld\win-64
- TARGET_ARCH: "x64"
PYTHON_BUILD_RESTRICTIONS: "3.6*"
CONDA_PY: "36"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
CONDA_BUILDS: C:\\Miniconda36-x64\conda-bld\win-64
# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
- x64
install:
# Clone simply to get the script for setting up Windows build environment.
- cmd: git clone https://github.com/pelson/Obvious-CI.git
# No need to install miniconda because appveyor comes with it.
- cmd: SET PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\Scripts;%PATH%
- cmd: conda config --set always_yes true
- cmd: conda update --quiet conda
- cmd: conda install --quiet jinja2 conda-build=3 anaconda-client
# These installs are needed on windows but not other platforms.
- cmd: conda install patch psutil
- cmd: python -m pip install --upgrade pip
- cmd: python -m pip install recipes pytest
- cmd: conda env update -n laser-interferometry -f environment.yml
# - cmd: pip install -r requirements.txt
# Skip .NET project specific build phase.
build: off
test_script:
# - "%CMD_IN_ENV% conda build recipes"
# Install the package
# - conda install --use-local %PROJECT_NAME%
- conda config --add channels gwoptics
- conda install --use-local finesse
# Run the tests outside the source tree.
# - pytest --cov %PROJECT_NAME% tests/
on_success:
# - pytest --cov %PROJECT_NAME% #tests/
- echo %APPVEYOR_REPO_TAG%
- cmd: SET PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\Scripts;%PATH%
# Write the output file location to a file...cannot simply use conda build --output
# because astropy_helpers prints out a message when it is freezing the version number during setup.
# - python -c "from conda_build.api import get_output_file_path; p=get_output_file_path('recipes'); f=open('to_upload.txt', 'w');f.write(p)"
# ...so that we can set a variable to the name of that output file.
# - set /P BUILT_PACKAGE=<to_upload.txt
- echo %BUILT_PACKAGE%
# If this build is because of a tag make the conda package and upload it.
#- cmd: if "%APPVEYOR_REPO_TAG%"=="true" anaconda -t %BINSTAR_TOKEN% upload -u astropy %BUILT_PACKAGE%
# - cmd: anaconda -t %condatoken% upload --force %BUILT_PACKAGE%