2015-06-15 00:13:43 -07:00
|
|
|
version: 0.3.2.{build}
|
|
|
|
|
|
|
|
os:
|
|
|
|
- Windows Server 2012 R2
|
|
|
|
|
|
|
|
shallow_clone: true
|
|
|
|
|
|
|
|
environment:
|
2016-11-16 05:17:10 -08:00
|
|
|
LR_EXTERNAL: c:\external
|
2021-01-06 10:18:09 -08:00
|
|
|
CURL_VER: 7.74.0
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
matrix:
|
2016-11-16 05:17:10 -08:00
|
|
|
- LUA: "lua 5.1"
|
2016-12-15 03:36:31 -08:00
|
|
|
- LUA: "lua 5.2"
|
|
|
|
- LUA: "lua 5.3"
|
2021-01-07 03:20:44 -08:00
|
|
|
- LUA: "lua 5.4"
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
platform:
|
|
|
|
- x64
|
2016-12-15 03:36:31 -08:00
|
|
|
- x86
|
2016-11-16 05:17:10 -08:00
|
|
|
# - mingw
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
cache:
|
2016-11-16 05:17:10 -08:00
|
|
|
- c:\hererocks -> appveyor.yml
|
2017-01-12 23:21:34 -08:00
|
|
|
- c:\external -> appveyor.yml
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
install:
|
2016-12-15 03:32:58 -08:00
|
|
|
- set PATH=C:\Python27\Scripts;%LR_EXTERNAL%;%PATH%
|
2016-11-16 05:17:10 -08:00
|
|
|
- if /I "%platform%"=="x86" set HR_TARGET=vs_32
|
|
|
|
- if /I "%platform%"=="x64" set HR_TARGET=vs_64
|
|
|
|
- if /I "%platform%"=="mingw" set HR_TARGET=mingw
|
|
|
|
- if /I "%platform%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
|
|
|
|
- if not exist "%LR_EXTERNAL%" (
|
|
|
|
mkdir "%LR_EXTERNAL%" &&
|
|
|
|
mkdir "%LR_EXTERNAL%\lib" &&
|
|
|
|
mkdir "%LR_EXTERNAL%\include"
|
|
|
|
)
|
|
|
|
- if not exist c:\hererocks (
|
|
|
|
pip install hererocks &&
|
2021-01-07 05:52:58 -08:00
|
|
|
hererocks c:\hererocks --%LUA% --target %HR_TARGET% -rlatest
|
2016-11-16 05:17:10 -08:00
|
|
|
)
|
2017-01-12 07:08:24 -08:00
|
|
|
- call c:\hererocks\bin\activate
|
2017-10-18 04:11:04 -07:00
|
|
|
- luarocks show luarocks-fetch-gitrec >nul 2>&1 || luarocks install luarocks-fetch-gitrec
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
before_build:
|
|
|
|
# external deps
|
|
|
|
- call .appveyor\install_curl.bat
|
|
|
|
|
|
|
|
build_script:
|
|
|
|
- set LUA_CURL_VER=scm-0
|
2015-06-15 01:17:52 -07:00
|
|
|
- if "%APPVEYOR_REPO_TAG%" == "true" set LUA_CURL_VER=%APPVEYOR_REPO_TAG_NAME:~1%-1
|
2015-06-15 00:13:43 -07:00
|
|
|
- echo "Making lua-curl-%LUA_CURL_VER% ..."
|
|
|
|
- luarocks make rockspecs/lua-curl-%LUA_CURL_VER%.rockspec
|
|
|
|
|
|
|
|
before_test:
|
|
|
|
# test deps
|
2016-11-16 05:17:10 -08:00
|
|
|
- if "%LUA%"=="lua 5.1" luarocks show bit32 >nul 2>&1 || luarocks install bit32
|
|
|
|
- luarocks show lunitx >nul 2>&1 || luarocks install lunitx
|
|
|
|
- luarocks show dkjson >nul 2>&1 || luarocks install dkjson
|
|
|
|
- luarocks show luafilesystem >nul 2>&1 || luarocks install luafilesystem
|
|
|
|
- luarocks show lua-path >nul 2>&1 || luarocks install lua-path
|
2021-01-07 06:02:49 -08:00
|
|
|
- luarocks show luarocks-fetch-gitrec > /dev/null 2>&1 || luarocks install luarocks-fetch-gitrec
|
2021-01-07 06:29:20 -08:00
|
|
|
- luarocks show lua-http-parser > /dev/null 2>&1 || luarocks install lua-http-parser || luarocks install test/deps/lua-http-parser-2.7-1.rockspec
|
2017-10-19 04:39:07 -07:00
|
|
|
- luarocks show pegasus >nul 2>&1 || luarocks install pegasus http.parser
|
2017-10-18 04:11:04 -07:00
|
|
|
--server=http://luarocks.org/manifests/moteus
|
2017-10-19 04:39:07 -07:00
|
|
|
- luarocks show pegasus-router >nul 2>&1 || luarocks install pegasus-router
|
|
|
|
--server=http://luarocks.org/dev
|
|
|
|
- ps: $TestServer = Start-Process lua -ArgumentList test/server.lua -RedirectStandardOutput "$env:APPVEYOR_BUILD_FOLDER\server.stdout.txt" -RedirectStandardError "$env:APPVEYOR_BUILD_FOLDER\server.stderr.txt" -PassThru
|
|
|
|
- curl -s http://127.0.0.1:7090/get
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
test_script:
|
|
|
|
- echo "Testing..."
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%\test
|
2016-04-20 00:31:06 -07:00
|
|
|
- lua run.lua
|
2015-06-15 00:13:43 -07:00
|
|
|
- lua test_pause02.c.lua
|
2016-09-27 07:52:49 -07:00
|
|
|
- lua test_multi_callback.lua
|
2016-09-28 02:53:40 -07:00
|
|
|
- lua test_multi_nested_callback.lua
|
2015-06-15 00:13:43 -07:00
|
|
|
|
|
|
|
after_test:
|
|
|
|
- cd %APPVEYOR_BUILD_FOLDER%
|
|
|
|
- .appveyor\pack_artifact.bat lua-curl bin-rock
|
2017-10-18 04:11:04 -07:00
|
|
|
|
2017-10-19 04:39:07 -07:00
|
|
|
on_failure:
|
2017-10-19 07:36:54 -07:00
|
|
|
- ps: Stop-Process -Id $TestServer.Id
|
2017-10-19 04:39:07 -07:00
|
|
|
- ps: $path = "$env:APPVEYOR_BUILD_FOLDER\server.stderr.txt"; if (Test-Path $path -PathType Leaf) { Push-AppveyorArtifact $path; } else { echo "File $path does not exist"; }
|
|
|
|
- ps: $path = "$env:APPVEYOR_BUILD_FOLDER\server.stdout.txt"; if (Test-Path $path -PathType Leaf) { Push-AppveyorArtifact $path; } else { echo "File $path does not exist"; }
|
|
|
|
|
2017-10-18 04:11:04 -07:00
|
|
|
on_finish:
|
2017-10-19 04:39:07 -07:00
|
|
|
- curl -s http://127.0.0.1:7090/get
|
|
|
|
- ps: Stop-Process -Id $TestServer.Id
|