forked from easybuilders/easybuild-easyconfigs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (69 loc) · 3.65 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
language: python
matrix:
# mark build as finished as soon as job has failed
fast_finish: true
include:
# only test with Python 2.7 & 3.6 + Lmod 7.x
# other test configurations in GitHub Actions (see .github/workflows/unit_tests.yml)
- python: 2.7
env: LMOD_VERSION=7.8.22
- python: 3.6
env: LMOD_VERSION=7.8.22
addons:
apt:
packages:
- tcl8.5
# for testing OpenMPI-system*eb we need to have Open MPI installed
- libopenmpi-dev
- openmpi-bin
install:
# pydot (dep for python-graph-dot) 1.2.0 and more recent doesn't work with Python 2.6
- if [ "x$TRAVIS_PYTHON_VERSION" == 'x2.6' ]; then pip install pydot==1.1.0; else pip install pydot; fi
# required for test_dep_graph
- pip install pep8 python-graph-core python-graph-dot
# install easybuild-framework/easybuild-easyblocks (and dependencies)
# use 'develop' branch of framework/easyblocks, except when testing 'master' or '4.x' branches
- BRANCH=develop
- if [ "x$TRAVIS_BRANCH" = 'xmaster' ]; then BRANCH=master; fi
- if [ "x$TRAVIS_BRANCH" = 'x4.x' ]; then BRANCH=4.x; fi
- cd $HOME
- git clone -b $BRANCH --depth 10 --single-branch https://github.com/hpcugent/easybuild-framework.git
- cd easybuild-framework; git log -n 1; cd -
- pip install $PWD/easybuild-framework
- git clone -b $BRANCH --depth 10 --single-branch https://github.com/hpcugent/easybuild-easyblocks.git
- cd easybuild-easyblocks; git log -n 1; cd -
- pip install $PWD/easybuild-easyblocks
# 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
before_script:
- cd $TRAVIS_BUILD_DIR
# pull in target so we can diff against it to obtain list of touched files
- if [ "x$TRAVIS_BRANCH" != 'xmaster' ]; then git fetch -v origin ${TRAVIS_BRANCH}:${TRAVIS_BRANCH}; 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
- cd $HOME
- export PYTHONPATH=$TRAVIS_BUILD_DIR
- export PATH=$TRAVIS_BUILD_DIR/test/bin:$PATH
- python -O -m test.easyconfigs.suite
# check for packaging issues by installing easybuild-easyconfigs repo,
# and checking whether easyconfigs are found, by verifying whether "eb --search" works as expected
- unset PYTHONPATH
- cd $HOME; pip install $TRAVIS_BUILD_DIR
# make sure correct 'python' command is used
# 'python2' may also be available, and is picked prior to 'python'
- export EB_PYTHON=python
# robot-paths value should not be empty, but have an entry that includes easybuild/easyconfigs subdir
- eb --show-config | tee eb_show_config.out
- grep "^robot-paths .*/easybuild/easyconfigs" eb_show_config.out
# check whether some specific easyconfig files are found
- eb --search 'TensorFlow-1.14.*.eb' | tee eb_search_TF.out
- grep '/TensorFlow-1.14.0-foss-2019a-Python-3.7.2.eb$' eb_search_TF.out
- eb --search '^foss-2018b.eb' | tee eb_search_foss.out
- grep '/foss-2018b.eb$' eb_search_foss.out
# try installing M4 with system toolchain (requires ConfigureMake easyblock + easyconfig)
- eb --prefix /tmp/$USER M4-1.4.18.eb