-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
98 lines (91 loc) · 3.86 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
language: python
python:
- "2.7"
jdk:
- oraclejdk7
services:
- neo4j
- rabbitmq
env:
global:
- OME_HOST=localhost
- OME_USER=root
- OME_PASS=omero
matrix:
- GRAPH_ENGINE=neo4j
- GRAPH_ENGINE=pygraph
before_install:
# prepare the DB
- psql -c "CREATE USER omero WITH PASSWORD 'omero';" -U postgres
- sudo -u postgres createdb -O omero omero
# Install OMERO server
# ** install OMERO dependencies
- sudo apt-get -qq update
- sudo apt-get install -qq zeroc-ice34 python-zeroc-ice ice34-services
# add Python Ice modules to PYTHONPATH
- export PYTHONPATH="/usr/lib/pymodules/python2.7/:$PYTHONAPTH"
- sudo apt-get install -qq python-imaging python-numpy python-tables python-genshi
# ** we are into the omero.biobank directory, exit before cloning
- cd ..
- git clone --recursive git://github.com/openmicroscopy/openmicroscopy.git ./omero
- cd ./omero
- git checkout -b master origin/master
- git reset --hard v.4.4.8
- git submodule update
# ** copy OMERO.biobank models
- cp ../omero.biobank/models/*.ome.xml ./components/model/resources/mappings/
# ** create the omero.data.directory
- mkdir ./ome_data
# ** patching OMERO server version
- cd ../omero.biobank
- ./utils/patch_ome_config --ome-home ../omero --models-repository ./models
# ** Neo4j and RabbitMQ setup
- cd ../omero
- echo "" >> etc/omero.properties
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then echo "omero.biobank.graph.engine=neo4j" >> etc/omero.properties; fi
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then echo "omero.biobank.graph.uri=http://localhost:7474/db/data/" >> etc/omero.properties; fi
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then echo "omero.biobank.messages_queue.enabled=True" >> etc/omero.properties; fi
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then echo "omero.biobank.messages_queue.host=localhost" >> etc/omero.properties; fi
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then echo "omero.biobank.messages_queue.queue=bb-travis-ci" >> etc/omero.properties; fi
- if [[ "$GRAPH_ENGINE" == "pygraph" ]]; then echo "omero.biobank.graph.engine=pygraph" >> etc/omero.properties; fi
- if [[ "$GRAPH_ENGINE" == "pygraph" ]]; then echo "omero.biobank.messages_queue.enabled=False" >> etc/omero.properties; fi
# ** patch the build.py script in order to avoid JavaOutOfMemory exception
# when compiling models
- patch ./build.py < ../omero.biobank/.travis-data/build.py.patch
# ** build the server
- ./build.py -quiet
- export PYTHONPATH="${PWD}/dist/lib/python/:$PYTHONPATH"
- ./build.py -quiet build-schema -Domero.db.dialect=org.hibernate.dialect.PostgreSQLDialect
# build and deploy the DB
- ./dist/bin/omero db script OMERO4.4 0 $OME_PASS
- psql -h localhost -U omero omero < OMERO4.4__0.sql
# create and configure the omero.data.dir
- mkdir ./omero_data
- ./dist/bin/omero config set omero.data.dir ./omero_data
# start the server
- ./dist/bin/omero admin start
# Install biodoop-core
- cd ..
- sudo apt-get install -qq protobuf-compiler
- git clone https://github.com/crs4/biodoop-core.git
- cd ./biodoop-core
- make
- python setup.py install
install:
- cd ../omero.biobank
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then pip install pika; fi
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then pip install bulbs; fi
- if [[ "$GRAPH_ENGINE" == "neo4j" ]]; then pip install voluptuous; fi
- if [[ "$GRAPH_ENGINE" == "pygraph" ]]; then easy_install python-graph-core; fi
# retrieve neo4j and rabbitmq config parameters
- python ./build_configuration.py -H localhost -U ${OME_USER} -P ${OME_PASS} --python
- python setup.py install
# start the graph_manager daemon
- .travis-data/run_graph_daemon.sh
# move to test directory in order to avoid PYTHONPATH problems
- cd ./test
script:
- python ./kb/test_action.py
- python ./kb/test_individual.py
- python ./kb/test_vessel.py
- python ./kb/test_illumina_chips.py