language: c

sudo: false

env:
  global:
    - LUAROCKS=2.2.1
  matrix:
    - LUA=lua5.1
    - LUA=lua5.2
    - LUA=lua5.3
    - LUA=luajit     # latest stable version (2.0.3)
    - LUA=luajit2.0  # current head of 2.0 branch
    - LUA=luajit2.1  # current head of 2.1 branch

branches:
  only:
    - master

before_install:
  - source .travis/setenv_lua.sh
  - pip install --user cpp-coveralls
  - luarocks install Lua-cURL         --server=https://rocks.moonscript.org/dev
  - luarocks install luacov-coveralls --server=https://rocks.moonscript.org/dev
  - luarocks install lunitx

install:
  - luarocks make rockspecs/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script: 
  - cd test
  - lua -e "print(require'cURL'.version())"
  - lunit.sh test.lua

after_success:
  - coveralls -b .. -r .. -i ./src --dump c.report.json
  - luacov-coveralls -j c.report.json -v

notifications:
  email:
    on_success: change
    on_failure: always

language: c

sudo: false

env:
  global:
    - LUAROCKS=2.2.2
  matrix:
    - LUA=lua5.1
    - LUA=lua5.2
    - LUA=lua5.3
    - LUA=luajit     # latest stable version (2.0.3)
    - LUA=luajit2.0  # current head of 2.0 branch
    - LUA=luajit2.1  # current head of 2.1 branch

branches:
  only:
    - master

before_install:
  - source .travis/setenv_lua.sh
  - pip install --user cpp-coveralls
  - luarocks install Lua-cURL         --server=https://rocks.moonscript.org/dev
  - luarocks install luacov-coveralls --server=https://rocks.moonscript.org/dev
  - luarocks install lunitx

install:
  - luarocks make rockspecs/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script: 
  - cd test
  - lua -e "print(require'cURL'.version())"
  - lunit.sh test.lua

after_success:
  - coveralls -b .. -r .. -i ./src --dump c.report.json
  - luacov-coveralls -j c.report.json -v

notifications:
  email:
    on_success: change
    on_failure: always

Bump LuaRocks version to 2.2.2
Bump LuaRocks version to 2.2.2
