File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 18
18
directories :
19
19
- $HOME/.cabal/packages
20
20
- $HOME/.cabal/store
21
+ - $HOME/.local/bin
21
22
22
23
before_cache :
23
24
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
@@ -46,7 +47,7 @@ matrix:
46
47
before_install :
47
48
- HC=${CC}
48
49
- unset CC
49
- - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
50
+ - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/.local/bin:$ PATH
50
51
- PKGNAME='servant-swagger'
51
52
52
53
install :
@@ -56,6 +57,7 @@ install:
56
57
- TEST=${TEST---enable-tests}
57
58
- travis_retry cabal update -v
58
59
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
60
+ - sh install-hspec-discover.sh # TEMP: we should use build-tools-depends
59
61
- rm -fv cabal.project.local
60
62
- " echo 'packages: .' > cabal.project"
61
63
- rm -f cabal.project.freeze
@@ -82,8 +84,11 @@ script:
82
84
# this builds all libraries and executables (including tests/benchmarks)
83
85
# - rm -rf ./dist-newstyle
84
86
85
- # build & run tests
87
+ # build & run tests, build benchmarks
86
88
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
87
89
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
88
90
91
+ # haddock
92
+ - cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all
93
+
89
94
# EOF
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -ex
4
+
5
+ if [ ! -e $HOME /.local/bin/hspec-discover ]; then
6
+ # Fetch the source
7
+ cabal get hspec-discover-2.4.4
8
+ cd hspec-discover-2.4.4
9
+
10
+ # Set-up project
11
+ echo ' packages: .' > cabal.project
12
+
13
+ # build exe
14
+ cabal new-build hspec-discover:exe:hspec-discover
15
+
16
+ # copy executable to $HOME/.local/bin
17
+ mkdir -p $HOME /.local/bin
18
+ cp $( find dist-newstyle -name hspec-discover -type f) $HOME /.local/bin
19
+ fi
You can’t perform that action at this time.
0 commit comments