-
Notifications
You must be signed in to change notification settings - Fork 704
/
.appveyor.yml
76 lines (66 loc) · 2.9 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
os: Visual Studio 2015
platform: x64
environment:
global:
MSVC_DEFAULT_OPTIONS: ON
BOOST_ROOT: C:\Libraries\boost_1_67_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_67_0\lib64-msvc-14.0
MSVC: 1
MINICONDA: "C:\\Miniconda36-x64"
TWINE_USERNAME: danielh
TWINE_PASSWORD:
secure: cpMn69tLzuhwO7EPhhiVwA==
matrix:
- PYTHON_VERSION: 3.6
- PYTHON_VERSION: 3.7
- PYTHON_VERSION: 3.8
- PYTHON_VERSION: 3.9
- PYTHON_VERSION: 3.10
configuration: Release
init:
- cmd: cmake --version
- cmd: msbuild /version
- "ECHO %PYTHON_VERSION% %MINICONDA%"
install:
- cmd: git submodule update --init --recursive
- ps: wget https://github.com/clab/dynet/releases/download/2.1/eigen-b2e267dc99d4.zip -OutFile eigen.zip
- cmd: mkdir C:\projects\eigen
- cmd: 7z x eigen.zip -o"C:\projects\eigen" -y > nul
- set PATH=%MINICONDA%;%MINICONDA%\Scripts;%PATH%
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-env python=%PYTHON_VERSION% cython numpy
- activate test-env
- ps: if ($env:APPVEYOR_REPO_TAG -eq $True) { (gc setup.py) -replace '. (version=.)0.0.0', "`${1}$env:APPVEYOR_REPO_TAG_NAME" | Out-File -encoding 'UTF8' setup.py }
before_build:
- cmd: md build
- cmd: cd build
- cmd: cmake -DEIGEN3_INCLUDE_DIR=C:/projects/eigen -G "Visual Studio 14 2015 Win64" -DCMAKE_BUILD_TYPE=%configuration% -DENABLE_BOOST=ON -DENABLE_CPP_EXAMPLES=ON -DBOOST_ROOT:PATHNAME="%BOOST_ROOT%" -DBoost_LIBRARY_DIRS:FILEPATH="%BOOST_LIBRARYDIR%" -DBoost_NO_BOOST_CMAKE=TRUE -DBoost_NO_SYSTEM_PATHS=TRUE -DPYTHON=python.exe ..
- cmd: set VS90COMNTOOLS=%VS140COMNTOOLS%
- cmd: cd ..
build:
project: build\dynet.sln
verbosity: normal
after_build:
- cmd: cd %APPVEYOR_BUILD_FOLDER%\build\python
- python ../../setup.py EIGEN3_INCLUDE_DIR=C:/projects/eigen build --build-dir=.. --skip-build bdist_wheel install
test_script:
# Cmake (C++) unit tests
- cmd: set PATH=%BOOST_LIBRARYDIR%;%PATH%
- cmd: cd %APPVEYOR_BUILD_FOLDER%\build
- cmd: ctest -C %configuration% --output-on-failure --timeout 300
# Python unit tests
- cmd: cd %APPVEYOR_BUILD_FOLDER%\build\python
- python -m unittest discover %APPVEYOR_BUILD_FOLDER%\tests\python -v
deploy_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%
- python setup.py sdist
- echo [distutils] > %USERPROFILE%\\.pypirc
- echo index-servers = >> %USERPROFILE%\\.pypirc
- echo pypi >> %USERPROFILE%\\.pypirc
- echo [pypi] >> %USERPROFILE%\\.pypirc
- echo username=%PYPI_USERNAME% >> %USERPROFILE%\\.pypirc
- echo password=%PYPI_PASSWORD% >> %USERPROFILE%\\.pypirc
- python -m pip install twine
- if "%APPVEYOR_REPO_TAG%"=="true" ( python -m twine upload --skip-existing dist/* build/python/dist/* )