toxcore/other/travis/hstox-install
iphydf d4be41a3ad
Use new encoding of Maybe in msgpack results.
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
2017-06-03 23:32:46 +00:00

23 lines
792 B
Bash
Executable File

#!/bin/sh
# An initial update is required or the cabal cache will be empty and no packages
# can be installed.
cabal update
# We need to install happy explicitly, otherwise setup-Simple-Cabal will fail to
# install.
cabal install happy
# Fetch hstox and msgpack-c.
git clone --recursive --depth=1 https://github.com/TokTok/hs-toxcore ../hs-toxcore
git clone --depth=1 https://github.com/msgpack/msgpack-c testing/hstox/msgpack-c
# Install toxcore dependencies before hstox, as hstox needs libsodium.
. other/travis/toxcore-linux-install
# Install the hstox test runner.
CABAL_FLAGS="--disable-library-profiling"
CABAL_FLAGS="$CABAL_FLAGS --extra-include-dirs=$CACHE_DIR/include"
CABAL_FLAGS="$CABAL_FLAGS --extra-lib-dirs=$CACHE_DIR/lib"
(cd ../hs-toxcore && cabal install $CABAL_FLAGS)