-
Notifications
You must be signed in to change notification settings - Fork 52
/
.travis.yml
49 lines (43 loc) · 1.76 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
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
language: c
# GHC depends on GMP. You can add other dependencies here as well.
addons:
apt:
packages:
- libgmp-dev
# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
- ARGS="--resolver lts-4"
- ARGS="--resolver lts-5"
- ARGS="--resolver lts-6"
- ARGS="--resolver lts-7"
- ARGS="--resolver lts-8"
- ARGS="--resolver lts-9"
# - ARGS="--resolver nightly"
before_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'
- stack $ARGS --no-terminal --install-ghc install hscolour
# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
# around some quirks in Travis's terminal implementation.
script:
- export EXTRA_DEPS=haskell-src-exts-1.20.1
- stack $ARGS --no-terminal --install-ghc install --test --haddock $EXTRA_DEPS .
- stack $ARGS --no-terminal exec -- rest-example-gen --haskell --target=./rest-example/client
- stack $ARGS --no-terminal build $EXTRA_DEPS restexample-client
- rm -f rest-example/api.js
- stack $ARGS --no-terminal exec -- rest-example-gen --javascript --target=./rest-example/api.js
- node rest-example/api.js
- rm -f rest-example/api.rb
- stack $ARGS --no-terminal exec -- rest-example-gen --ruby --target=./rest-example/api.rb
- ruby rest-example/api.rb
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack