Travis build with examples-sdl

This commit is contained in:
Harendra Kumar 2017-12-04 16:09:36 +05:30
parent 74c3785866
commit e4ed109488
7 changed files with 62 additions and 16 deletions

View File

@ -18,13 +18,16 @@ matrix:
#- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
#addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=lts-6.35 CABALVER=1.22
addons: {apt: {packages: [libgmp-dev,cabal-install-1.22], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.22
addons: {apt: {packages: [libgmp-dev,cabal-install-1.22,libsdl1.2-dev], sources: [hvr-ghc]}}
# stack/linux use a pre-installed cabal-install for faster builds
# GHC 8.0.1
- env: BUILD=stack RESOLVER=lts-7.24 CABALVER=1.24
addons: {apt: {packages: [libgmp-dev,cabal-install-1.24], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=lts-7.24 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
addons: {apt: {packages: [libgmp-dev,cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
- env: BUILD=stack RESOLVER=lts-9.16 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
# Note COVERALLS (hpc-coveralls) requires cabal build
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS=y
@ -45,7 +48,7 @@ matrix:
os: osx
# GHC 8.0.2
- env: BUILD=stack RESOLVER=lts-9.3
- env: BUILD=stack RESOLVER=lts-9.16
os: osx
allow_failures:
@ -56,7 +59,7 @@ install: true
script:
- |
# Customizable options
PACKAGE_TEST_VER="536355be0507c234e5b4ea51dafdb8c3d1ede948"
PACKAGE_TEST_VER="df401952254b782379b3d109bd051a4a56e61635"
GHC_OPTIONS="-O0 -Werror"
test -n "$COVERALLS" && \
COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines \
@ -80,6 +83,8 @@ script:
PATH=$PATH
BUILD=$BUILD
RESOLVER=$RESOLVER
STACK_YAML=$STACK_YAML
STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
GHCVER=$GHCVER
GHC_OPTIONS="$GHC_OPTIONS"
COVERALLS_OPTIONS="$COVERALLS_OPTIONS"

View File

@ -17,7 +17,7 @@ environment:
PATH: "%PATH%;%APPDATA%\\local\\bin"
CABAL_REINIT_CONFIG: "y"
TEST_INSTALL: "y"
PACKAGE_TEST_VER: "536355be0507c234e5b4ea51dafdb8c3d1ede948"
PACKAGE_TEST_VER: "df401952254b782379b3d109bd051a4a56e61635"
cache:
- "%STACK_ROOT%" # stack root

View File

@ -8,7 +8,7 @@ module Streamly.Examples.AcidRainGame where
import Streamly
import Control.Concurrent (threadDelay)
import Control.Monad (when)
import Control.Monad.State
import Control.Monad.State (MonadState, get, modify, runStateT)
import Data.Semigroup (cycle1)
data Event = Harm Int | Heal Int | Quit deriving (Show)

View File

@ -3,7 +3,7 @@
module Streamly.Examples.MergeSortedStreams where
import Data.Word
import System.Random
import System.Random (getStdGen, randoms)
import Data.List (sort)
import Streamly
import qualified Streamly.Prelude as A

16
stack-7.10.yaml Normal file
View File

@ -0,0 +1,16 @@
resolver: lts-6.35
packages:
- '.'
extra-deps:
- lockfree-queue-0.2.3.1
- simple-conduit-0.4.0
- transient-0.5.9.2
- http-conduit-2.2.2
- http-client-0.5.0
- http-client-tls-0.3.0
- SDL-0.6.5.1
flags: {}
extra-package-dbs: []
# For mac ports installed SDL library on Mac OS X
#extra-include-dirs:
#- /opt/local/include

17
stack-8.0.yaml Normal file
View File

@ -0,0 +1,17 @@
resolver: lts-7.24
packages:
- '.'
extra-deps:
- lockfree-queue-0.2.3.1
- simple-conduit-0.6.0
- transient-0.4.4
- monad-recorder-0.1.0
- http-conduit-2.2.2
- http-client-0.5.0
- http-client-tls-0.3.0
- SDL-0.6.5.1
flags: {}
extra-package-dbs: []
# For mac ports installed SDL library on Mac OS X
#extra-include-dirs:
#- /opt/local/include

View File

@ -23,6 +23,7 @@ homepage: http://github.com/harendra-kumar/streamly
bug-reports: https://github.com/harendra-kumar/streamly/issues
license: BSD3
license-file: LICENSE
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.1
author: Harendra Kumar
maintainer: harendra.kumar@gmail.com
copyright: 2017 Harendra Kumar
@ -31,6 +32,13 @@ stability: Experimental
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
Changelog.md
README.md
stack-7.10.yaml
stack-8.0.yaml
stack.yaml
source-repository head
type: git
location: https://github.com/harendra-kumar/streamly
@ -112,9 +120,9 @@ library
if flag(examples) || flag(examples-sdl)
build-Depends:
http-conduit
, path-io
, random
http-conduit >= 2.2.2 && < 2.3
, path-io >= 0.1.0 && < 1.4
, random >= 1.0.0 && < 1.2
if flag(examples-sdl)
build-Depends:
@ -208,8 +216,8 @@ executable nested-loops
buildable: True
build-Depends:
streamly
, base >= 4.8 && < 5
, random
, base >= 4.8 && < 5
, random >= 1.0.0 && < 1.2
else
buildable: False
@ -220,7 +228,7 @@ executable parallel-loops
buildable: True
build-Depends:
streamly
, base >= 4.8 && < 5
, random
, base >= 4.8 && < 5
, random >= 1.0.0 && < 1.2
else
buildable: False