haskell-ci 0.2 → 0.2.1
raw patch · 18 files changed
+73/−34 lines, 18 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +8/−0
- fixtures/cabal.haskell-ci +15/−0
- fixtures/cabal.project.copy-fields.all.stderr +1/−1
- fixtures/cabal.project.copy-fields.all.travis.yml +3/−1
- fixtures/cabal.project.copy-fields.none.stderr +1/−1
- fixtures/cabal.project.copy-fields.none.travis.yml +3/−1
- fixtures/cabal.project.copy-fields.some.stderr +1/−1
- fixtures/cabal.project.copy-fields.some.travis.yml +3/−1
- fixtures/cabal.project.empty-line.stderr +1/−1
- fixtures/cabal.project.empty-line.travis.yml +3/−1
- fixtures/cabal.project.messy.stderr +1/−1
- fixtures/cabal.project.messy.travis.yml +3/−1
- fixtures/haskell-ci.cabal +3/−2
- fixtures/haskell-ci.cabal.stderr +1/−1
- fixtures/haskell-ci.cabal.travis.yml +8/−8
- haskell-ci.cabal +3/−2
- src/HaskellCI.hs +14/−10
- src/HaskellCI/GHC.hs +1/−1
+ CHANGELOG.md view
@@ -0,0 +1,8 @@+## 0.2.1++* `local-ghc-options` are always applied (independent of `copy-fields` value)+* Add GHC-8.6.4 to known compilers++## 0.2++* Large configuration rework
fixtures/cabal.haskell-ci view
@@ -61,6 +61,21 @@ ghc: (>= 7.8 && <7.10) || == 8.2.2 constraints: deepseq ==1.4.* +-- Copy over additional properties specified in a cabal.project file.+-- Possible values are:+-- none: Do not copy any properties from the cabal.project file.+-- some: Copy a subset of the properties from the cabal.project file. (Default)+-- The fields and sections that are copied over are:+--+-- * constraints+-- * allow-newer+-- * reorder-goals+-- * max-backjumps+-- * optimization+-- * source-repository-package+-- all: Copy every property from the cabal.project file.+copy-fields: some+ -- Include these fields "as is" in generated cabal.project raw-project keep-going: False
fixtures/cabal.project.copy-fields.all.stderr view
@@ -1,1 +1,1 @@-*INFO* Generating Travis-CI config for testing for GHC versions: 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3+*INFO* Generating Travis-CI config for testing for GHC versions: 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4
fixtures/cabal.project.copy-fields.all.travis.yml view
@@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.2+# version: 0.2.1 # language: c dist: xenial@@ -30,6 +30,8 @@ matrix: include:+ - compiler: "ghc-8.6.4"+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}} - compiler: "ghc-8.6.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}} - compiler: "ghc-8.6.2"
fixtures/cabal.project.copy-fields.none.stderr view
@@ -1,1 +1,1 @@-*INFO* Generating Travis-CI config for testing for GHC versions: 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3+*INFO* Generating Travis-CI config for testing for GHC versions: 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4
fixtures/cabal.project.copy-fields.none.travis.yml view
@@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.2+# version: 0.2.1 # language: c dist: xenial@@ -30,6 +30,8 @@ matrix: include:+ - compiler: "ghc-8.6.4"+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}} - compiler: "ghc-8.6.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}} - compiler: "ghc-8.6.2"
fixtures/cabal.project.copy-fields.some.stderr view
@@ -1,1 +1,1 @@-*INFO* Generating Travis-CI config for testing for GHC versions: 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3+*INFO* Generating Travis-CI config for testing for GHC versions: 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4
fixtures/cabal.project.copy-fields.some.travis.yml view
@@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.2+# version: 0.2.1 # language: c dist: xenial@@ -30,6 +30,8 @@ matrix: include:+ - compiler: "ghc-8.6.4"+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}} - compiler: "ghc-8.6.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}} - compiler: "ghc-8.6.2"
fixtures/cabal.project.empty-line.stderr view
@@ -1,1 +1,1 @@-*INFO* Generating Travis-CI config for testing for GHC versions: head 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3+*INFO* Generating Travis-CI config for testing for GHC versions: head 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4
fixtures/cabal.project.empty-line.travis.yml view
@@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.2+# version: 0.2.1 # language: c dist: xenial@@ -30,6 +30,8 @@ matrix: include:+ - compiler: "ghc-8.6.4"+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}} - compiler: "ghc-8.6.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}} - compiler: "ghc-8.6.2"
fixtures/cabal.project.messy.stderr view
@@ -1,1 +1,1 @@-*INFO* Generating Travis-CI config for testing for GHC versions: head 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3+*INFO* Generating Travis-CI config for testing for GHC versions: head 7.8.1 7.8.2 7.8.3 7.8.4 7.10.1 7.10.2 7.10.3 8.0.1 8.0.2 8.2.1 8.2.2 8.4.1 8.4.2 8.4.3 8.4.4 8.6.1 8.6.2 8.6.3 8.6.4
fixtures/cabal.project.messy.travis.yml view
@@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.2+# version: 0.2.1 # language: c dist: xenial@@ -30,6 +30,8 @@ matrix: include:+ - compiler: "ghc-8.6.4"+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4,fftw3-dev], sources: [hvr-ghc]}} - compiler: "ghc-8.6.3" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3,fftw3-dev], sources: [hvr-ghc]}} - compiler: "ghc-8.6.2"
fixtures/haskell-ci.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: haskell-ci-version: 0.2+version: 0.2.1 synopsis: Cabal package script generator for Travis-CI description: Script generator (@haskell-ci@) for [Travis-CI](https://travis-ci.org/) for continuous-integration testing of Haskell Cabal packages.@@ -29,8 +29,9 @@ maintainer: hvr@gnu.org category: Development build-type: Simple-tested-with: GHC ==8.6.3 || ==8.4.4 || ==8.2.2 || ==8.0.2+tested-with: GHC ==8.6.4 || ==8.4.4 || ==8.2.2 || ==8.0.2 extra-source-files:+ CHANGELOG.md fixtures/cabal.haskell-ci fixtures/cabal.project.fail-versions fixtures/cabal.project.fail-versions.stderr
fixtures/haskell-ci.cabal.stderr view
@@ -1,2 +1,2 @@-*INFO* Generating Travis-CI config for testing for GHC versions: head 8.0.2 8.2.2 8.4.4 8.6.3+*INFO* Generating Travis-CI config for testing for GHC versions: head 8.0.2 8.2.2 8.4.4 8.6.4 *INFO* Also OSX jobs for: 8.4.4
fixtures/haskell-ci.cabal.travis.yml view
@@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci #-# version: 0.2+# version: 0.2.1 # language: c dist: xenial@@ -35,8 +35,8 @@ matrix: include:- - compiler: "ghc-8.6.3"- addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}+ - compiler: "ghc-8.6.4"+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}} - compiler: "ghc-8.4.4" addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}} - compiler: "ghc-8.2.2"@@ -97,16 +97,16 @@ fi - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$' - ${CABAL} new-install -w ${HC} -j2 doctest --constraint='doctest ==0.16.*'- - if [ $HCNUMVER -eq 80603 ] ; then ${CABAL} new-install -w ${HC} -j2 hlint --constraint='hlint ==2.1.*' ; fi+ - if [ $HCNUMVER -eq 80604 ] ; then ${CABAL} new-install -w ${HC} -j2 hlint --constraint='hlint ==2.1.*' ; fi - rm -f cabal.project - touch cabal.project - "printf 'packages: \".\"\\n' >> cabal.project" - echo 'package haskell-ci' >> cabal.project - "echo ' ghc-options: -Werror' >> cabal.project"- - "printf 'write-ghc-environment-files: always\\n' >> cabal.project" - "echo 'keep-going: False' >> cabal.project" - echo 'package bytestring' >> cabal.project - "echo ' tests: False' >> cabal.project"+ - "printf 'write-ghc-environment-files: always\\n' >> cabal.project" - touch cabal.project.local - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(Cabal|haskell-ci)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true@@ -134,10 +134,10 @@ - "printf 'packages: \"haskell-ci-*/*.cabal\"\\n' >> cabal.project" - echo 'package haskell-ci' >> cabal.project - "echo ' ghc-options: -Werror' >> cabal.project"- - "printf 'write-ghc-environment-files: always\\n' >> cabal.project" - "echo 'keep-going: False' >> cabal.project" - echo 'package bytestring' >> cabal.project - "echo ' tests: False' >> cabal.project"+ - "printf 'write-ghc-environment-files: always\\n' >> cabal.project" - touch cabal.project.local - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(Cabal|haskell-ci)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true@@ -153,8 +153,8 @@ - (cd haskell-ci-* && doctest --fast -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable src) # hlint- - if [ $HCNUMVER -eq 80603 ] ; then (cd haskell-ci-* && hlint -h ${ROOTDIR}/.hlint.yaml -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable src) ; fi- - if [ $HCNUMVER -eq 80603 ] ; then (cd haskell-ci-* && hlint -h ${ROOTDIR}/.hlint.yaml cli) ; fi+ - if [ $HCNUMVER -eq 80604 ] ; then (cd haskell-ci-* && hlint -h ${ROOTDIR}/.hlint.yaml -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable src) ; fi+ - if [ $HCNUMVER -eq 80604 ] ; then (cd haskell-ci-* && hlint -h ${ROOTDIR}/.hlint.yaml cli) ; fi # cabal check - (cd haskell-ci-* && ${CABAL} check)
haskell-ci.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: haskell-ci-version: 0.2+version: 0.2.1 synopsis: Cabal package script generator for Travis-CI description: Script generator (@haskell-ci@) for [Travis-CI](https://travis-ci.org/) for continuous-integration testing of Haskell Cabal packages.@@ -29,8 +29,9 @@ maintainer: hvr@gnu.org category: Development build-type: Simple-tested-with: GHC ==8.6.3 || ==8.4.4 || ==8.2.2 || ==8.0.2+tested-with: GHC ==8.6.4 || ==8.4.4 || ==8.2.2 || ==8.0.2 extra-source-files:+ CHANGELOG.md fixtures/cabal.haskell-ci fixtures/cabal.project.fail-versions fixtures/cabal.project.fail-versions.stderr
src/HaskellCI.hs view
@@ -822,12 +822,6 @@ tellStrLns [ sh $ "echo 'allow-newer: " ++ s ++ "' >> cabal.project" ]- unless (null (cfgLocalGhcOptions config)) $ forM_ pkgs $ \Pkg{pkgName} -> do- let s = unwords $ map (show . PU.showToken) $ cfgLocalGhcOptions config- tellStrLns- [ sh $ "echo 'package " ++ pkgName ++ "' >> cabal.project"- , sh $ "echo ' ghc-options: " ++ s ++ "' >> cabal.project"- ] when (prjReorderGoals prj) $ tellStrLns@@ -849,15 +843,25 @@ tellStrLns [ sh $ "echo 'source-repository-package' >> cabal.project" ] tellStrLns [ sh $ "echo ' " ++ l ++ "' >> cabal.project" | l <- lines repo' ] - -- mandatory cabal.project setup- tellStrLns- [ sh $ "printf 'write-ghc-environment-files: always\\n' >> cabal.project"- ] + unless (null (cfgLocalGhcOptions config)) $ forM_ pkgs $ \Pkg{pkgName} -> do+ let s = unwords $ map (show . PU.showToken) $ cfgLocalGhcOptions config+ tellStrLns+ [ sh $ "echo 'package " ++ pkgName ++ "' >> cabal.project"+ , sh $ "echo ' ghc-options: " ++ s ++ "' >> cabal.project"+ ]++ -- raw-project is after local-ghc-options so we can override per package. unless (null (cfgRawProject config)) $ tellStrLns [ sh $ "echo '" ++ l ++ "' >> cabal.project" | l <- lines $ C.showFields' 2 $ cfgRawProject config , not (null l)+ ]++ -- mandatory cabal.project setup+ -- this have to be last, so configuration doesn't override it.+ tellStrLns+ [ sh $ "printf 'write-ghc-environment-files: always\\n' >> cabal.project" ] -- also write cabal.project.local file with
src/HaskellCI/GHC.hs view
@@ -16,7 +16,7 @@ , [8,0,1], [8,0,2] , [8,2,1], [8,2,2] , [8,4,1], [8,4,2], [8,4,3], [8,4,4]- , [8,6,1], [8,6,2], [8,6,3]+ , [8,6,1], [8,6,2], [8,6,3], [8,6,4] ] ghcAlpha :: Maybe Version