on bytedlogs help sign in
typeable/katip/.travis.yml
62 lines 3.4 kB history raw
1# Use new container infrastructure to enable caching
2sudo: false
4# Choose a lightweight base image; we provide our own build tools.
5language: c
7# GHC depends on GMP. You can add other dependencies here as well.
8addons:
9 apt:
10 packages:
11 - libgmp-dev
12 - oracle-java8-installer
14# The different configurations we want to test. You could also do things like
15# change flags or use --stack-yaml to point to a different file.
16matrix:
17 include:
18 - env: ARGS="--resolver=lts-10" ESVERSION=1.5.2 ESURL=https://download.elastic.co/elasticsearch/elasticsearch ESTESTARGS="--es-version 1"
19 - env: ARGS="--resolver=lts-11" ESVERSION=1.5.2 ESURL=https://download.elastic.co/elasticsearch/elasticsearch ESTESTARGS="--es-version 1"
20 - env: ARGS="--resolver=lts-12" ESVERSION=1.5.2 ESURL=https://download.elastic.co/elasticsearch/elasticsearch ESTESTARGS="--es-version 1"
21 - env: ARGS="--resolver=nightly" ESVERSION=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch ESTESTARGS="--es-version 5" ES_JAVA_OPTS="-Xms500m -Xmx750m" JAVA_HOME=/usr/lib/jvm/java-8-oracle
22 - env: ARGS="--resolver=nightly" ESVERSION=6.2.2 ESURL=https://artifacts.elastic.co/downloads/elasticsearch ESTESTARGS="--es-version 5" ES_JAVA_OPTS="-Xms500m -Xmx750m" JAVA_HOME=/usr/lib/jvm/java-8-oracle
23 # nightlies may fail from time to time
24 allow_failures:
25 - env: ARGS="--resolver=nightly" ESVERSION=5.5.0 ESURL=https://artifacts.elastic.co/downloads/elasticsearch ESTESTARGS="--es-version 5" ES_JAVA_OPTS="-Xms500m -Xmx750m" JAVA_HOME=/usr/lib/jvm/java-8-oracle
26 - env: ARGS="--resolver=nightly" ESVERSION=6.2.2 ESURL=https://artifacts.elastic.co/downloads/elasticsearch ESTESTARGS="--es-version 5" ES_JAVA_OPTS="-Xms500m -Xmx750m" JAVA_HOME=/usr/lib/jvm/java-8-oracle
28before_install:
29# Download and unpack the stack executable
30- mkdir -p ~/.local/bin
31- export PATH=$HOME/.local/bin:$PATH
32- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
34install:
35 - wget --no-check-certificate $ESURL/elasticsearch-$ESVERSION.tar.gz
36 - tar xzf elasticsearch-$ESVERSION.tar.gz
37 # set up a repo for snapshot testing. Required in ES >= 1.6
38 - echo "path.repo = [\"/tmp\"]" >> ./elasticsearch-$ESVERSION/elasticsearch.yml
39 - ./elasticsearch-$ESVERSION/bin/elasticsearch &
40 # Bloodhound seems to take a while to build and can sometimes stall out the build when travis detects no output.
43# This line does all of the work: installs GHC if necessary, build the library,
44# executables, and test suites, and runs the test suites. --no-terminal works
45# around some quirks in Travis's terminal implementation.
46script:
47 - stack $ARGS setup
48 # Prevent Inactivity timeouts. See https://github.com/travis-ci/travis-ci/issues/7020#issuecomment-288961580
49 - travis_wait 45 sleep 1800 &
50 - stack $ARGS test katip:test --no-terminal --haddock --no-haddock-deps
51 - stack $ARGS test katip-elasticsearch:test --no-terminal --test-arguments="$ESTESTARGS"
52 - stack $ARGS bench
53 - stack $ARGS build
54 - for f in katip/examples/*.hs; do stack $ARGS ghc -- -Wall -Werror $f -o /dev/null; done
55 - for f in katip-elasticsearch/examples/*.hs; do stack $ARGS ghc -- -Wall -Werror $f -o /dev/null; done
56 - stack $ARGS sdist
58# Caching so the next build will be fast too.
59cache:
60 directories:
61 - $HOME/.stack
62 - .stack-work