forked from kernelsauce/turbo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
90 lines (78 loc) · 2.64 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
version: 2.0.0-{build}
os: Windows Server 2012 R2
shallow_clone: true
environment:
TURBO_PACK: C:\pack
TURBO_ROOT: C:\turbo.lua
OPENSSL_ROOT: C:\turbo.lua\Build-OpenSSL-VC-64
matrix:
- platform: x64
#cache:
init:
- choco install mingw strawberryperl
- '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %platform%'
- SET PATH=%PATH%;C:\tools\mingw64\bin;%TURBO_ROOT%;%TURBO_ROOT%\luarocks\2.2;%TURBO_ROOT%\rocks\bin;
install:
- cd %APPVEYOR_BUILD_FOLDER%
- mkdir %TURBO_ROOT%
- mkdir %TURBO_ROOT%\src
- mkdir %TURBO_ROOT%\rocks
- cd %TURBO_ROOT%\src
#
# Build LuaJIT 2.
- git clone http://luajit.org/git/luajit-2.0.git
- cd %TURBO_ROOT%\src\luajit-2.0\src
- call msvcbuild
- cp luajit.exe %TURBO_ROOT%
- cp lua51.dll %TURBO_ROOT%
- SET LUA_PATH=%TURBO_ROOT%\rocks\share\lua\5.1\?.lua;%TURBO_ROOT%\rocks\share\lua\5.1\?\init.lua;%APPVEYOR_BUILD_FOLDER%\?.lua;%APPVEYOR_BUILD_FOLDER%\turbo\?.lua
- SET LUA_CPATH=%TURBO_ROOT%\rocks\lib\lua\5.1\?.dll
#
# Install LuaRocks from github head.
- cd %TURBO_ROOT%\src
- git clone https://github.com/keplerproject/luarocks.git
- cd C:\turbo.lua\src\luarocks
- call install.bat /TREE %TURBO_ROOT%\rocks\ /P %TURBO_ROOT%\luarocks\ /INC %TURBO_ROOT%\src\luajit-2.0\src /LIB %TURBO_ROOT%\src\luajit-2.0\src /LUA %TURBO_ROOT% /Q
#
# Build OpenSSL 1.0.2c
- cd %TURBO_ROOT%\src
- appveyor DownloadFile http://mirror.switch.ch/ftp/mirror/openssl/source/openssl-1.0.2d.tar.gz
- 7z x openssl-1.0.2d.tar.gz
- 7z x openssl-1.0.2d.tar
- cd openssl-1.0.2d
- perl Configure VC-WIN64A --prefix=%OPENSSL_ROOT%
- ms\do_win64a
- nmake -f ms\nt.mak
- nmake -f ms\nt.mak install
#
# Install Lua deps.
- cd %TURBO_ROOT%\src
- call luarocks install luasocket
- call luarocks install luafilesystem
- call luarocks install busted
#
# Build LuaSec from Git.
- cd %TURBO_ROOT%\src
- git clone https://github.com/kernelsauce/luasec.git
- cd luasec
- call luarocks make luasec-0.5-3.rockspec OPENSSL_INCDIR=%OPENSSL_ROOT%\include OPENSSL_LIBDIR=%OPENSSL_ROOT%\lib
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
- mingw32-make SSL=none
- SET TURBO_LIBTFFI=%APPVEYOR_BUILD_FOLDER%\libtffi_wrap.dll
- SET TURBO_CAPATH=%APPVEYOR_BUILD_FOLDER%\turbo\ca-certificates.crt
- dir
artifacts:
- path: libtffi_wrap.dll
name: libtffi_wrap.dll
- path: turbolua.zip
name: turbolua.zip
test_script:
- cd %APPVEYOR_BUILD_FOLDER%
- busted spec\web_spec.lua
- busted spec\httputil_spec.lua
- busted spec\async_spec.lua
- busted spec\structs_spec.lua
- busted spec\util_spec.lua
- busted spec\mustache_spec.lua
- busted spec\iosimple_spec.lua