diff options
author | Diego Nehab <diego@impa.br> | 2013-06-13 16:19:03 +0800 |
---|---|---|
committer | Diego Nehab <diego@impa.br> | 2013-06-13 16:19:03 +0800 |
commit | c07ad19ca1b6cf3f0e9e482db0023497135fa668 (patch) | |
tree | ab099559553592cd63fb0f748897328d9d7ebc8c | |
parent | 7cad902bb77ab5052a7dd5560dd76e9dbaac5002 (diff) | |
download | luasocket-c07ad19ca1b6cf3f0e9e482db0023497135fa668.tar.gz luasocket-c07ad19ca1b6cf3f0e9e482db0023497135fa668.tar.bz2 luasocket-c07ad19ca1b6cf3f0e9e482db0023497135fa668.zip |
Merging moteus suggestions for rockspec and travis
-rw-r--r-- | .travis.yml | 54 | ||||
-rw-r--r-- | luasocket-scm-0.rockspec (renamed from luasocket-3.0-1.rockspec) | 7 |
2 files changed, 57 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ee6cfc7 --- /dev/null +++ b/.travis.yml | |||
@@ -0,0 +1,54 @@ | |||
1 | language: erlang | ||
2 | |||
3 | env: | ||
4 | global: | ||
5 | - LUAROCKS_BASE=luarocks-2.0.13 | ||
6 | matrix: | ||
7 | - LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1 | ||
8 | - LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2 | ||
9 | - LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0 | ||
10 | |||
11 | branches: | ||
12 | only: | ||
13 | - master | ||
14 | |||
15 | before_install: | ||
16 | - if [ $LUA = "luajit" ]; then | ||
17 | sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y; | ||
18 | fi | ||
19 | - sudo apt-get install $LUA | ||
20 | - sudo apt-get install $LUA_DEV | ||
21 | - lua$LUA_SFX -v | ||
22 | # Install a recent luarocks release | ||
23 | - wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | ||
24 | - tar zxvpf $LUAROCKS_BASE.tar.gz | ||
25 | - cd $LUAROCKS_BASE | ||
26 | - ./configure | ||
27 | --lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR" | ||
28 | - sudo make | ||
29 | - sudo make install | ||
30 | - cd $TRAVIS_BUILD_DIR | ||
31 | |||
32 | |||
33 | install: | ||
34 | - export DEBUG=DEBUG | ||
35 | - sudo -E luarocks make rockspecs/luasocket-scm-0.rockspec | ||
36 | |||
37 | script: | ||
38 | - cd test | ||
39 | - lua$LUA_SFX hello.lua | ||
40 | - lua$LUA_SFX testsrvr.lua > /dev/null & | ||
41 | - lua$LUA_SFX testclnt.lua | ||
42 | - lua$LUA_SFX stufftest.lua | ||
43 | - lua$LUA_SFX excepttest.lua | ||
44 | - lua$LUA_SFX test_bind.lua | ||
45 | - lua$LUA_SFX test_getaddrinfo.lua | ||
46 | - lua$LUA_SFX ltn12test.lua | ||
47 | - lua$LUA_SFX mimetest.lua | ||
48 | - lua$LUA_SFX urltest.lua | ||
49 | - lua$LUA_SFX test_socket_error.lua | ||
50 | |||
51 | notifications: | ||
52 | email: | ||
53 | on_success: change | ||
54 | on_failure: always \ No newline at end of file | ||
diff --git a/luasocket-3.0-1.rockspec b/luasocket-scm-0.rockspec index c3fa080..64155ee 100644 --- a/luasocket-3.0-1.rockspec +++ b/luasocket-scm-0.rockspec | |||
@@ -1,5 +1,5 @@ | |||
1 | package = "LuaSocket" | 1 | package = "LuaSocket" |
2 | version = "3.0-1" | 2 | version = "scm" |
3 | source = { | 3 | source = { |
4 | url = "git://github.com/diegonehab/luasocket.git", | 4 | url = "git://github.com/diegonehab/luasocket.git", |
5 | branch = "master" | 5 | branch = "master" |
@@ -38,7 +38,6 @@ local function make_plat(plat) | |||
38 | "LUASOCKET_DEBUG", | 38 | "LUASOCKET_DEBUG", |
39 | "NDEBUG", | 39 | "NDEBUG", |
40 | "LUASOCKET_API=__declspec(dllexport)", | 40 | "LUASOCKET_API=__declspec(dllexport)", |
41 | "UNIX_API=__declspec(dllexport)", | ||
42 | "MIME_API=__declspec(dllexport)" | 41 | "MIME_API=__declspec(dllexport)" |
43 | }, | 42 | }, |
44 | mingw32 = { | 43 | mingw32 = { |
@@ -46,7 +45,6 @@ local function make_plat(plat) | |||
46 | "LUASOCKET_INET_PTON", | 45 | "LUASOCKET_INET_PTON", |
47 | "WINVER=0x0501", | 46 | "WINVER=0x0501", |
48 | "LUASOCKET_API=__declspec(dllexport)", | 47 | "LUASOCKET_API=__declspec(dllexport)", |
49 | "UNIX_API=__declspec(dllexport)", | ||
50 | "MIME_API=__declspec(dllexport)" | 48 | "MIME_API=__declspec(dllexport)" |
51 | } | 49 | } |
52 | } | 50 | } |
@@ -86,7 +84,8 @@ local function make_plat(plat) | |||
86 | defines = defines[plat], | 84 | defines = defines[plat], |
87 | incdir = "/src" | 85 | incdir = "/src" |
88 | } | 86 | } |
89 | else | 87 | end |
88 | if plat == "win32" or plat == "mingw32" then | ||
90 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" | 89 | modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c" |
91 | modules["socket.core"].libraries = { "ws2_32" } | 90 | modules["socket.core"].libraries = { "ws2_32" } |
92 | end | 91 | end |