3 # This script runs in a travis-ci.org (or .com) virtual machine
4 # https://docs.travis-ci.com/user/trusty-ci-environment/
7 # $TRAVIS_BUILD_DIR is /home/travis/build/twain47/Nominatim/, for more see
8 # https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
9 # Postgres 9.2 installed and started. role 'travis' already superuser
10 # Python 2.7.10, pip 7.1.2
12 # Travis has a 4 MB, 10000 line output limit, so where possible we supress
13 # output from installation scripts
14 # Travis strips color from the output
16 sudo service postgresql stop
18 sudo apt-get update -qq
19 sudo apt-get install -y -qq libboost-dev libboost-system-dev \
20 libboost-filesystem-dev libexpat1-dev zlib1g-dev libxml2-dev\
21 libbz2-dev libpq-dev libgeos-c1 libgeos++-dev libproj-dev \
22 postgresql-server-dev-9.3 postgresql-9.3-postgis-2.1 postgresql-contrib-9.3 \
23 apache2 php5 php5-pgsql php-pear php-db
25 sudo apt-get install -y -qq python-Levenshtein python-shapely \
26 python-psycopg2 tidy python-nose python-tidylib \
29 sudo -H pip install --quiet 'setuptools>=23.0.0' lettuce==0.2.18 'six>=1.9' haversine
30 sudo pear install PHP_CodeSniffer
32 sudo service postgresql restart
33 sudo -u postgres createuser -S www-data
35 # Make sure that system servers can read from the home directory:
37 chmod a+x $TRAVIS_BUILD_DIR
40 sudo tee /etc/apache2/conf-available/nominatim.conf << EOFAPACHECONF > /dev/null
41 <Directory "$TRAVIS_BUILD_DIR/build/website">
42 Options FollowSymLinks MultiViews
43 AddType text/html .php
47 Alias /nominatim $TRAVIS_BUILD_DIR/build/website
51 sudo a2enconf nominatim
52 sudo service apache2 restart
57 cmake $TRAVIS_BUILD_DIR
61 tee settings/local.php << EOF
63 @define('CONST_Website_BaseURL', '/nominatim/');