-
Notifications
You must be signed in to change notification settings - Fork 64
/
appveyor.yml
146 lines (126 loc) · 6 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: '{build}'
image: "Visual Studio 2019"
environment:
global:
PLATFORMTOOLSET: "v140"
matrix:
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "Win32"
PYTHON_VERSION: 39
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
WITH_MPFR: yes
WITH_MPC: yes
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 310-x64
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
WITH_MPFR: yes
WITH_MPC: yes
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 38-x64
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 39-x64
WITH_SYMPY: no
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 311-x64
WITH_NUMPY: no
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
#- BUILD_TYPE: "Debug"
# COMPILER: MinGW-w64
# PYTHON_VERSION: 39-x64
# WITH_NUMPY: no
#- BUILD_TYPE: "Release"
# COMPILER: MinGW-w64
# PYTHON_VERSION: 39-x64
#- BUILD_TYPE: "Debug"
# COMPILER: MinGW-w64
# PYTHON_VERSION: 39-x64
# WITH_SYMPY: no
- BUILD_TYPE: "Release"
COMPILER: MSVC15
PLATFORM: "x64"
PYTHON_VERSION: 310-x64
CONDA_INSTALL_LOCN: C:\\Miniconda38-x64
WITH_MPFR: yes
WITH_MPC: yes
WITH_LLVM: yes
install:
- set PYTHON_SOURCE_DIR=%CD%
- git clone https://github.com/sympy/symengine symengine-cpp
- if [%PLATFORM%]==[Win32] set "CONDA_SUBDIR=win-32"
- if [%COMPILER%]==[MSVC15] call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- if [%COMPILER%]==[MSVC15] set "CONDA_DEPS=mpir=3.0.0 vc=14"
- if [%COMPILER%]==[MSVC15] if [%WITH_MPFR%]==[yes] set "CONDA_DEPS=%CONDA_DEPS% mpfr=3.1.5"
- if [%COMPILER%]==[MSVC15] if [%WITH_MPC%]==[yes] set "CONDA_DEPS=%CONDA_DEPS% mpc=1.0.3"
- if [%COMPILER%]==[MSVC15] if [%WITH_LLVM%]==[yes] set "CONDA_DEPS=%CONDA_DEPS% llvmdev=4.0"
- if [%COMPILER%]==[MSVC15] set "CONDA_DEPS=%CONDA_DEPS% -c conda-forge"
- if [%COMPILER%]==[MSVC15] if [%BUILD_TYPE%]==[Debug] set "CONDA_DEPS=%CONDA_DEPS% -c symengine/label/debug"
- if [%COMPILER%]==[MSVC15] conda create -n deps --yes %CONDA_DEPS%
- if [%COMPILER%]==[MSVC15] call conda activate deps
- if [%COMPILER%]==[MSVC15] echo %CONDA_PREFIX%
- if [%COMPILER%]==[MSVC15] echo %PATH%
- if [%COMPILER%]==[MSVC15] set "PATH=%PATH%;%CONDA_PREFIX%\\Library\\bin;%CONDA_PREFIX%"
- if [%COMPILER%]==[MSVC15] echo %PATH%
- 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%"
- echo %PATH%
- pip install nose pytest 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] set "CMAKE_GENERATOR=Visual Studio 14 2015"
- if [%COMPILER%]==[MSVC15] if [%PLATFORM%]==[x64] set "CMAKE_GENERATOR=Visual Studio 14 2015 Win64"
- if [%COMPILER%]==[MinGW] set "CMAKE_GENERATOR=MinGW Makefiles"
- if [%COMPILER%]==[MinGW-w64] set "CMAKE_GENERATOR=MinGW Makefiles"
- if [%COMPILER%]==[MSVC15] set "CMAKE_ARGS=-DCMAKE_PREFIX_PATH=%CONDA_PREFIX%\\Library"
- if [%COMPILER%]==[MinGW] set "CMAKE_ARGS=-DCMAKE_PREFIX_PATH=C:\MinGW -DCMAKE_BUILD_TYPE=%BUILD_TYPE%"
- if [%COMPILER%]==[MinGW-w64] set "CMAKE_ARGS=-DCMAKE_PREFIX_PATH=C:\mingw64 -DCMAKE_BUILD_TYPE=%BUILD_TYPE%"
- if [%WITH_MPFR%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_MPFR=yes"
- if [%WITH_MPC%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_MPC=yes"
- if [%WITH_LLVM%]==[yes] set "CMAKE_ARGS=%CMAKE_ARGS% -DWITH_LLVM=yes -DMSVC_USE_MT=no"
- echo "CMAKE_ARGS=%CMAKE_ARGS%"
- cmake %CMAKE_ARGS% -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%"
- set "SYMENGINE_PY_ADD_PATH_TO_SEARCH_DIRS=1"
- echo %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'))