-
Notifications
You must be signed in to change notification settings - Fork 112
/
appveyor.yml
85 lines (73 loc) · 3.36 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
# Specify version format
version: "{build}"
# Only build when a tag is pushed
skip_non_tags: true
# Build worker image (VM template)
image: Visual Studio 2017
# clone directory
clone_folder: C:\Halite
# branches to build
branches:
only:
- master
# CMake doesn't work well when installed to a path with spaces, so
# install our own CMake.
install:
- ps: Invoke-WebRequest https://cmake.org/files/v3.12/cmake-3.12.1-win64-x64.zip -OutFile C:\cmake.zip
- ps: Expand-Archive c:\cmake.zip -DestinationPath c:\cmake
- ps: dir c:\cmake
- set path=C:\cmake\cmake-3.12.1-win64-x64\bin;%path%
- where cmake
# scripts that run after cloning repository
build_script:
- cd C:\Halite
- call .appveyor.bat
# Now build the offline tools.
# First, bundle up the dependencies into the Python embeddable distribution.
# Activate the proper compiler and install deps via pip
- cd C:\Halite\tools\hlt_client
- setlocal
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- C:\Python37-x64\python.exe -m pip install -r requirements.txt -t C:\deps-amd64
- endlocal
- setlocal
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- C:\Python37\python.exe -m pip install -r requirements.txt -t C:\deps-x86
- endlocal
- ps: Invoke-WebRequest http://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-amd64.zip -OutFile python37.zip
- ps: Expand-Archive python37.zip -DestinationPath C:\python-windows
- ps: Copy-Item C:\deps-amd64\zstd*.pyd C:\python-windows\zstd.pyd
# This just adds our deps into the root of the stdlib ZIP file.
- 7z a C:\python-windows\python37.zip C:\deps-amd64\*
- 7z a C:\Halite\python-windows-amd64.zip C:\python-windows
- ps: Remove-Item C:\python-windows -Force -Recurse
- ps: Invoke-WebRequest http://www.python.org/ftp/python/3.7.0/python-3.7.0-embed-win32.zip -OutFile python37-x86.zip
- ps: Expand-Archive python37-x86.zip -DestinationPath C:\python-windows
- ps: Copy-Item C:\deps-x86\zstd*.pyd C:\python-windows\zstd.pyd
- 7z a C:\python-windows\python37.zip C:\deps-x86\*
- 7z a C:\Halite\python-windows-x86.zip C:\python-windows
# Now build Halite-in-a-Box
- 7z x C:\Halite\python-windows-amd64.zip -oC:\Halite\tools\halite-in-a-box\extra\
# Add hlt_client into bundled libraries
- cd C:\Halite\tools\hlt_client
- 7z a C:\Halite\tools\halite-in-a-box\extra\python-windows\python37.zip hlt_client
- echo import sys >> C:\Halite\tools\halite-in-a-box\extra\python-windows\sitecustomize.py
- echo sys.path.append('') >> C:\Halite\tools\halite-in-a-box\extra\python-windows\sitecustomize.py
# Lack of whitespace before >> is intentional
- echo import site>> C:\Halite\tools\halite-in-a-box\extra\python-windows\python37._pth
- cd C:\Halite\libhaliteviz
- yarn install
- cd C:\Halite\tools\halite-in-a-box
- copy C:\Halite\game_engine\build\Release\halite.exe C:\Halite\tools\halite-in-a-box\extra\halite_engine.exe
- yarn install
- yarn webpack --mode=development
- yarn electron-builder -w
artifacts:
- path: game_engine\build\Release\halite.exe
name: halite-amd64.exe
- path: game_engine\build32\Release\halite.exe
name: halite-x86.exe
- path: 'tools\halite-in-a-box\electron-dist\Halite Offline Tools 1.0.0.exe'
name: halite-in-a-box.exe
- path: python-windows-amd64.zip
- path: python-windows-x86.zip