lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 8 May 2013, at 20:42, Choonster TheMage <choonster.2010@gmail.com> wrote:

> I've written a Lua library in C[1] and I'm trying to use Travis CI[2]
> to test it against Lua 5.1, 5.2 and LuaJIT with every commit to the
> GitHub repo.
> 
> I've managed to get it working with Lua 5.1.4 (which the LuaRocks
> package installs and makes available as `lua`), but the LuaJIT package
> doesn't seem to provide a `luajit` command.
> 
> My current Travis config file can be found at [3].
> 
> Does anyone have experience using Travis with Lua or know how to achieve this?
> 
> Thanks,
> Choonster
> 
> [1] https://github.com/Choonster/lua_bufflib
> [2] http://travis-ci.org/
> [3] https://github.com/Choonster/lua_bufflib/blob/master/.travis.yml

I am converting all the GitHub hosted Lua projects I'm involved with to Travis,
and it's proven fiddly enough that I've added .travis.yml generation to the
release framework they share (slingshot - also a multi-interpreter Travis client):

  http://github.com/gvvaughan/slingshot
  http://github.com/gvvaughan/lyaml
  http://github.com/gvvaughan/specl
  http://github.com/rrthomas/lua-stdlib
  http://github.com/luaposix/luaposix

Unfortunately, each time I've added a new project, slingshot has needed additional
tweaks, but I'd be very happy to accept patches/pull-requests and help with any
problems you encounter.

Either way, you're already on the right lines with your .travis.yml... but it's
much fiddlier than you realise!

[P.S. Slingshot also handles making LuaRocks, and keeping a release branch up to
      date... when I've ironed out the remaining rough edges I'll submit it as a
      rock]

HTH,
-- 
Gary V. Vaughan (gary AT vaughan DOT pe)