.travis.yml revision a389e88e0acb83d8489bdc5e55bc5522b152bbec
sudo: required
dist: trusty
language: generic
cache:
directories:
- $HOME/.stack
- $HOME/Hets-lib
- ./.stack-work
addons:
apt:
sources:
- sourceline: ppa:hets/hets
packages:
- libgmp-dev
- latexmk
- software-properties-common
- dpkg-dev
- spass
- darwin
- openjdk-7-jdk
postgresql: '9.6'
install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- sudo apt-get install --no-install-recommends `dpkg-checkbuilddeps debian/control 2>&1 | cut -f3- -d":" | sed -e 's,([^)]*),,g' -e 's,openjdk-.*-jdk,,'` || true
before_script:
- export HETS_LIB=$HOME/Hets-lib
- export HETS_MAGIC=$PWD/magic/hets.magic
- |
if [ -d $HETS_LIB/.git ]
then
pushd $HETS_LIB
git pull
popd
else
git clone --depth=1 https://github.com/spechub/Hets-lib.git $HETS_LIB
fi
# For some reason, Travis CI sets this environment variable, which breaks the
# tests (_JAVA_OPTIONS=-Xmx2048m -Xms512m)
- unset _JAVA_OPTIONS
# Compile Hets
- make stack
- stack exec -- ghc -V
matrix:
include:
- env: JOB='make check'
script:
- make
- ./hets -V
# Run the test
- make check
- env: JOB='Hets-lib'
script:
- make
- ./hets -V
# Run hets through Hets-lib
# Install Hets - this does not need to recompile Hets
- export PREFIX=/tmp/hets-install
- export PATH=$PREFIX/bin:$PATH
- mkdir -p $PREFIX
- make install-hets
- make install-common
- make install-owl-tools
- test/hets-lib-check.sh
- env: JOB='PostgreSQL'
services:
postgresql: '9.6'
script:
- make hets_server
- ./hets_server -V
# Run hets through Hets-lib
# Install Hets - this does not need to recompile Hets
- export PREFIX=/tmp/hets-install
- export PATH=$PREFIX/bin:$PATH
- mkdir -p $PREFIX
- make install-hets_server
- ln $PREFIX/bin/hets-server $PREFIX/bin/hets
- ln $PREFIX/lib/hets/hets-server $PREFIX/lib/hets/hets
- make install-common
- make install-owl-tools
- export DATABASE_CONFIG=Persistence/database_postgresql.yml
- test/hets-lib-database-check.sh
- env: JOB='SQLite'
script:
- make hets
- ./hets -V
# Run hets through Hets-lib
# Install Hets - this does not need to recompile Hets
- export PREFIX=/tmp/hets-install
- export PATH=$PREFIX/bin:$PATH
- mkdir -p $PREFIX
- make install-hets
- make install-common
- make install-owl-tools
- export DATABASE_FILE=/tmp/hets.sqlite
- test/hets-lib-database-check.sh