-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
63 lines (57 loc) · 1.6 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: c
sudo: false
addons:
apt:
sources:
- kalakris-cmake
packages:
- cmake
env:
global:
- LUAROCKS=2.3.0
matrix:
- WITH_LUA_ENGINE=Lua LUA=lua5.3
- WITH_LUA_ENGINE=LuaJIT LUA=luajit2.1
- PROCESS_CLEANUP_TEST=1 LUA=lua5.2
os:
- linux
- osx
before_install:
- git submodule update --init --recursive
- git submodule update --recursive
- source .ci/setenv_lua.sh
- lua -e "print(package.path)"
script:
- if [ "x$PROCESS_CLEANUP_TEST" = "x" ]; then make && make test; else ./tests/test-sigchld-after-lua_close.sh; fi
# Test rock installation
- luarocks make
- test $PWD = `lua -e "print(require'luv'.cwd())"`
- luarocks remove luv
# Test the alternate rockspec
- mkdir build/lib
- cp build/deps/libuv/libuv_a.a build/lib/libuv.a
- cp -a deps/libuv/include build
- luarocks make rockspecs/$(ls rockspecs) LIBUV_DIR=build
- test $PWD = `lua -e "print(require'luv'.cwd())"`
jobs:
include:
- stage: deploy
if: tag IS present
env: WITH_LUA_ENGINE=LuaJIT LUA=luajit2.1
script: skip
before_deploy:
- .ci/make_rockspec.sh $TRAVIS_TAG
- lua -e "print(package.path)"
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: luv-$TRAVIS_TAG.tar.gz
overwrite: true
skip_cleanup: true
on:
tags: true
after_deploy:
- luarocks install lua-cjson # required for luarocks upload
- lua -e "print(package.path)"
- lua -e "print(require('cjson'))"
- luarocks upload luv-$TRAVIS_TAG.rockspec --api-key=$LUAROCKS_API_KEY --force