forked from pychess/pychess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
116 lines (88 loc) · 4.05 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
# https://www.appveyor.com/docs/appveyor-yml/
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: snapshot-{build}-{branch}
# branches to build
branches:
# whitelist
only:
- master
#---------------------------------#
# environment configuration #
#---------------------------------#
# Build worker image (VM template)
image: Visual Studio 2015
clone_folder: c:\projects\pychess
environment:
global:
STOCKFISH: stockfish-windows-amd64.exe
matrix:
- MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
PKG_PREFIX: mingw-w64-x86_64
# - MSYS2_ARCH: i686
# MSYSTEM: MINGW32
# PKG_PREFIX: mingw-w64-i686
cache:
- "c:\\projects\\pychess\\engines"
#---------------------------------#
# Run Msys2-build commands #
#---------------------------------#
init:
# temporary fix for https://github.com/appveyor/ci/issues/2571
- del C:\Windows\System32\libssl-*.dll C:\Windows\system32\libcrypto-*.dll
- del C:\Windows\SysWOW64\libssl-*.dll C:\Windows\SysWOW64\libcrypto-*.dll
- PATH C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;C:\msys64\bin;%PATH%
install:
- bash -lc "rm -r /etc/pacman.d/gnupg/"
- bash -lc "pacman-key --init"
- bash -lc "pacman-key --populate msys2"
- bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
- bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
- bash -lc "pacman -U --noconfirm --config <(echo) msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
- bash -lc "pacman -U msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz --noconfirm"
- bash -lc "pacman -Syu --noconfirm"
# Workaround gcc9 update issues
#- pacman -R --noconfirm mingw-w64-i686-gcc-ada mingw-w64-i686-gcc-objc || true;
#- pacman -R --noconfirm mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-objc || true;
- pacman -Su --noconfirm
# we want python3.8
- pacman -S --needed --noconfirm %PKG_PREFIX%-python
- pacman -S --needed --noconfirm %PKG_PREFIX%-gtk3 %PKG_PREFIX%-gtksourceview3 %PKG_PREFIX%-python-gobject %PKG_PREFIX%-python-cairo
- pacman -S --needed --noconfirm %PKG_PREFIX%-python-psutil %PKG_PREFIX%-python-sqlalchemy %PKG_PREFIX%-python-pexpect
- pacman -S --needed --noconfirm %PKG_PREFIX%-python-cx_Freeze %PKG_PREFIX%-zlib %PKG_PREFIX%-python-pip %PKG_PREFIX%-freetype
# check python version
- "python --version"
- "pip3 install websockets"
# download stockfish
- "if not exist c:\\projects\\pychess\\engines mkdir c:\\projects\\pychess\\engines"
- "if not exist c:\\projects\\pychess\\engines\\stockfish_11_x64.exe appveyor DownloadFile https://github.com/niklasf/Stockfish/releases/download/fishnet-20200611/%STOCKFISH% -FileName c:\\projects\\pychess\\engines\\stockfish_11_x64.exe"
- dir c:\projects\pychess\engines
#- "if not exist C:\\msys64\\MINGW32\\DLLs mkdir C:\\msys64\\MINGW32\\DLLs"
#- "if not exist C:\\msys64\\MINGW32\\DLLs\\sqlite3.dll copy C:\\msys64\\MINGW32\\bin\\libsqlite3-0.dll C:\\msys64\\MINGW32\\DLLs\\sqlite3.dll"
- "if not exist C:\\msys64\\MINGW64\\DLLs mkdir C:\\msys64\\MINGW64\\DLLs"
- "if not exist C:\\msys64\\MINGW64\\DLLs\\sqlite3.dll copy C:\\msys64\\MINGW64\\bin\\libsqlite3-0.dll C:\\msys64\\MINGW64\\DLLs\\sqlite3.dll"
test_script:
# - 'msiexec.exe /i c:\\projects\\pychess\\dist\pychess-0.99.2-mingw.msi /QN /L*V "msilog.log"'
- cd testing
# print(board) needs this in Windows console (before Python 3.6)
- set PYTHONIOENCODING=utf8
- set PYTHONPATH=../lib
- set PYCHESS_UNITTEST=true
- "python run_tests.py"
build_script:
- "python setup.py bdist_msi"
- "dir dist"
#after_build:
# - if %APPVEYOR_REPO_TAG%=="True" appweyor PushArtifact dist\pychess-0.99.2-mingw.msi
#---------------------------------#
# artifacts configuration #
#---------------------------------#
artifacts:
- path: 'dist\*.msi'
# - path: 'msilog.log'