commit
fdd1829c8f
13 changed files with 75 additions and 13 deletions
32
.travis.yml
32
.travis.yml
|
@ -1,26 +1,32 @@
|
|||
sudo: false
|
||||
|
||||
language: c
|
||||
|
||||
env:
|
||||
- GHCVER=7.8.4
|
||||
- GHCVER=7.10.2
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- hvr-ghc
|
||||
packages:
|
||||
- ghc-7.8.4
|
||||
- ghc-7.10.2
|
||||
- cabal-install-1.22
|
||||
- libgmp-dev
|
||||
|
||||
env:
|
||||
- STACK_YAML=stack-ghc-7.8.4.yaml
|
||||
- STACK_YAML=stack.yaml
|
||||
|
||||
install:
|
||||
# stack
|
||||
- mkdir -p ~/.local/bin
|
||||
- travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v0.1.4.0/stack-0.1.4.0-x86_64-linux.tar.gz | tar -xvzf -
|
||||
- mv stack ~/.local/bin
|
||||
- export PATH=~/.local/bin:$PATH
|
||||
- stack --version
|
||||
- (mkdir -p $HOME/.local/bin && cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc)
|
||||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH
|
||||
- ghc --version
|
||||
- cabal --version
|
||||
- travis_retry cabal update
|
||||
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
|
||||
|
||||
script:
|
||||
- stack setup
|
||||
- stack build --test --ghc-options "-Werror"
|
||||
- for package in $(cat sources.txt); do (cd $package && tinc && cabal configure --enable-tests --disable-optimization && cabal build && cabal test) || exit 1; done
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.stack
|
||||
- $HOME/.tinc/cache
|
||||
|
|
3
servant-blaze/tinc.yaml
Normal file
3
servant-blaze/tinc.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
3
servant-cassava/tinc.yaml
Normal file
3
servant-cassava/tinc.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
5
servant-client/tinc.yaml
Normal file
5
servant-client/tinc.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
||||
- name: servant-server
|
||||
path: ../servant-server
|
3
servant-docs/tinc.yaml
Normal file
3
servant-docs/tinc.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
15
servant-examples/tinc.yaml
Normal file
15
servant-examples/tinc.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
||||
- name: servant-server
|
||||
path: ../servant-server
|
||||
- name: servant-client
|
||||
path: ../servant-client
|
||||
- name: servant-js
|
||||
path: ../servant-js
|
||||
- name: servant-lucid
|
||||
path: ../servant-lucid
|
||||
- name: servant-docs
|
||||
path: ../servant-docs
|
||||
- name: servant-foreign
|
||||
path: ../servant-foreign
|
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
@ -17,10 +18,12 @@ data User = User
|
|||
, registration_date :: Day
|
||||
} deriving (Eq, Show, Generic)
|
||||
|
||||
#if !MIN_VERSION_aeson(0,10,0)
|
||||
-- orphan ToJSON instance for Day. necessary to derive one for User
|
||||
instance ToJSON Day where
|
||||
-- display a day in YYYY-mm-dd format
|
||||
toJSON d = toJSON (showGregorian d)
|
||||
#endif
|
||||
|
||||
instance ToJSON User
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
|
@ -17,10 +18,12 @@ data User = User
|
|||
, registration_date :: Day
|
||||
} deriving (Eq, Show, Generic)
|
||||
|
||||
#if !MIN_VERSION_aeson(0,10,0)
|
||||
-- orphan ToJSON instance for Day. necessary to derive one for User
|
||||
instance ToJSON Day where
|
||||
-- display a day in YYYY-mm-dd format
|
||||
toJSON d = toJSON (showGregorian d)
|
||||
#endif
|
||||
|
||||
instance ToJSON User
|
||||
|
||||
|
|
3
servant-foreign/tinc.yaml
Normal file
3
servant-foreign/tinc.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
7
servant-js/tinc.yaml
Normal file
7
servant-js/tinc.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
||||
- name: servant-server
|
||||
path: ../servant-server
|
||||
- name: servant-foreign
|
||||
path: ../servant-foreign
|
3
servant-lucid/tinc.yaml
Normal file
3
servant-lucid/tinc.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
5
servant-mock/tinc.yaml
Normal file
5
servant-mock/tinc.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
||||
- name: servant-server
|
||||
path: ../servant-server
|
3
servant-server/tinc.yaml
Normal file
3
servant-server/tinc.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- name: servant
|
||||
path: ../servant
|
Loading…
Reference in a new issue