mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-09-17 11:37:20 +03:00
Add travis, appveyor ci files
This commit is contained in:
parent
a923ae8e72
commit
5679f93c14
81
.travis.yml
Normal file
81
.travis.yml
Normal file
@ -0,0 +1,81 @@
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
language: c
|
||||
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cabal
|
||||
- $HOME/.ghc
|
||||
- $HOME/.local
|
||||
- $HOME/.stack
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# cabal/linux
|
||||
- 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=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS=y
|
||||
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
|
||||
|
||||
- env: BUILD=cabal GHCVER=head CABALVER=head
|
||||
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
|
||||
|
||||
# stack/linux use a pre-installed cabal-install for faster builds
|
||||
- env: BUILD=stack RESOLVER=lts-9.0 CABALVER=1.22
|
||||
addons: {apt: {packages: [libgmp-dev,cabal-install-1.22], sources: [hvr-ghc]}}
|
||||
|
||||
- env: BUILD=stack RESOLVER=nightly CABALVER=2.0
|
||||
addons: {apt: {packages: [libgmp-dev,cabal-install-2.0], sources: [hvr-ghc]}}
|
||||
|
||||
# cabal/stack/osx - TODO install cabal-install
|
||||
- env: BUILD=cabal RESOLVER=lts-9.0
|
||||
os: osx
|
||||
|
||||
- env: BUILD=stack RESOLVER=lts-9.0
|
||||
os: osx
|
||||
|
||||
allow_failures:
|
||||
- env: BUILD=cabal GHCVER=head CABALVER=head
|
||||
# - env: BUILD=stack RESOLVER=nightly
|
||||
|
||||
install: true
|
||||
script:
|
||||
- |
|
||||
# Customizable options
|
||||
PACKAGE_TEST_VER="fde043d6c328090883286c69443f3ad2d73ddbb5"
|
||||
GHC_OPTIONS="-O0 -Werror"
|
||||
test -n "$COVERALLS" && \
|
||||
COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines \
|
||||
--exclude-dir=test test"
|
||||
|
||||
# Usually no changes should be needed after this
|
||||
add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
|
||||
cabal_env() { test "$BUILD" = cabal && echo $1; }
|
||||
pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
|
||||
|
||||
CURL=$(which curl)
|
||||
PATH=/bin:/usr/bin
|
||||
add_path GHCVER ghc
|
||||
add_path CABALVER cabal
|
||||
|
||||
# TRAVIS vars are needed by hpc-coveralls
|
||||
- env -i
|
||||
LC_ALL=C.UTF-8
|
||||
TRAVIS=$TRAVIS
|
||||
TRAVIS_JOB_ID=$TRAVIS_JOB_ID
|
||||
PATH=$PATH
|
||||
BUILD=$BUILD
|
||||
RESOLVER=$RESOLVER
|
||||
GHCVER=$GHCVER
|
||||
GHC_OPTIONS="$GHC_OPTIONS"
|
||||
COVERALLS_OPTIONS="$COVERALLS_OPTIONS"
|
||||
CABAL_REINIT_CONFIG=y
|
||||
TEST_INSTALL=y
|
||||
$(cabal_env CABALVER=$CABALVER)
|
||||
$(cabal_env CABAL_CHECK_RELAX=y)
|
||||
$(cabal_env CABAL_NO_SANDBOX=y)
|
||||
$(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
|
||||
/bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
|
39
appveyor.yml
Normal file
39
appveyor.yml
Normal file
@ -0,0 +1,39 @@
|
||||
# short paths == fewer problems
|
||||
|
||||
# criterion does not support 32-bit on Windows
|
||||
# TODO disable benchmarking to test on 32-bit
|
||||
platform: x64
|
||||
|
||||
clone_folder: "c:\\pkg"
|
||||
environment:
|
||||
global:
|
||||
BUILD: "stack"
|
||||
RESOLVER: "lts-9.0"
|
||||
GHC_OPTIONS: "-O0 -Werror"
|
||||
# STACK_OPTIONS: "-v"
|
||||
|
||||
STACK_ROOT: "c:\\sr"
|
||||
LOCAL_BIN: "%APPDATA%\\local\\bin"
|
||||
PATH: "%PATH%;%APPDATA%\\local\\bin"
|
||||
CABAL_REINIT_CONFIG: "y"
|
||||
TEST_INSTALL: "y"
|
||||
PACKAGE_TEST_VER: "fde043d6c328090883286c69443f3ad2d73ddbb5"
|
||||
|
||||
cache:
|
||||
- "%STACK_ROOT%" # stack root
|
||||
# ghc & msys - cache restore takes almost same time as reinstall
|
||||
# - "%LOCALAPPDATA%\\Programs\\stack"
|
||||
- "%LOCAL_BIN%"
|
||||
- "%APPDATA%\\cabal"
|
||||
- "%APPDATA%\\ghc"
|
||||
|
||||
build: off
|
||||
|
||||
before_test:
|
||||
- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
|
||||
- where stack.exe || curl -sSkL -ostack.zip http://www.stackage.org/stack/windows-x86_64 && 7z x stack.zip stack.exe && move stack.exe %LOCAL_BIN%
|
||||
- curl -sSkL -opackage-test.sh https://raw.githubusercontent.com/harendra-kumar/package-test/%PACKAGE_TEST_VER%/package-test.sh
|
||||
|
||||
test_script:
|
||||
- stack setup > nul
|
||||
- chcp 65001 && stack exec bash package-test.sh
|
@ -50,7 +50,8 @@ test-suite test
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Main.hs
|
||||
hs-source-dirs: test
|
||||
ghc-options: -O0 -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs
|
||||
ghc-options: -O0 -Wall -fwarn-identities -fwarn-incomplete-record-updates
|
||||
-fwarn-incomplete-uni-patterns -fwarn-tabs
|
||||
build-depends:
|
||||
base >= 4.7 && < 5
|
||||
, hspec >= 2.0 && < 3
|
||||
|
Loading…
Reference in New Issue
Block a user