on master help sign in
Update the ci configs
1f42a8dHarendra Kumar
.travis.yml+86−62
@@ -1,13 +1,49 @@
1−notifications:
1+# See https://github.com/harendra-kumar/packcheck for all options and their
2− email: false
2+# explanation.
3−
4env:
3env:
5 global:
4 global:
5+ # ------------------------------------------------------------------------
6+ # Global options used for all CI tests
7+ # ------------------------------------------------------------------------
6− - GHC_OPTIONS="-O0 -Werror"
8+ - GHC_OPTIONS="-Werror"
7− - PACKCHECK="./packcheck.sh"
9+ # ------------------------------------------------------------------------
8− # The commit id of packcheck.sh to use from harendra-kumar/packcheck on github
10+ # Options for builds that need stack
9− - PACKCHECK_COMMIT="c028c2425a372487e74157569d0a6cd4d745575d"
11+ # ------------------------------------------------------------------------
12+ #- STACKVER="1.6.5"
13+ - STACK_UPGRADE="y"
14+ # ------------------------------------------------------------------------
15+ # Other options: Normally you would not need to customize these
16+ # ------------------------------------------------------------------------
17+ - CABAL_REINIT_CONFIG=y
18+ - CABAL_CHECK_RELAX=y
19+ - CABAL_NO_SANDBOX=y
20+ - CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com
21+ - TEST_INSTALL=y
22+ - PATH=/bin:/usr/bin
23+ - LC_ALL=C.UTF-8
24+ # ------------------------------------------------------------------------
25+ # Location of packcheck.sh (the shell script invoked to perform CI tests ).
26+ # ------------------------------------------------------------------------
27+ # You can either commit the packcheck.sh script at this path in your repo or
28+ # you can use it by specifying the PACKCHECK_REPO_URL option below in which
29+ # case it will be automatically copied from the packcheck repo to this path
30+ # during CI tests. In any case it is finally invoked from this path.
31+ - PACKCHECK_LOCAL_PATH="./packcheck.sh"
32+ # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
33+ # then it is automatically pulled from this URL.
34+ - PACKCHECK_GITHUB_URL="https://raw.githubusercontent.com/harendra-kumar/packcheck"
35+ - PACKCHECK_GITHUB_COMMIT="da9d6da3d18d6250c06617817f0879324c75c224"
36+
37+notifications:
38+ email: false
10
39
40+# This matrix has total 11 builds enabled, 4 builds each (3 last major compiler
41+# versions and head) for stack and cabal, 2 OSX builds (stack and cabal for
42+# latest compiler version), and one hlint build. You may want to comment out
43+# some of the builds to be lighter on the CI infrastructure.
44+#
45+# We pre-install the cabal-install package to not incur the penalty of building
46+# it the first time in cached builds or every time in uncached builds.
11matrix:
47matrix:
12 include:
48 include:
13
49
@@ -15,59 +51,66 @@ matrix:
15 # (Linux) stack builds
51 # (Linux) stack builds
16 # --------------------------------------------------------------------------
52 # --------------------------------------------------------------------------
17
53
18− # GHC 7.10.3
19− - env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
54+ - env: BUILD=stack CABALVER=1.22 GHCVER=7.10.3 RESOLVER=lts-6 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
20− addons: {apt: {packages: [libsdl1.2-dev]}}
55+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,libsdl1.2-dev], sources: [hvr-ghc]}}
21
56
22− # GHC 8.0.2
23− - env: BUILD=stack RESOLVER=lts-9.20 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
57+ - env: BUILD=stack CABALVER=1.24 GHCVER=8.0.2 RESOLVER=lts-9 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
24− addons: {apt: {packages: [libsdl1.2-dev]}}
58+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
25
59
26− # GHC 8.2.2
27− - env: BUILD=stack RESOLVER=lts-10.0 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
60+ - env: BUILD=stack CABALVER=2.0 GHCVER=8.2.2 RESOLVER=lts-10 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
28− addons: {apt: {packages: [libsdl1.2-dev]}}
61+ addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,libsdl1.2-dev], sources: [hvr-ghc]}}
29
62
30 # Nightly
63 # Nightly
31 - env: BUILD=stack RESOLVER=nightly
64 - env: BUILD=stack RESOLVER=nightly
32
65
66+ # Using a custom stack-yaml config file.
67+ #- env: BUILD=stack STACK_YAML=.ci/stack-8.0.yaml
68+
69+ # You can customize a stack build even without a custom stack-yaml
70+ # using STACK_OPTIONS, STACK_BUILD_OPTIONS, GHC_OPTIONS etc.
71+ #- env: BUILD=stack RESOLVER=lts-10.0 STACK_BUILD_OPTIONS="--flag packcheck:dev"
72+
33 # --------------------------------------------------------------------------
73 # --------------------------------------------------------------------------
34 # (Linux) cabal builds require pre-installed cabal-install and ghc
74 # (Linux) cabal builds require pre-installed cabal-install and ghc
35 # --------------------------------------------------------------------------
75 # --------------------------------------------------------------------------
36
76
37− - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
77+ #- env: BUILD=cabal CABALVER=1.22 GHCVER=7.10.3
38− addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
78+ # addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
39
79
40− - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24
80+ - env: BUILD=cabal CABALVER=1.24 GHCVER=8.0.2
41 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
81 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
42
82
43− - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0
83+ #- env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2
84+ # addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
85+
86+ - env: BUILD=cabal CABALVER=head GHCVER=head
44− addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
87+ addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
45
88
46 # --------------------------------------------------------------------------
89 # --------------------------------------------------------------------------
47 # OS X builds
90 # OS X builds
48 # --------------------------------------------------------------------------
91 # --------------------------------------------------------------------------
49
92
50 # GHC 8.2.2/cabal build via stack
93 # GHC 8.2.2/cabal build via stack
51− - env: BUILD=cabal RESOLVER=lts-10.0
94+ #- env: BUILD=cabal RESOLVER=lts-10
52− os: osx
95+ # os: osx
53
96
54 # GHC 8.2.2/stack
97 # GHC 8.2.2/stack
55− - env: BUILD=stack RESOLVER=lts-10.0
98+ - env: BUILD=stack RESOLVER=lts-10
56 os: osx
99 os: osx
57
100
58 # --------------------------------------------------------------------------
101 # --------------------------------------------------------------------------
59 # Lint
102 # Lint
60 # --------------------------------------------------------------------------
103 # --------------------------------------------------------------------------
61
104
62− - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
105+ - env: BUILD=stack RESOLVER=lts-10 HLINT_COMMANDS="hlint lint ."
63
106
64 # --------------------------------------------------------------------------
107 # --------------------------------------------------------------------------
65 # Build and send coverage report to coveralls.io using hpc-coveralls
108 # Build and send coverage report to coveralls.io using hpc-coveralls
66 # --------------------------------------------------------------------------
109 # --------------------------------------------------------------------------
67
110
68 # Note COVERALLS (hpc-coveralls) works only with cabal build.
111 # Note COVERALLS (hpc-coveralls) works only with cabal build.
69− # For this to succeed you have to add your porject to coveralls.io first
112+ # For this to succeed you have to add your project to coveralls.io first
70− - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
113+ - env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
71 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
114 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
72
115
73 # --------------------------------------------------------------------------
116 # --------------------------------------------------------------------------
@@ -76,12 +119,14 @@ matrix:
76
119
77 allow_failures:
120 allow_failures:
78 - env: BUILD=stack RESOLVER=nightly
121 - env: BUILD=stack RESOLVER=nightly
122+ - env: BUILD=cabal CABALVER=head GHCVER=head
79− - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
123+ - env: BUILD=stack RESOLVER=lts-10 HLINT_COMMANDS="hlint lint ."
80
124
81# ------------------------------------------------------------------------
125# ------------------------------------------------------------------------
82# Settings beyond this point are advanced and normally not tweaked
126# Settings beyond this point are advanced and normally not tweaked
83# ------------------------------------------------------------------------
127# ------------------------------------------------------------------------
84
128
129+language: generic
85sudo: false
130sudo: false
86cache:
131cache:
87 directories:
132 directories:
@@ -89,12 +134,10 @@ cache:
89 - $HOME/.ghc
134 - $HOME/.ghc
90 - $HOME/.local
135 - $HOME/.local
91 - $HOME/.stack
136 - $HOME/.stack
137+install: true
92
138
93script:
139script:
94 - |
140 - |
95− # Where to find the packcheck.sh script
96− PACKCHECK_URL=https://raw.githubusercontent.com/harendra-kumar/packcheck/${PACKCHECK_COMMIT}/packcheck.sh
97−
98 # When GHCVER or CABALVER env variables are specified, modify the path to
141 # When GHCVER or CABALVER env variables are specified, modify the path to
99 # find the binaries installed from hvr-ghc repo
142 # find the binaries installed from hvr-ghc repo
100 add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
143 add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
@@ -102,38 +145,19 @@ script:
102 # Emit the value of the var specified as arg only when the build is cabal
145 # Emit the value of the var specified as arg only when the build is cabal
103 cabal_env() { test "$BUILD" = cabal && echo $1; }
146 cabal_env() { test "$BUILD" = cabal && echo $1; }
104
147
148+ # If a custom stack-yaml is specified, replace the default with that
149+ if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
150+ unset STACK_YAML
151+
152+ # Get packcheck if needed
105 CURL=$(which curl)
153 CURL=$(which curl)
106− PATH=/bin:/usr/bin
154+ PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
155+ if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
156+ chmod +x $PACKCHECK_LOCAL_PATH
157+
107 add_path GHCVER ghc
158 add_path GHCVER ghc
108 add_path CABALVER cabal
159 add_path CABALVER cabal
109
160
110− # If a custom stack-yaml is specified, replace the default with that
161+ # In addition to PACKCHECK envvars hpc-coveralls needs TRAVIS,
111− if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
162+ # TRAVIS_JOB_ID variables set by the travis CI environment.
112− if test ! -e "$PACKCHECK"; then $CURL -sL -o "$PACKCHECK" $PACKCHECK_URL; fi;
113− chmod +x $PACKCHECK
114−
115− # We start with a clean environment (env -i) and specify all the
116− # environment variables explicitly. TRAVIS vars are needed by
117− # hpc-coveralls.
118− - env -i
119− LC_ALL=C.UTF-8
120− TRAVIS=$TRAVIS
121− TRAVIS_JOB_ID=$TRAVIS_JOB_ID
122− PATH="$PATH"
123− RESOLVER=$RESOLVER
124− STACK_UPGRADE=y
125− STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
126− GHCVER=$GHCVER
127− GHC_OPTIONS="$GHC_OPTIONS"
128− COVERALLS_OPTIONS="$COVERALLS_OPTIONS"
129− CABAL_REINIT_CONFIG=y
130− TEST_INSTALL=y
131− $(cabal_env CABALVER=$CABALVER)
132− $(cabal_env CABAL_CHECK_RELAX=y)
133− $(cabal_env CABAL_NO_SANDBOX=y)
134− $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
135− HLINT_OPTIONS="$HLINT_OPTIONS"
136− bash -c "$PACKCHECK $BUILD"
163+ - bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
137−
138−install: true
139−language: c
appveyor.yml+34−13
@@ -1,20 +1,41 @@
1+# See https://github.com/harendra-kumar/packcheck for all options and their
2+# explanation.
1environment:
3environment:
2 global:
4 global:
5+ # ------------------------------------------------------------------------
6+ # Global options used for all CI tests
7+ # ------------------------------------------------------------------------
8+ GHC_OPTIONS: "-Werror"
9+ # ------------------------------------------------------------------------
10+ # Options for builds that need stack
11+ # ------------------------------------------------------------------------
12+ #STACKVER: "1.6.5"
13+ STACK_UPGRADE: "y"
3 RESOLVER: "lts-10.0"
14 RESOLVER: "lts-10.0"
4− GHC_OPTIONS: "-O0 -Werror"
5− PACKCHECK: ./packcheck.sh
6− # The commit id of packcheck.sh to use from harendra-kumar/packcheck on github
7− PACKCHECK_COMMIT: "c028c2425a372487e74157569d0a6cd4d745575d"
8−
9 # ------------------------------------------------------------------------
15 # ------------------------------------------------------------------------
10− # Normally you do not need to customize hereafter
16+ # Normally you would not need to customize these params
11 # ------------------------------------------------------------------------
17 # ------------------------------------------------------------------------
12−
13− STACK_ROOT: "c:\\sr"
14− LOCAL_BIN: "%APPDATA%\\local\\bin"
15− PATH: "%PATH%;%APPDATA%\\local\\bin"
16 CABAL_REINIT_CONFIG: "y"
18 CABAL_REINIT_CONFIG: "y"
19+ CABAL_CHECK_RELAX: "y"
20+ CABAL_NO_SANDBOX: "y"
21+ CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
17 TEST_INSTALL: "y"
22 TEST_INSTALL: "y"
23+ LC_ALL: "C.UTF-8"
24+ PATH: "%PATH%;%APPDATA%\\local\\bin"
25+ STACK_ROOT: "c:\\sr"
26+ LOCAL_BIN: "%APPDATA%\\local\\bin"
27+ # ------------------------------------------------------------------------
28+ # Location of packcheck.sh (the shell script invoked to perform CI tests ).
29+ # ------------------------------------------------------------------------
30+ # You can either commit the packcheck.sh script at this path in your repo or
31+ # you can use it by specifying the PACKCHECK_REPO_URL option below in which
32+ # case it will be automatically copied from the packcheck repo to this path
33+ # during CI tests. In any case it is finally invoked from this path.
34+ PACKCHECK_LOCAL_PATH: "./packcheck.sh"
35+ # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
36+ # then it is automatically pulled from this URL.
37+ PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
38+ PACKCHECK_GITHUB_COMMIT: "da9d6da3d18d6250c06617817f0879324c75c224"
18
39
19cache:
40cache:
20 - "%STACK_ROOT%"
41 - "%STACK_ROOT%"
@@ -27,12 +48,12 @@ clone_folder: "c:\\pkg"
27build: off
48build: off
28
49
29before_test:
50before_test:
30−- if not exist %PACKCHECK% curl -sSkL -o%PACKCHECK% https://raw.githubusercontent.com/harendra-kumar/packcheck/%PACKCHECK_COMMIT%/packcheck.sh
51+- if not exist %PACKCHECK_LOCAL_PATH% curl -sSkL -o%PACKCHECK_LOCAL_PATH% %PACKCHECK_GITHUB_URL%/%PACKCHECK_GITHUB_COMMIT%/packcheck.sh
31- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
52- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
32- 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%
53- 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%
33−- stack upgrade
54+#- stack upgrade --binary-only --binary-version %STACKVER%
34- stack --version
55- stack --version
35
56
36test_script:
57test_script:
37- stack setup > nul
58- stack setup > nul
38−- chcp 65001 && stack exec bash -- -c "chmod +x %PACKCHECK%; %PACKCHECK% stack"
59+- chcp 65001 && stack exec bash -- -c "chmod +x %PACKCHECK_LOCAL_PATH%; %PACKCHECK_LOCAL_PATH% stack"