on master help sign in
Add travis, appveyor ci files
commit5679f93c14847f78ba2fd562bdbaabde2c33c481 authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 30 Aug 2017, 15:16 (9 years ago) parenta923ae8
3 files changed+122−1
.travis.yml+81 appveyor.yml+39 asyncly.cabal+2−1
.travis.ymlnew file+81
@@ -0,0 +1,81 @@
1+notifications:
2+ email: false
3+
4+language: c
5+
6+sudo: false
7+cache:
8+ directories:
9+ - $HOME/.cabal
10+ - $HOME/.ghc
11+ - $HOME/.local
12+ - $HOME/.stack
13+
14+matrix:
15+ include:
16+ # cabal/linux
17+ - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
18+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
19+
20+ - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS=y
21+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
22+
23+ - env: BUILD=cabal GHCVER=head CABALVER=head
24+ addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
25+
26+ # stack/linux use a pre-installed cabal-install for faster builds
27+ - env: BUILD=stack RESOLVER=lts-9.0 CABALVER=1.22
28+ addons: {apt: {packages: [libgmp-dev,cabal-install-1.22], sources: [hvr-ghc]}}
29+
30+ - env: BUILD=stack RESOLVER=nightly CABALVER=2.0
31+ addons: {apt: {packages: [libgmp-dev,cabal-install-2.0], sources: [hvr-ghc]}}
32+
33+ # cabal/stack/osx - TODO install cabal-install
34+ - env: BUILD=cabal RESOLVER=lts-9.0
35+ os: osx
36+
37+ - env: BUILD=stack RESOLVER=lts-9.0
38+ os: osx
39+
40+ allow_failures:
41+ - env: BUILD=cabal GHCVER=head CABALVER=head
42+# - env: BUILD=stack RESOLVER=nightly
43+
44+install: true
45+script:
46+ - |
47+ # Customizable options
48+ PACKAGE_TEST_VER="fde043d6c328090883286c69443f3ad2d73ddbb5"
49+ GHC_OPTIONS="-O0 -Werror"
50+ test -n "$COVERALLS" && \
51+ COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines \
52+ --exclude-dir=test test"
53+
54+ # Usually no changes should be needed after this
55+ add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
56+ cabal_env() { test "$BUILD" = cabal && echo $1; }
57+ pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
58+
59+ CURL=$(which curl)
60+ PATH=/bin:/usr/bin
61+ add_path GHCVER ghc
62+ add_path CABALVER cabal
63+
64+ # TRAVIS vars are needed by hpc-coveralls
65+ - env -i
66+ LC_ALL=C.UTF-8
67+ TRAVIS=$TRAVIS
68+ TRAVIS_JOB_ID=$TRAVIS_JOB_ID
69+ PATH=$PATH
70+ BUILD=$BUILD
71+ RESOLVER=$RESOLVER
72+ GHCVER=$GHCVER
73+ GHC_OPTIONS="$GHC_OPTIONS"
74+ COVERALLS_OPTIONS="$COVERALLS_OPTIONS"
75+ CABAL_REINIT_CONFIG=y
76+ TEST_INSTALL=y
77+ $(cabal_env CABALVER=$CABALVER)
78+ $(cabal_env CABAL_CHECK_RELAX=y)
79+ $(cabal_env CABAL_NO_SANDBOX=y)
80+ $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
81+ /bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
appveyor.ymlnew file+39
@@ -0,0 +1,39 @@
1+# short paths == fewer problems
2+
3+# criterion does not support 32-bit on Windows
4+# TODO disable benchmarking to test on 32-bit
5+platform: x64
6+
7+clone_folder: "c:\\pkg"
8+environment:
9+ global:
10+ BUILD: "stack"
11+ RESOLVER: "lts-9.0"
12+ GHC_OPTIONS: "-O0 -Werror"
13+# STACK_OPTIONS: "-v"
14+
15+ STACK_ROOT: "c:\\sr"
16+ LOCAL_BIN: "%APPDATA%\\local\\bin"
17+ PATH: "%PATH%;%APPDATA%\\local\\bin"
18+ CABAL_REINIT_CONFIG: "y"
19+ TEST_INSTALL: "y"
20+ PACKAGE_TEST_VER: "fde043d6c328090883286c69443f3ad2d73ddbb5"
21+
22+cache:
23+ - "%STACK_ROOT%" # stack root
24+ # ghc & msys - cache restore takes almost same time as reinstall
25+ # - "%LOCALAPPDATA%\\Programs\\stack"
26+ - "%LOCAL_BIN%"
27+ - "%APPDATA%\\cabal"
28+ - "%APPDATA%\\ghc"
29+
30+build: off
31+
32+before_test:
33+- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
34+- 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%
35+- curl -sSkL -opackage-test.sh https://raw.githubusercontent.com/harendra-kumar/package-test/%PACKAGE_TEST_VER%/package-test.sh
36+
37+test_script:
38+- stack setup > nul
39+- chcp 65001 && stack exec bash package-test.sh
asyncly.cabal+2−1
@@ -50,7 +50,8 @@ test-suite test
5050 type: exitcode-stdio-1.0
5151 main-is: Main.hs
5252 hs-source-dirs: test
53− ghc-options: -O0 -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs
53+ ghc-options: -O0 -Wall -fwarn-identities -fwarn-incomplete-record-updates
54+ -fwarn-incomplete-uni-patterns -fwarn-tabs
5455 build-depends:
5556 base >= 4.7 && < 5
5657 , hspec >= 2.0 && < 3