git.iko.soy/typeable/file-embed
on master help sign in
CI update
d5cf23dMichael Snoyman
.gitignore+1
@@ -1,3 +1,4 @@
1dist
1dist
2*.swp
2*.swp
3.stack-work
3.stack-work
4+/tarballs/
.travis.yml+27−12
@@ -20,6 +20,7 @@ cache:
20 - $HOME/.ghc
20 - $HOME/.ghc
21 - $HOME/.cabal
21 - $HOME/.cabal
22 - $HOME/.stack
22 - $HOME/.stack
23+ - $TRAVIS_BUILD_DIR/.stack-work
23
24
24# The different configurations we want to test. We have BUILD=cabal which uses
25# The different configurations we want to test. We have BUILD=cabal which uses
25# cabal-install, and BUILD=stack which uses Stack. More documentation on each
26# cabal-install, and BUILD=stack which uses Stack. More documentation on each
@@ -56,9 +57,12 @@ matrix:
56 - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
57 - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
57 compiler: ": #GHC 8.0.2"
58 compiler: ": #GHC 8.0.2"
58 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
59 addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
59− - env: BUILD=cabal GHCVER=8.2.1 CABALVER=2.0
60+ - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
60− compiler: ": #GHC 8.2.1"
61+ compiler: ": #GHC 8.2.2"
61− addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.1], sources: [hvr-ghc]}}
62+ addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
63+ - env: BUILD=cabal GHCVER=8.4.3 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7
64+ compiler: ": #GHC 8.4.3"
65+ addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
62
66
63 # Build with the newest GHC and cabal-install. This is an accepted failure,
67 # Build with the newest GHC and cabal-install. This is an accepted failure,
64 # see below.
68 # see below.
@@ -92,6 +96,10 @@ matrix:
92 compiler: ": #stack 8.0.2"
96 compiler: ": #stack 8.0.2"
93 addons: {apt: {packages: [libgmp-dev]}}
97 addons: {apt: {packages: [libgmp-dev]}}
94
98
99+ - env: BUILD=stack ARGS="--resolver lts-11"
100+ compiler: ": #stack 8.2.2"
101+ addons: {apt: {packages: [libgmp-dev]}}
102+
95 # Nightly builds are allowed to fail
103 # Nightly builds are allowed to fail
96 - env: BUILD=stack ARGS="--resolver nightly"
104 - env: BUILD=stack ARGS="--resolver nightly"
97 compiler: ": #stack nightly"
105 compiler: ": #stack nightly"
@@ -123,6 +131,10 @@ matrix:
123 compiler: ": #stack 8.0.2 osx"
131 compiler: ": #stack 8.0.2 osx"
124 os: osx
132 os: osx
125
133
134+ - env: BUILD=stack ARGS="--resolver lts-11"
135+ compiler: ": #stack 8.2.2 osx"
136+ os: osx
137+
126 - env: BUILD=stack ARGS="--resolver nightly"
138 - env: BUILD=stack ARGS="--resolver nightly"
127 compiler: ": #stack nightly osx"
139 compiler: ": #stack nightly osx"
128 os: osx
140 os: osx
@@ -145,9 +157,9 @@ before_install:
145- |
157- |
146 if [ `uname` = "Darwin" ]
158 if [ `uname` = "Darwin" ]
147 then
159 then
148− travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
160+ travis_retry curl --insecure -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
149 else
161 else
150− travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
162+ travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
151 fi
163 fi
152
164
153 # Use the more reliable S3 mirror of Hackage
165 # Use the more reliable S3 mirror of Hackage
@@ -155,10 +167,6 @@ before_install:
155 echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
167 echo 'remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/' > $HOME/.cabal/config
156 echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
168 echo 'remote-repo-cache: $HOME/.cabal/packages' >> $HOME/.cabal/config
157
169
158− if [ "$CABALVER" != "1.16" ]
159− then
160− echo 'jobs: $ncpus' >> $HOME/.cabal/config
161− fi
162
170
163install:
171install:
164- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
172- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
@@ -167,13 +175,16 @@ install:
167 set -ex
175 set -ex
168 case "$BUILD" in
176 case "$BUILD" in
169 stack)
177 stack)
178+ # Build the dependencies
170 stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
179 stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
171 ;;
180 ;;
172 cabal)
181 cabal)
173 cabal --version
182 cabal --version
174 travis_retry cabal update
183 travis_retry cabal update
175
184
176− # Get the list of packages from the stack.yaml file
185+ # Get the list of packages from the stack.yaml file. Note that
186+ # this will also implicitly run hpack as necessary to generate
187+ # the .cabal files needed by cabal-install.
177 PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
188 PACKAGES=$(stack --install-ghc query locals | grep '^ *path' | sed 's@^ *path:@@')
178
189
179 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
190 cabal install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
@@ -202,9 +213,13 @@ script:
202 cd dist
213 cd dist
203 tar zxfv "$SRC_TGZ"
214 tar zxfv "$SRC_TGZ"
204 cd "$PKGVER"
215 cd "$PKGVER"
205− cabal configure --enable-tests
216+ cabal configure --enable-tests --ghc-options -O0
206 cabal build
217 cabal build
218+ if [ "$CABALVER" = "1.16" ] || [ "$CABALVER" = "1.18" ]; then
207− cabal test
219+ cabal test
220+ else
221+ cabal test --show-details=streaming --log=/dev/stdout
222+ fi
208 cd $ORIGDIR
223 cd $ORIGDIR
209 done
224 done
210 ;;
225 ;;
README.md+4
@@ -1,4 +1,8 @@
1## file-embed
1## file-embed
2
2
3+[![Build Status](https://travis-ci.org/snoyberg/file-embed.svg?branch=master)](https://travis-ci.org/snoyberg/file-embed)
4+[![Build status](https://ci.appveyor.com/api/projects/status/vlgo8uudpt374uoy/branch/master?svg=true)](https://ci.appveyor.com/project/snoyberg/file-embed/branch/master)
5+
6+
3Use Template Haskell to read a file or all the files in a directory, and turn
7Use Template Haskell to read a file or all the files in a directory, and turn
4them into (path, bytestring) pairs embedded in your haskell code.
8them into (path, bytestring) pairs embedded in your haskell code.
appveyor.ymlnew file+32
@@ -0,0 +1,32 @@
1+build: off
2+
3+before_test:
4+# http://help.appveyor.com/discussions/problems/6312-curl-command-not-found
5+- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
6+
7+- curl -sS -ostack.zip -L --insecure https://get.haskellstack.org/stable/windows-x86_64.zip
8+- 7z x stack.zip stack.exe
9+
10+clone_folder: "c:\\stack"
11+environment:
12+ global:
13+ STACK_ROOT: "c:\\sr"
14+
15+ matrix:
16+ - ARGS: ""
17+ #- ARGS: "--resolver lts-2"
18+ #- ARGS: "--resolver lts-3"
19+ - ARGS: "--resolver lts-6"
20+ - ARGS: "--resolver lts-7"
21+ - ARGS: "--resolver lts-9"
22+ - ARGS: "--resolver lts-11"
23+ #- ARGS: "--resolver nightly"
24+
25+test_script:
26+
27+# Install toolchain, but do it silently due to lots of output
28+- stack %ARGS% setup > nul
29+
30+# The ugly echo "" hack is to avoid complaints about 0 being an invalid file
31+# descriptor
32+- echo "" | stack %ARGS% --no-terminal test --pedantic