forked from PyThaiNLP/pythainlp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
148 lines (124 loc) · 5.44 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
147
148
#---------------------------------#
# general configuration #
#---------------------------------#
#skip_commits:
# message: /[skip ci]/ # skip if the commit message contains "(skip ci)"
#---------------------------------#
# environment configuration #
#---------------------------------#
image: Visual Studio 2019
skip_branch_with_pr: true
# scripts that are called at very beginning, before repo cloning
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, skipping build." }
- ps: |
If (($env:SKIP_NOTAG -eq "true") -and ($env:APPVEYOR_REPO_TAG -ne "true")) {
Write-Host "Skipping build, not at a tag."
Exit-AppveyorBuild
}
- ECHO %APPVEYOR_BUILD_WORKER_IMAGE%
- "ECHO Python %PYTHON_VERSION% (%PYTHON_ARCH%bit) from %PYTHON%"
- ECHO %PYTHONIOENCODING%
- ECHO %ICU_VERSION%
- ECHO "Installed SDKs:"
- ps: "ls C:/Python*"
- ps: "ls \"C:/Program Files (x86)/Microsoft SDKs/Windows\""
# fetch repository as zip archive
# https://www.appveyor.com/docs/how-to/repository-shallow-clone/
shallow_clone: true
# set clone depth
clone_depth: 5 # clone entire repository history if not defined
environment:
global:
APPVEYOR_SAVE_CACHE_ON_ERROR: false
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
PYTHONIOENCODING: "utf-8"
ICU_VERSION: "64.2"
DISTUTILS_USE_SDK: "1"
PYTHAINLP_DATA_DIR: "%LOCALAPPDATA%/pythainlp-data"
matrix:
# - PYTHON: "C:/Python36"
# PYTHON_VERSION: "3.6"
# PYTHON_ARCH: "32"
# PYICU_PKG: "https://www.dropbox.com/s/pahorbq29y9cura/PyICU-2.3.1-cp36-cp36m-win32.whl?dl=1"
- PYTHON: "C:\\Miniconda36-x64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
PYICU_PKG: "https://www.dropbox.com/s/7t0rrxwckqbgivi/PyICU-2.3.1-cp36-cp36m-win_amd64.whl?dl=1"
# - PYTHON: "C:/Python37"
# PYTHON_VERSION: "3.7"
# PYTHON_ARCH: "32"
# PYICU_PKG: "https://www.dropbox.com/s/3xwdnwhdcu619x4/PyICU-2.3.1-cp37-cp37m-win32.whl?dl=1"
# - PYTHON: "C:/Python37-x64"
# PYTHON_VERSION: "3.7"
# PYTHON_ARCH: "64"
# PYICU_PKG: "https://www.dropbox.com/s/le5dckc3231opqt/PyICU-2.3.1-cp37-cp37m-win_amd64.whl?dl=1"
# - PYTHON: "C:\\Miniconda38-x64"
# PYTHON_VERSION: "3.8"
# PYTHON_ARCH: "64"
# PYICU_PKG: "https://www.dropbox.com/s/o6p2sj5z50iim1e/PyICU-2.3.1-cp38-cp38-win_amd64.whl?dl=1"
matrix:
fast_finish: true
#cache:
# - "%LOCALAPPDATA%/pip/Cache"
# - "%APPDATA%/nltk_data"
# - "%LOCALAPPDATA%/pythainlp-data"
install:
- chcp 65001
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# - '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%'
# - '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%'
- '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %PLATFORM%'
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
- ECHO %PATH%
- python --version
- python -m pip install --disable-pip-version-check --user --upgrade pip setuptools
- python -m pip --version
- python -m pip install pyyaml
- python -m pip install -U "h5py>=2.10.0,<3" "tensorflow>=2.3.1,<3" deepcut
- python -m pip install %PYICU_PKG%
- conda install -y -c conda-forge fairseq
- conda remove --force -y pytorch
- python -m pip install torch==1.7.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
- python -m pip install -e .[full]
#---------------------------------#
# build configuration #
#---------------------------------#
platform:
- x64
# Skip .NET project specific build phase.
build: off
#---------------------------------#
# tests configuration #
#---------------------------------#
test_script:
- python -m unittest discover
#---------------------------------#
# global handlers #
#---------------------------------#
#on_success:
# # Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
# #
# # If the cache limit is reached, the cache will not be updated (of not even
# # created in the first run). So this is a trade of between keeping the cache
# # current and having a cache at all.
# # NB: This is done only `on_success` since the cache in uploaded only on
# # success anyway.
# # Note: Cygwin is not available on Visual Studio 2019, can try Msys2.
# - "ECHO Remove old or huge cache"
# - C:\cygwin\bin\find "%LOCALAPPDATA%/pip" -type f -mtime +360 -delete
# - C:\cygwin\bin\find "%LOCALAPPDATA%/pip" -type f -size +50M -delete
# - C:\cygwin\bin\find "%LOCALAPPDATA%/pip" -empty -delete
# # Show size of cache
# - C:\cygwin\bin\du -hs "%LOCALAPPDATA%/pip/Cache"
# - C:\cygwin\bin\du -hs "%APPDATA%/nltk_data"
# - C:\cygwin\bin\du -hs "%LOCALAPPDATA%/pythainlp-data"