Lua-cURLv3/.travis.yml

85 lines
2.7 KiB
YAML

language: c
sudo: false
env:
global:
- LCURL_CC_FLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs"
- LCURL_LD_FLAGS="-shared --coverage"
matrix:
include:
- env: LUA="lua 5.1"
os: osx
- env: LUA="lua 5.1"
os: linux
- env: LUA="lua 5.2"
os: linux
- env: LUA="lua 5.3"
os: linux
- env: LUA="lua 5.4"
os: linux
- env: LUA="luajit 2.0"
os: linux
- env: LUA="luajit 2.1"
os: linux
cache:
directories:
- here
- $HOME/.cache/pip
branches:
only:
- master
- curl_mime
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:~/Library/Python/2.7/bin/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LCURL_LD_FLAGS="-bundle -undefined dynamic_lookup -all_load --coverage"; fi
- pip2 install --user cpp-coveralls
- pip2 install --user hererocks
- hererocks here -r^ --$LUA
- source here/bin/activate
- luarocks show lluv > /dev/null 2>&1 || bash .travis/setup_uv.sh
install:
- luarocks make rockspecs/lua-curl-scm-0.rockspec CFLAGS="$LCURL_CC_FLAGS" LIBFLAG="$LCURL_LD_FLAGS"
before_script:
- luarocks show luacov-coveralls > /dev/null 2>&1 || luarocks install luacov-coveralls
- luarocks show lunitx > /dev/null 2>&1 || luarocks install lunitx
- luarocks show luafilesystem > /dev/null 2>&1 || luarocks install luafilesystem
- luarocks show dkjson > /dev/null 2>&1 || luarocks install dkjson --deps-mode=none
- luarocks show luarocks-fetch-gitrec > /dev/null 2>&1 || luarocks install luarocks-fetch-gitrec
- 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
- luarocks show pegasus > /dev/null 2>&1 || luarocks install pegasus http.parser
--server=http://luarocks.org/manifests/moteus
- luarocks show pegasus-router > /dev/null 2>&1 || luarocks install pegasus-router
--server=http://luarocks.org/dev
- luarocks show lluv > /dev/null 2>&1 || luarocks install lluv UV_DIR=$TRAVIS_BUILD_DIR/libuv
--server=http://luarocks.org/dev
- luarocks show lluv-pegasus > /dev/null 2>&1 || luarocks install lluv-pegasus
--server=http://luarocks.org/dev --deps-mode=none
- lua test/server.lua &
- curl -s http://127.0.0.1:7090/get
script:
- cd test
- lua -e "print(require 'cURL.utils'.find_ca_bundle())"
- lunit.sh run.lua
- lua test_pause02.c.lua
- lua test_multi_callback.lua
- lua test_multi_nested_callback.lua
before_cache:
- coveralls -b .. -r .. --dump c.report.json
- luacov-coveralls -j c.report.json -v
- luarocks remove lua-curl
- rm -f /home/travis/.cache/pip/log/debug.log
notifications:
email:
on_success: change
on_failure: always