forked from easybuilders/easybuild-easyblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (90 loc) · 4.04 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
language: python
python: 2.6
dist: trusty
env:
matrix:
- ENV_MOD_VERSION=3.2.10 EASYBUILD_MODULES_TOOL=EnvironmentModulesC EASYBUILD_MODULE_SYNTAX=Tcl
- LMOD_VERSION=6.6.3
- LMOD_VERSION=6.6.3 EASYBUILD_MODULE_SYNTAX=Tcl
- LMOD_VERSION=7.8.5
- LMOD_VERSION=7.8.5 EASYBUILD_MODULE_SYNTAX=Tcl
# Tmod 4.1.4 is used in RHEL8
- ENV_MOD_VERSION=4.1.4 EASYBUILD_MODULES_TOOL=EnvironmentModules EASYBUILD_MODULE_SYNTAX=Tcl
matrix:
# mark build as finished as soon as job has failed
fast_finish: true
include:
# also test default configuration with Python 2.7
- python: 2.7
env: LMOD_VERSION=7.8.5
dist: xenial
# also test with Python 3.6
- python: 3.6
env: LMOD_VERSION=6.6.3
dist: xenial
- python: 3.6
env: LMOD_VERSION=6.5.1 EASYBUILD_MODULE_SYNTAX=Tcl
dist: xenial
- python: 3.6
env: LMOD_VERSION=7.8.5
dist: xenial
- python: 3.6
env: LMOD_VERSION=7.8.5 EASYBUILD_MODULE_SYNTAX=Tcl
dist: xenial
- python: 3.6
env: ENV_MOD_VERSION=3.2.10 EASYBUILD_MODULES_TOOL=EnvironmentModulesC EASYBUILD_MODULE_SYNTAX=Tcl
dist: xenial
- python: 3.6
env: ENV_MOD_VERSION=4.1.4 EASYBUILD_MODULES_TOOL=EnvironmentModules EASYBUILD_MODULE_SYNTAX=Tcl
dist: xenial
# also test most common configuration with Python 3.5 and 3.7
- python: 3.5
env: LMOD_VERSION=7.8.5
dist: xenial
- python: 3.7
dist: xenial
env: LMOD_VERSION=7.8.5
dist: xenial
addons:
apt:
packages:
- tcl8.5
# for testing OpenMPI-system*eb we need to have Open MPI installed
- libopenmpi-dev
- openmpi-bin
install:
# install easybuild-framework (and dependencies)
# prefer clone & easy_install over easy_install directly in order to obtain information of what was installed exactly
# use framework 'develop' branch, except when testing 'master'
- BRANCH=develop
- if [ "x$TRAVIS_BRANCH" = 'xmaster' ]; then BRANCH=master; fi
- if [ "x$TRAVIS_BRANCH" = 'x4.x' ]; then BRANCH=4.x; fi
- echo "Using easybuild-framework branch $BRANCH (\$TRAVIS_BRANCH $TRAVIS_BRANCH)"
- git clone -b $BRANCH --depth 10 --single-branch https://github.com/easybuilders/easybuild-framework.git
- cd easybuild-framework; git log -n 1; cd -
- pip install $PWD/easybuild-framework
# install environment modules tool using 'install_eb_dep.sh' script provided by easybuild-framework
- if [ ! -z $ENV_MOD_VERSION ]; then source $(which install_eb_dep.sh) modules-${ENV_MOD_VERSION} $HOME; fi
- if [ ! -z $LMOD_VERSION ]; then source $(which install_eb_dep.sh) lua-5.1.4.8 $HOME; fi
- if [ ! -z $LMOD_VERSION ]; then source $(which install_eb_dep.sh) Lmod-${LMOD_VERSION} $HOME; fi
script:
# make sure 'ml' alias is defined, otherwise sourcing the init script fails (silently) for Lmod (< 5.9.3)
- if [ ! -z $MOD_INIT ] && [ ! -z $LMOD_VERSION ]; then alias ml=foobar; fi
# set up environment for modules tool (if $MOD_INIT is defined)
- if [ ! -z $MOD_INIT ]; then source $MOD_INIT; type module; fi
# actively break "import setuptools" and "import pkg_resources",
# since EasyBuild should not have a runtime requirement on setuptools
- mkdir -p /tmp/$TRAVIS_JOB_ID
- echo 'raise ImportError("setuptools should no longer be relied on")' > /tmp/$TRAVIS_JOB_ID/setuptools.py
- echo 'raise ImportError("setuptools should no longer be relied on")' > /tmp/$TRAVIS_JOB_ID/pkg_resources.py
- export PYTHONPATH=$TRAVIS_BUILD_DIR:/tmp/$TRAVIS_JOB_ID:$PYTHONPATH
- python -O -m test.easyblocks.suite
# check for packaging issues by installing easybuild-easyblocks repo,
# and checking whether "eb --list-easyblocks" works as expected
- unset PYTHONPATH
- cd $TRAVIS_BUILD_DIR; pip install .
# make sure correct 'python' command is used
# 'python2' may also be available, and is picked prior to 'python'
- export EB_PYTHON=python
- cd $HOME; eb --list-easyblocks > eb_list_easyblocks.out
- grep 'ConfigureMake\>' eb_list_easyblocks.out && grep EB_GCC eb_list_easyblocks.out