forked from luarocks/luarocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
166 lines (157 loc) · 4.43 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
language: python
cache:
directories:
- lua_install
- testrun/testing_cache-5.1
- testrun/testing_cache-5.2
- testrun/testing_cache-5.3
- testrun/testing_cache-2.1
- testrun/testing_server-5.1
- testrun/testing_server-5.2
- testrun/testing_server-5.3
- testrun/testing_server-2.1
- testrun/binary-samples
smoke_script: &smoke_script
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- ./makedist $BRANCH
- ./smoke_test.sh luarocks-$BRANCH.tar.gz
unit_script: &unit_script
- busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis"
- busted -o gtest --exclude-tags=git,integration --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full"
integration_script: &integration_script
- lua -v
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then shellcheck ./configure; fi
- ./configure --with-lua=lua_install
- ./makedist dev
- ./smoke_test.sh luarocks-dev.tar.gz
- busted -o gtest --exclude-tags=gpg,git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis"
- busted -o gtest --exclude-tags=gpg,git,unit --verbose -Xhelper "lua_dir=$PWD/lua_install,travis,env=full"
jobs:
include:
# Smoke tests for release branches
- stage: smoke
if: branch =~ ^[0-9].*
script: *smoke_script
os: linux
env:
- LUA="lua=5.3"
- stage: smoke
if: branch =~ ^[0-9].*
script: *smoke_script
os: osx
language: generic
env:
- LUA="luajit=2.1"
# Unit tests for linux
- stage: Unit on Linux
script: *unit_script
os: linux
env:
- LUA="lua=5.1"
- stage: Unit on Linux
script: *unit_script
os: linux
env:
- LUA="lua=5.2"
- stage: Unit on Linux
script: *unit_script
os: linux
env:
- LUA="lua=5.3"
- stage: Unit on Linux
script: *unit_script
os: linux
env:
- LUA="luajit=2.1"
# Integration tests for linux
- stage: Integration on Linux
script: *integration_script
os: linux
env:
- LUA="lua=5.1"
- stage: Integration on Linux
script: *integration_script
os: linux
env:
- LUA="lua=5.2"
- stage: Integration on Linux
script: *integration_script
os: linux
env:
- LUA="lua=5.3"
- stage: Integration on Linux
script: *integration_script
os: linux
env:
- LUA="luajit=2.1"
# Unit tests for mac
- stage: Unit on Mac
script: *unit_script
os: osx
env:
- LUA="lua=5.1"
language: generic
- stage: Unit on Mac
script: *unit_script
os: osx
env:
- LUA="lua=5.2"
language: generic
- stage: Unit on Mac
script: *unit_script
os: osx
env:
- LUA="lua=5.3"
language: generic
- stage: Unit on Mac
script: *unit_script
os: osx
env:
- LUA="luajit=2.1"
language: generic
# Integration tests for mac
- stage: Integration on Mac
script: *integration_script
os: osx
env:
- LUA="lua=5.1"
language: generic
- stage: Integration on Mac
script: *integration_script
os: osx
env:
- LUA="lua=5.2"
language: generic
- stage: Integration on Mac
script: *integration_script
os: osx
env:
- LUA="lua=5.3"
language: generic
- stage: Integration on Mac
script: *integration_script
os: osx
env:
- LUA="luajit=2.1"
language: generic
before_install:
- if [ ! -f lua_install/bin/luarocks ]; then pip install hererocks; fi
- if [ ! -f lua_install/bin/luarocks ]; then hererocks lua_install -r^ --$LUA; fi
- export PATH=$PATH:$PWD/lua_install/bin # Add directory with all installed binaries to PATH
install:
- if [ ! -f lua_install/bin/busted ]; then luarocks install busted; fi
- if [ ! -f lua_install/bin/luacov ]; then luarocks install cluacov; fi
after_success:
- luacov -c $TRAVIS_BUILD_DIR/testrun/luacov.config
- cd $TRAVIS_BUILD_DIR/testrun/ && bash <(curl -s https://codecov.io/bash)
- grep "Summary" -B1 -A1000 $TRAVIS_BUILD_DIR/testrun/luacov.report.out
notifications:
email:
on_success: change
on_failure: change
webhooks:
urls:
- https://webhooks.gitter.im/e/3320fc3f28abbb06e1d8
on_success: change
on_failure: always
on_start: never