forked from cea-hpc/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
355 lines (333 loc) · 14.4 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
language: generic
git:
depth: 320
branches:
except:
- c-master
- c-3.2
os: linux
dist: trusty
jobs:
include:
# 3 package variants on major Tcl releases mixed with 2 install variants
# run tests in code coverage mode on first installation variant
# for each Tcl releases
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.4 --disable-compat-version --disable-libtclenvmodules --prefix=/tmp/modules' COVERAGE='y'
EXTRA_SCRIPT_PRETEST='make install-testmodulerc install-testetcrc install-testmodspath-empty' EXTRA_SCRIPT_POSTTEST='make uninstall-testconfig'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.4
- perl
- python
- ruby
- cmake3
- r-base-core
# install configuration file before test to trigger specific behaviors on initialization parts
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.5 --disable-compat-version --disable-libtclenvmodules --enable-versioning --prefix=/tmp/modules --without-pager --enable-dotmodulespath' COVERAGE='y'
EXTRA_SCRIPT_PRETEST='make install-testmodulerc install-testsiteconfig install-testmodspath' EXTRA_SCRIPT_POSTTEST='make uninstall-testconfig'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.5
- perl
- python
- ruby
- cmake3
- r-base-core
# also enable a display on this test case to validate x-resource behavior
# check auto handling feature on this test configuration
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.6 --disable-compat-version --disable-libtclenvmodules --prefix=/tmp/modules --with-pager=more --with-pager-opts=-X --enable-auto-handling' COVERAGE='y'
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3 # give xvfb some time to start
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.6
- perl
- python
- ruby
- cmake3
- r-base-core
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.4 --prefix=/tmp/modules --enable-compat-version --with-tcl=/usr/lib/tcl8.4 --enable-versioning --disable-silent-shell-debug-support --disable-set-shell-startup --disable-quarantine-support --with-initconf-in=etcdir --with-loadedmodules=null:dot --without-pager --disable-avail-indepth --with-terminal-background=light --with-unload-match-order=returnfirst --disable-implicit-default --with-search-match=contains --with-locked-configs=extra_siteconfig' COVERAGE='y'
EXTRA_SCRIPT_PRETEST='make install-testinitrc install-testsiteconfig' EXTRA_SCRIPT_POSTTEST='make uninstall-testconfig'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.4
- perl
- python
- ruby
- cmake3
- r-base-core
# libtclenvmodules and compatibility version build requirements
- gcc
- autoconf
- tcl8.4-dev
# compatibility version-specific build requirements
- automake
- autopoint
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.5 --prefix=/tmp/modules --enable-compat-version --with-tcl=/usr/lib/tcl8.5 --disable-quarantine-support --with-loadedmodules=null:dot --with-pager=more --with-dark-background-colors=hi --with-locked-configs=implicit_default --enable-wa-277 --enable-advanced-version-spec --disable-ml' COVERAGE='y'
EXTRA_SCRIPT_PRETEST='make install-testmodulerc-1 install-testetcrc install-testmodspath' EXTRA_SCRIPT_POSTTEST='make uninstall-testconfig'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.5
- perl
- python
- ruby
- cmake3
- r-base-core
# libtclenvmodules and compatibility version build requirements
- gcc
- autoconf
- tcl8.5-dev
# compatibility version-specific build requirements
- automake
- autopoint
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.6 --prefix=/tmp/modules --enable-compat-version --with-tcl=/usr/lib/tcl8.6 --enable-append-manpath --enable-append-binpath --with-bin-search-path=/usr/bin:/bin --disable-silent-shell-debug-support --enable-windows-support --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH --enable-color --with-dark-background-colors=hi=1:se=2:er=91:wa=93:mp=1;94:di=94:al=96:sy=95'
EXTRA_SCRIPT_CD='modules-1.2.3+branch_name-91-g6dd3db49'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.6
- perl
- python
- ruby
- cmake3
- r-base-core
# libtclenvmodules and compatibility version build requirements
- gcc
- autoconf
- tcl8.6-dev
# compatibility version-specific build requirements
- automake
- autopoint
# install specific siteconfig file before test to trigger specific behaviors
# content of this specific siteconfig is activated by defining a TESTSUITE_ENABLE_SITECONFIG env var
# siteconfig is deactivated for testinstall suite, will be handled locally in this test suite
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.6 --prefix=/tmp/modules --disable-compat-version' COVERAGE='y' COVERAGE_OLDTCL='y'
EXTRA_SCRIPT_PRETEST='make install-testsiteconfig-1 && export TESTSUITE_ENABLE_SITECONFIG=1'
EXTRA_SCRIPT_POSTTEST='unset TESTSUITE_ENABLE_SITECONFIG'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.6
- perl
- python
- ruby
- cmake3
- r-base-core
# libtclenvmodules build requirements
- gcc
- autoconf
- tcl8.6-dev
- env: CONFIGURE_OPTS='--with-tclsh=tclsh8.4 --prefix=/tmp/modules --disable-compat-version --with-tcl=/usr/lib/tcl8.4' COVERAGE='y'
EXTRA_SCRIPT_PRETEST='make install-testsiteconfig-1 && export TESTSUITE_ENABLE_SITECONFIG=1'
EXTRA_SCRIPT_POSTTEST='unset TESTSUITE_ENABLE_SITECONFIG'
addons:
apt:
sources:
- sourceline: 'ppa:fish-shell/release-2'
packages:
- expect-dev
- dejagnu
- python-sphinx
- bash
- tcsh
- ksh
- zsh
- fish
- tcl8.4
- perl
- python
- ruby
- cmake3
- r-base-core
# libtclenvmodules build requirements
- gcc
- autoconf
- tcl8.4-dev
# CentOS tests
- env: OS_NAME=centos OS_VERSION=7 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER"
CONFIGURE_OPTS='--disable-compat-version'
EXTRA_SCRIPT_POSTINST='make srpm'
services:
- docker
# same configuration than above with Tcl extension lib disabled to compare performances over a loaded system
- env: OS_NAME=centos OS_VERSION=7 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER"
CONFIGURE_OPTS='--disable-compat-version --disable-libtclenvmodules'
EXTRA_SCRIPT_POSTINST='make srpm'
services:
- docker
# also enable a display on this test case to validate x-resource behavior
- env: OS_NAME=centos OS_VERSION=6 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run"
CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH'
EXTRA_PKGS='xorg-x11-server-utils xorg-x11-server-Xvfb automake gettext-devel libX11-devel tclx-devel'
EXTRA_SCRIPT_POSTINST='make srpm rpm'
services:
- docker
- env: OS_NAME=centos OS_VERSION=7 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run"
CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH'
EXTRA_PKGS='which xorg-x11-server-utils xorg-x11-server-Xvfb automake gettext-devel libX11-devel tclx-devel'
EXTRA_SCRIPT_POSTINST='make srpm rpm'
services:
- docker
- env: OS_NAME=centos OS_VERSION=8 DOCKER_IMAGE=${OS_NAME}:${OS_NAME}${OS_VERSION} CONTAINER=${OS_NAME}${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run"
CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH'
EXTRA_PKGS='which xorg-x11-server-utils xorg-x11-server-Xvfb automake gettext-devel libX11-devel'
EXTRA_SCRIPT_POSTINST='make srpm rpm'
services:
- docker
# openSUSE
- env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}/${OS_VERSION} CONTAINER=${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER"
CONFIGURE_OPTS='--disable-compat-version --enable-versioning'
services:
- docker
# also enable a display on this test case to validate x-resource behavior
- env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}/${OS_VERSION} CONTAINER=${OS_VERSION}
CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run"
CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --enable-versioning --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH'
EXTRA_PKGS='which xrdb xvfb-run automake gettext-tools'
services:
- docker
# OSX tests
- env: CONFIGURE_OPTS='--prefix=/tmp/modules --disable-compat-version --disable-libtclenvmodules' COVERAGE='y'
os: osx
# need to specify where to find tclConfig.sh on newer xcode release
- env: CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --with-loadedmodules=null:dot --with-tcl=/System/Library/Frameworks/Tcl.framework/Versions/8.5'
os: osx
env:
global:
- RUNTESTFLAGS='-v'
- CMD_PREFIX=''
- EXTRA_PKGS=''
install: true
before_install: |
if [ -n "$DOCKER_IMAGE" ]; then
sudo apt-get install -y expect-dev
docker pull $DOCKER_IMAGE &&
docker run --name $CONTAINER --detach --rm -i -t -w /modules -e TRAVIS='true' $DOCKER_IMAGE /bin/bash
case "${OS_NAME}" in
centos)
if [ $OS_VERSION -eq 6 ]; then SPHINX_PKG='python-sphinx10' MAN_PKG='man'; else SPHINX_PKG='python-sphinx' MAN_PKG='man-db'; fi
if [ $OS_VERSION -eq 8 ]; then PYTHON_PKG='python36' SPHINX_PKG='python3-sphinx'; else PYTHON_PKG='python'; fi
if [ $OS_VERSION -eq 8 ]; then docker exec $CONTAINER sed -i 's|enabled=0|enabled=1|' /etc/yum.repos.d/CentOS-PowerTools.repo; fi
docker exec $CONTAINER yum install -y epel-release &&
docker exec $CONTAINER yum install -y tcsh zsh ksh tcl perl $PYTHON_PKG ruby cmake R-core make wget perl $SPHINX_PKG git dejagnu $MAN_PKG rpm-build bzip2 autoconf gcc tcl-devel $EXTRA_PKGS &&
docker exec $CONTAINER wget -O /etc/yum.repos.d/shells_fish_release_2.repo http://download.opensuse.org/repositories/shells:fish:release:2/CentOS_${OS_VERSION}/shells:fish:release:2.repo &&
docker exec $CONTAINER yum install -y fish ;;
opensuse)
docker exec $CONTAINER zypper install -y tcsh zsh ksh fish tcl perl python ruby cmake R-core R-core-packages make wget python-Sphinx git dejagnu man net-tools autoconf gcc tcl-devel $EXTRA_PKGS ;;
esac
docker cp ./. $CONTAINER:modules
elif [ "$TRAVIS_OS_NAME" = 'osx' ]; then
brew update && brew upgrade wget && brew install expect dejagnu grep fish
else
true
fi
# optionally change dir to launch tests from path containing specific chars
before_script: |
if [ -n "$EXTRA_SCRIPT_CD" ]; then
cd -
mv $TRAVIS_BUILD_DIR $EXTRA_SCRIPT_CD
cd $EXTRA_SCRIPT_CD
else
true
fi
script:
- $CMD_PREFIX ./configure $CONFIGURE_OPTS
- $CMD_PREFIX make
- if [ -n "$EXTRA_SCRIPT_PRETEST" ]; then $CMD_PREFIX eval $EXTRA_SCRIPT_PRETEST; fi
- travis_wait 25 unbuffer $CMD_PREFIX script/mt
- if [ -n "$EXTRA_SCRIPT_POSTTEST" ]; then $CMD_PREFIX eval $EXTRA_SCRIPT_POSTTEST; fi
- $CMD_PREFIX make install
- $CMD_PREFIX script/mt install
- $CMD_PREFIX make uninstall
- if [ -n "$EXTRA_SCRIPT_POSTINST" ]; then $CMD_PREFIX $EXTRA_SCRIPT_POSTINST; fi
# report code coverage results
after_success: |
[ "$COVERAGE" = 'y' ] &&
script/nglfar2ccov modulecmd-test.tcl &&
bash <(curl -s https://codecov.io/bash)
after_script: |
[ -n "$DOCKER_IMAGE" ] &&
docker stop $CONTAINER