forked from symengine/symengine.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
124 lines (105 loc) · 5.28 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: '{build}'
# Uncomment this to enable the fast build environment if your account does not
# support it automatically:
#os: Visual Studio 2015 RC
environment:
global:
PLATFORMTOOLSET: "v140"
matrix:
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "Win32"
PYTHON_VERSION: 27
CONDA_INSTALL_LOCN: C:\\Miniconda35
WITH_MPFR: yes
WITH_MPC: yes
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 35-x64
CONDA_INSTALL_LOCN: C:\\Miniconda35-x64
WITH_MPFR: yes
WITH_MPC: yes
WITH_LLVM: yes
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 36-x64
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
# - BUILD_TYPE: "Debug"
# COMPILER: MinGW
# PYTHON_VERSION: 27
# - BUILD_TYPE: "Release"
# COMPILER: MinGW
# PYTHON_VERSION: 35
- BUILD_TYPE: "Release"
COMPILER: MinGW-w64
PYTHON_VERSION: 27-x64
- BUILD_TYPE: "Debug"
COMPILER: MinGW-w64
PYTHON_VERSION: 35-x64
WITH_NUMPY: no
- BUILD_TYPE: "Debug"
COMPILER: MinGW-w64
PYTHON_VERSION: 36-x64
WITH_SYMPY: no
install:
- set PYTHON_SOURCE_DIR=%CD%
- git clone https://github.com/sympy/symengine symengine-cpp
- if [%COMPILER%]==[MSVC15] call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- if [%COMPILER%]==[MSVC15] conda update --yes --quiet conda
- if [%COMPILER%]==[MSVC15] conda config --add channels conda-forge
- if [%COMPILER%]==[MSVC15] if [%BUILD_TYPE%]==[Debug] conda config --add channels symengine/label/debug
- if [%COMPILER%]==[MSVC15] conda create -n test --yes mpir=3.0.0 vc=14
- if [%COMPILER%]==[MSVC15] call activate test
- if [%COMPILER%]==[MSVC15] if [%WITH_MPFR%]==[yes] conda install --yes mpfr=3.1.5
- if [%COMPILER%]==[MSVC15] if [%WITH_MPC%]==[yes] conda install --yes mpc=1.0.3
- if [%COMPILER%]==[MSVC15] if [%WITH_LLVM%]==[yes] conda install --yes llvmdev=3.9
- if [%COMPILER%]==[MinGW] set PATH=C:\MinGW\bin;%PATH%
- if [%COMPILER%]==[MinGW] mingw-get update
# workaround for https://github.com/appveyor/ci/issues/996
- if [%COMPILER%]==[MinGW] mingw-get upgrade mingw32-libstdc++
- if [%COMPILER%]==[MinGW] mingw-get install mingw32-gmp
- if [%COMPILER%]==[MinGW-w64] set PATH=C:\mingw64\bin;%PATH%
- rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe"
- if [%COMPILER%]==[MinGW-w64] call symengine-cpp\bin\appveyor-download.cmd "https://raw.githubusercontent.com/symengine/dependencies/5cff7d1736877336cf9fb58267111beea4fa152f/x86_64-4.9.1-release-posix-seh-rt_v3-rev1.7z" -FileName mw64.7z
- if [%COMPILER%]==[MinGW-w64] 7z x -oC:\ mw64.7z > NUL
- if [%COMPILER%]==[MinGW-w64] call symengine-cpp\bin\appveyor-download.cmd "https://raw.githubusercontent.com/symengine/dependencies/5cff7d1736877336cf9fb58267111beea4fa152f/gmp-6.0.0-x86_64-w64-mingw32.7z" -FileName gmp.7z
- if [%COMPILER%]==[MinGW-w64] 7z x -oC:\mingw64 gmp.7z > NUL
- if NOT [%COMPILER%]==[MSVC15] call symengine-cpp\bin\appveyor-download.cmd "https://raw.githubusercontent.com/symengine/dependencies/dcc10cce2133e2b57e61c5ced6120139bbcdfa20/python-libs-mingw32.7z" -FileName pylibs.7z
- if NOT [%COMPILER%]==[MSVC15] 7z x -aoa -oC:\ pylibs.7z > NUL
- set PATH=C:\Python%PYTHON_VERSION%;C:\Python%PYTHON_VERSION%\Scripts;%PATH%
- pip install nose pytest
- if [%COMPILER%]==[MinGW-w64] pip install --install-option="--no-cython-compile" cython==0.26
- if NOT [%COMPILER%]==[MinGW-w64] pip install --install-option="--no-cython-compile" cython
- if NOT [%WITH_NUMPY%]==[no] pip install numpy
- if NOT [%WITH_SYMPY%]==[no] pip install sympy
- set /p commit=<symengine_version.txt
- cd symengine-cpp
- git checkout %commit%
- mkdir build
- cd build
- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[Win32] cmake -G "Visual Studio 14 2015" -DCMAKE_PREFIX_PATH=%CONDA_PREFIX%\Library ..
- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[x64] cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_PREFIX_PATH=%CONDA_PREFIX%\Library ..
- if [%COMPILER%]==[MinGW] cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=C:\MinGW -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
- if [%COMPILER%]==[MinGW-w64] cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=C:\mingw64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
- if [%WITH_MPFR%]==[yes] cmake -DWITH_MPFR=yes ..
- if [%WITH_MPC%]==[yes] cmake -DWITH_MPC=yes ..
- if [%WITH_LLVM%]==[yes] cmake -DWITH_LLVM=yes -DMSVC_USE_MT=no ..
- cmake -DBUILD_SHARED_LIBS=yes -DBUILD_TESTS=no -DBUILD_BENCHMARKS=no -DCMAKE_INSTALL_PREFIX=C:\symengine ..
- cmake --build . --config %BUILD_TYPE% --target install
- cd ../../
build_script:
- set PATH=C:\symengine\bin\;%PATH%
- if [%COMPILER%]==[MSVC15] python setup.py install build_ext --compiler=msvc --build-type=%BUILD_TYPE%
- if [%COMPILER%]==[MinGW] python setup.py install build_ext --compiler=mingw --inplace
- if [%COMPILER%]==[MinGW-w64] python setup.py install build_ext --compiler=mingw --inplace
test_script:
- if not [%COMPILER%]==[MSVC15] nosetests
- mkdir empty && cd empty
- python %PYTHON_SOURCE_DIR%\bin\test_python.py
# Enable this to be able to login to the build worker. You can use the
# `remmina` program in Ubuntu, use the login information that the line below
# prints into the log.
#on_finish:
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))