git.iko.soy/typeable/cabal2nix
on master help sign in
Update CI build instructions to include GHC 8.8.1.
commit8e04b7c059249515dd5ebd97ea719a003eae3858 authorPeter Simons <simons@cryp.to> dateSat 21 Sep 2019, 16:47 (7 years ago) parent5efdfe0
2 files changed+54−92
.travis.yml+36−27 cabal2nix.cabal+18−65
.travis.yml+36−27
@@ -4,7 +4,7 @@
44#
55# For more information, see https://github.com/haskell-CI/haskell-ci
66#
7−# version: 0.3.20190413
7+# version: 0.5.20190916
88#
99language: c
1010dist: xenial
@@ -26,17 +26,21 @@ before_cache:
2626 - rm -rfv $CABALHOME/packages/head.hackage
2727matrix:
2828 include:
29− - compiler: ghc-8.6.4
30− addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.4","cabal-install-2.4"]}}
29+ - compiler: ghc-8.8.1
30+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
31+ - compiler: ghc-8.6.5
32+ addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
3133before_install:
3234 - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
35+ - WITHCOMPILER="-w $HC"
36+ - HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
3337 - HCPKG="$HC-pkg"
3438 - unset CC
3539 - CABAL=/opt/ghc/bin/cabal
3640 - CABALHOME=$HOME/.cabal
3741 - export PATH="$CABALHOME/bin:$PATH"
3842 - TOP=$(pwd)
39− - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
43+ - "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
4044 - echo $HCNUMVER
4145 - CABAL="$CABAL -vnormal+nowrap+markoutput"
4246 - set -o pipefail
@@ -63,43 +67,47 @@ install:
6367 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
6468 - TEST=--enable-tests
6569 - BENCH=--enable-benchmarks
66− - GHCHEAD=${GHCHEAD-false}
70+ - HEADHACKAGE=false
6771 - rm -f $CABALHOME/config
6872 - |
6973 echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
7074 echo "remote-build-reporting: anonymous" >> $CABALHOME/config
75+ echo "write-ghc-environment-files: always" >> $CABALHOME/config
7176 echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
7277 echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
7378 echo "world-file: $CABALHOME/world" >> $CABALHOME/config
7479 echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
7580 echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
81+ echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
7682 echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
7783 echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
7884 echo "install-dirs user" >> $CABALHOME/config
7985 echo " prefix: $CABALHOME" >> $CABALHOME/config
8086 echo "repository hackage.haskell.org" >> $CABALHOME/config
8187 echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
88+ - |
89+ echo "program-default-options" >> $CABALHOME/config
90+ echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
8291 - cat $CABALHOME/config
8392 - rm -fv cabal.project cabal.project.local cabal.project.freeze
8493 - travis_retry ${CABAL} v2-update -v
85− - ${CABAL} v2-install -w ${HC} -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output
86− - ${CABAL} v2-install -w ${HC} -j2 hlint --constraint='hlint ==2.1.*' | color_cabal_output
94+ - (cd /tmp && ${CABAL} v2-install $WITHCOMPILER -j2 doctest --constraint='doctest ==0.16.*' | color_cabal_output)
95+ - if [ $HCNUMVER -ge 80800 ] ; then (cd /tmp && ${CABAL} v2-install $WITHCOMPILER -j2 hlint --constraint='hlint ==2.1.*' | color_cabal_output) ; fi
8796 # Generate cabal.project
8897 - rm -rf cabal.project cabal.project.local cabal.project.freeze
8998 - touch cabal.project
9099 - |
91− echo 'packages: "."' >> cabal.project
100+ echo "packages: ." >> cabal.project
92101 - |
93− echo "write-ghc-environment-files: always" >> cabal.project
94− - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(Cabal|cabal2nix)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
102+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(Cabal|cabal2nix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
95103 - cat cabal.project || true
96104 - cat cabal.project.local || true
97105 - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
98− - ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output
106+ - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
99107 - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
100108 - rm cabal.project.freeze
101− - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
102− - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
109+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
110+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
103111script:
104112 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
105113 # Packaging...
@@ -107,38 +115,39 @@ script:
107115 # Unpacking...
108116 - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
109117 - cd ${DISTDIR} || false
110− - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
118+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
119+ - find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
120+ - PKGDIR_cabal2nix="$(find . -maxdepth 1 -type d -regex '.*/cabal2nix-[0-9.]*')"
111121 # Generate cabal.project
112122 - rm -rf cabal.project cabal.project.local cabal.project.freeze
113123 - touch cabal.project
114124 - |
115− echo 'packages: "cabal2nix-*/*.cabal"' >> cabal.project
125+ echo "packages: ${PKGDIR_cabal2nix}" >> cabal.project
116126 - |
117− echo "write-ghc-environment-files: always" >> cabal.project
118− - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(Cabal|cabal2nix)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
127+ - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(Cabal|cabal2nix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
119128 - cat cabal.project || true
120129 - cat cabal.project.local || true
121130 # Building...
122131 # this builds all libraries and executables (without tests/benchmarks)
123− - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
132+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
124133 # Building with tests and benchmarks...
125134 # build & run tests, build benchmarks
126− - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
135+ - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
127136 # Testing...
128− - ${CABAL} v2-test -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
137+ - ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
129138 # Doctest...
130− - (cd cabal2nix-* && doctest -i ../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XMonadFailDesugaring src)
139+ - (cd ${PKGDIR_cabal2nix} && doctest -i ../dist-newstyle/build/*/*/cabal2nix-*/build/autogen -XMonadFailDesugaring src)
131140 # HLint..
132− - (cd cabal2nix-* && hlint -XMonadFailDesugaring src)
133− - (cd cabal2nix-* && hlint -XMonadFailDesugaring hackage2nix)
134− - (cd cabal2nix-* && hlint -XMonadFailDesugaring cabal2nix)
141+ - if [ $HCNUMVER -ge 80800 ] ; then (cd ${PKGDIR_cabal2nix} && hlint -XMonadFailDesugaring src) ; fi
142+ - if [ $HCNUMVER -ge 80800 ] ; then (cd ${PKGDIR_cabal2nix} && hlint -XMonadFailDesugaring hackage2nix) ; fi
143+ - if [ $HCNUMVER -ge 80800 ] ; then (cd ${PKGDIR_cabal2nix} && hlint -XMonadFailDesugaring cabal2nix) ; fi
135144 # cabal check...
136− - (cd cabal2nix-* && ${CABAL} -vnormal check)
145+ - (cd ${PKGDIR_cabal2nix} && ${CABAL} -vnormal check)
137146 # haddock...
138− - ${CABAL} v2-haddock -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
147+ - ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output
139148 # Building without installed constraints for packages in global-db...
140149 - rm -f cabal.project.local
141− - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
150+ - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
142151
143152# REGENDATA ["--installed=+all -Cabal","--hlint","--doctest","--doctest-options=-i ../dist-newstyle/build/*/*/cabal2nix-*/build/autogen","-o",".travis.yml","cabal2nix.cabal"]
144153# EOF
cabal2nix.cabal+18−65
@@ -8,73 +8,26 @@ description:
88 > nix-env -i cabal2nix
99license: BSD3
1010license-file: LICENSE
11−author: Peter Simons,
12− Andres Loeh,
13− Benno Fünfstück,
14− Mateusz Kowalczyk,
15− Michael Alan Dorman,
16− Tom Smalley,
17− Mathijs Kwik,
18− Shea Levy,
19− Dmitry Malikov,
20− Eric Seidel,
21− Jacob Mitchell,
22− Graham Christensen,
23− Hamish Mackenzie,
24− Nikolay Amiantov,
25− Aycan iRiCAN,
26− Bryan Gardiner,
27− Joe Hermaszewski,
28− John Wiegley,
29− Philipp Hausmann,
30− Spencer Janssen,
31− Tom Hunger,
32− William Casarin,
33− koral,
34− ksaric,
35− Adam Vogt,
36− Alexey Shmalko,
37− Corey O'Connor,
38− Cray Elliott,
39− David Johnson,
40− Dmitry Bushev,
41− Domen Kožar,
42− Felix Kunzmann,
43− Gabriel Ebner,
44− Gergely Risko,
45− Joachim Fasting,
46− John Albietz,
47− John Chee,
48− Jussi Maki,
49− Lisanna Dettwyler,
50− Mark Laws,
51− Mark Wotton,
52− Matthew Pickering,
53− Matthew Stewart,
54− Matvey Aksenov,
55− Nicholas Clarke,
56− Nicolas Rolland,
57− Oliver Charles,
58− Pascal Wittmann,
59− Patrick John Wheeler,
60− Phil de Joux,
61− Piotr Bogdan,
62− Profpatsch,
63− Raymond Gauthier,
64− Renzo Carbonara,
65− Rodney Lorrimar,
66− Sibi,
67− Sukant Hajra,
68− Tanner Doshier,
69− Vaibhav Sagar,
70− Viktar Basharymau,
71− danbst,
72− karsten gebbert,
73− laMudri,
74− Александр Цамутали
11+author: Peter Simons, Andres Loeh, Benno Fünfstück, Mateusz Kowalczyk,
12+ Michael Alan Dorman, Tom Smalley, Mathijs Kwik, Shea Levy, Dmitry
13+ Malikov, Eric Seidel, Jacob Mitchell, Graham Christensen,
14+ Hamish Mackenzie, Nikolay Amiantov, Aycan iRiCAN, Bryan
15+ Gardiner, Joe Hermaszewski, John Wiegley, Philipp Hausmann,
16+ Spencer Janssen, Tom Hunger, William Casarin, koral,
17+ ksaric, Adam Vogt, Alexey Shmalko, Corey O'Connor, Cray
18+ Elliott, David Johnson, Dmitry Bushev, Domen Kožar, Felix
19+ Kunzmann, Gabriel Ebner, Gergely Risko, Joachim Fasting,
20+ John Albietz, John Chee, Jussi Maki, Lisanna Dettwyler,
21+ Mark Laws, Mark Wotton, Matthew Pickering, Matthew Stewart,
22+ Matvey Aksenov, Nicholas Clarke, Nicolas Rolland, Oliver
23+ Charles, Pascal Wittmann, Patrick John Wheeler, Phil de
24+ Joux, Piotr Bogdan, Profpatsch, Raymond Gauthier, Renzo
25+ Carbonara, Rodney Lorrimar, Sibi, Sukant Hajra, Tanner
26+ Doshier, Vaibhav Sagar, Viktar Basharymau, danbst, karsten
27+ gebbert, laMudri, Александр Цамутали
7528maintainer: Peter Simons <simons@cryp.to>
7629stability: stable
77−tested-with: GHC == 8.6.4
30+tested-with: GHC == 8.6.5, GHC == 8.8.1
7831category: Distribution, Nix
7932homepage: https://github.com/nixos/cabal2nix#readme
8033bug-reports: https://github.com/nixos/cabal2nix/issues