-
Notifications
You must be signed in to change notification settings - Fork 57
/
.travis.yml
43 lines (34 loc) · 1.27 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
os: linux
dist: trusty
language: c
branches:
except:
- master
env:
global:
- LUAROCKS=2.3.0
jobs:
- LUA=lua5.2
before_install:
- source .travis/setenv_lua.sh
- pip install --user cpp-coveralls
- luarocks install Lua-cURL --server=https://luarocks.org/dev
- luarocks install luacov-coveralls --server=https://luarocks.org/dev
- luarocks install lunitx
install:
- luarocks make .travis/foo-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"
script:
- ./.travis/build.sh
- cd test
- lunit.sh test.lua
after_success:
- coveralls -b .. -r .. -i ./src --dump c.report.json
- luacov-coveralls -j c.report.json -v
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then curl -X POST "https://api.telegram.org/bot$TELEGRAM_TOKEN/sendMessage" -d chat_id=@luatelemetry -d "text=Build successful - PR #$TRAVIS_PULL_REQUEST $TRAVIS_PULL_REQUEST_BRANCH > $TRAVIS_BRANCH"; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then curl -X POST "https://api.telegram.org/bot$TELEGRAM_TOKEN/sendMessage" -d chat_id=@luatelemetry -d "text=Build successful - Branch $TRAVIS_BRANCH: $TRAVIS_COMMIT_MESSAGE"; fi'
notifications:
email:
recipients:
- "$EMAIL_NOTIFICATION"
on_success: never
on_failure: always