Skip to content

Commit 83de1e1

Browse files
committed
Use hererocks.
1 parent 2d50bdb commit 83de1e1

1 file changed

Lines changed: 26 additions & 20 deletions

File tree

appveyor.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,38 @@ os:
66
shallow_clone: true
77

88
environment:
9-
LUAROCKS_VER: 2.2.1
9+
LR_EXTERNAL: c:\external
1010
CURL_VER: 7.51.0
1111

1212
matrix:
13-
- LUA_VER: 5.1.5
14-
- LUA_VER: 5.2.4
15-
- LUA_VER: 5.3.0
16-
# - LJ_VER: 2.0.3
17-
# - LJ_VER: 2.1
13+
- LUA: "lua 5.1"
14+
- LUA: "lua 5.2"
15+
- LUA: "lua 5.3"
1816

1917
platform:
2018
- x64
2119
- x86
20+
# - mingw
2221

2322
cache:
24-
- c:\lua -> appveyor.yml
25-
- c:\external -> appveyor.yml
26-
- C:\Program Files (x86)\LuaRocks -> appveyor.yml
27-
- C:\Program Files\LuaRocks -> appveyor.yml
28-
29-
init:
30-
- call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %platform%
23+
- c:\hererocks -> appveyor.yml
3124

3225
install:
33-
# Setup Lua development/build environment
34-
- call .appveyor\install.bat
26+
- set PATH=C:\Python27\Scripts;%PATH%
27+
- if /I "%platform%"=="x86" set HR_TARGET=vs_32
28+
- if /I "%platform%"=="x64" set HR_TARGET=vs_64
29+
- if /I "%platform%"=="mingw" set HR_TARGET=mingw
30+
- if /I "%platform%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
31+
- if not exist "%LR_EXTERNAL%" (
32+
mkdir "%LR_EXTERNAL%" &&
33+
mkdir "%LR_EXTERNAL%\lib" &&
34+
mkdir "%LR_EXTERNAL%\include"
35+
)
36+
- if not exist c:\hererocks (
37+
pip install hererocks &&
38+
hererocks c:\hererocks --%LUA% --target %HR_TARGET% -rlatest &&
39+
call c:\hererocks\bin\activate
40+
)
3541

3642
before_build:
3743
# external deps
@@ -45,11 +51,11 @@ build_script:
4551

4652
before_test:
4753
# test deps
48-
- luarocks install lunitx
49-
- luarocks install dkjson
50-
- luarocks install luafilesystem
51-
- if "%LUA_SHORTV%"=="5.1" luarocks install bit32
52-
- luarocks install lua-path
54+
- if "%LUA%"=="lua 5.1" luarocks show bit32 >nul 2>&1 || luarocks install bit32
55+
- luarocks show lunitx >nul 2>&1 || luarocks install lunitx
56+
- luarocks show dkjson >nul 2>&1 || luarocks install dkjson
57+
- luarocks show luafilesystem >nul 2>&1 || luarocks install luafilesystem
58+
- luarocks show lua-path >nul 2>&1 || luarocks install lua-path
5359

5460
test_script:
5561
- echo "Testing..."

0 commit comments

Comments
 (0)