summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhenrytill <>2017-08-12 18:52:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-08-12 18:52:00 (GMT)
commite0b88fa7bd89532423df56473ec219cd7b3f5007 (patch)
treef00154c079bc291a76ace3b2f9e10514eb6f47f5
parentc3d4c9b1cb79f848790b2a552b152b4033e01ad8 (diff)
version 0.2.0.1HEAD0.2.0.1master
-rw-r--r--.travis.yml123
-rw-r--r--ChangeLog.md14
-rw-r--r--README.md3
-rw-r--r--dwergaz.cabal8
4 files changed, 87 insertions, 61 deletions
diff --git a/.travis.yml b/.travis.yml
index 89713f8..f8641b7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,82 +1,95 @@
-# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
+# This Travis job script has been generated by a script via
+#
+# make_travis_yml_2.hs 'dwergaz.cabal'
+#
+# For more information, see https://github.com/hvr/multi-ghc-travis
+#
language: c
sudo: false
+git:
+ submodules: false # whether to recursively clone submodules
+
cache:
directories:
- - $HOME/.cabsnap
- $HOME/.cabal/packages
+ - $HOME/.cabal/store
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
+ # remove files that are regenerated by 'cabal update'
+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
+ - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
matrix:
include:
- - env: CABALVER=1.22 GHCVER=7.10.2
- compiler: ": #GHC 7.10.2"
- addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}
- - env: CABALVER=1.22 GHCVER=7.10.3
- compiler: ": #GHC 7.10.3"
- addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
- - env: CABALVER=1.24 GHCVER=8.0.1
- compiler: ": #GHC 8.0.1"
- addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
+ - compiler: "ghc-7.10.3"
+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
+ - compiler: "ghc-8.0.2"
+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
+ - compiler: "ghc-8.2.1"
+ # env: TEST=--disable-tests BENCH=--disable-benchmarks
+ addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.1], sources: [hvr-ghc]}}
before_install:
+ - HC=${CC}
+ - HCPKG=${HC/ghc/ghc-pkg}
- unset CC
- - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
+ - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
+ - PKGNAME='dwergaz'
install:
- cabal --version
- - echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- - if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
- then
- zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
- $HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
- fi
+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
+ - BENCH=${BENCH---enable-benchmarks}
+ - TEST=${TEST---enable-tests}
+ - HADDOCK=${HADDOCK-true}
+ - INSTALLED=${INSTALLED-true}
- travis_retry cabal update -v
- - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
- - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
- - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
-
-# check whether current requested install-plan matches cached package-db snapshot
- - if diff -u $HOME/.cabsnap/installplan.txt installplan.txt;
- then
- echo "cabal build-cache HIT";
- rm -rfv .ghc;
- cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
- cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
- else
- echo "cabal build-cache MISS";
- rm -rf $HOME/.cabsnap;
- mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
- cabal install --only-dependencies --enable-tests --enable-benchmarks;
- fi
-
-# snapshot package-db on cache miss
- - if [ ! -d $HOME/.cabsnap ];
- then
- echo "snapshotting package-db to build-cache";
- mkdir $HOME/.cabsnap;
- cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
- cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
- fi
+ - sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
+ - rm -fv cabal.project.local
+ - "echo 'packages: .' > cabal.project"
+ - rm -f cabal.project.freeze
+ - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
# Here starts the actual work to be performed for the package under test;
# any command which exits with a non-zero exit code causes the build to fail.
script:
- if [ -f configure.ac ]; then autoreconf -i; fi
- - cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
- - cabal build # this builds all libraries and executables (including tests/benchmarks)
- - cabal test
- - cabal check
- - cabal sdist # tests that a source-distribution can be generated
+ - rm -rf .ghc.environment.* dist/
+ - cabal sdist # test that a source-distribution can be generated
+ - cd dist/
+ - SRCTAR=(${PKGNAME}-*.tar.gz)
+ - SRC_BASENAME="${SRCTAR/%.tar.gz}"
+ - tar -xvf "./$SRC_BASENAME.tar.gz"
+ - cd "$SRC_BASENAME/"
+## from here on, CWD is inside the extracted source-tarball
+ - rm -fv cabal.project.local
+ - "echo 'packages: .' > cabal.project"
+ # this builds all libraries and executables (without tests/benchmarks)
+ - rm -f cabal.project.freeze
+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
+ # this builds all libraries and executables (including tests/benchmarks)
+ # - rm -rf ./dist-newstyle
+
+ # Build with installed constraints for packages in global-db
+ - if $INSTALLED; then
+ echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh;
+ else echo "Not building with installed constraints"; fi
+
+ # build & run tests, build benchmarks
+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all
+ - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
-# Check that the resulting source distribution can be built & installed.
-# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
-# `cabal install --force-reinstalls dist/*-*.tar.gz`
- - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
- (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
+ # haddock
+ - rm -rf ./dist-newstyle
+ - if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
+# REGENDATA ["dwergaz.cabal"]
# EOF
diff --git a/ChangeLog.md b/ChangeLog.md
index d38124e..b1fb4db 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,17 @@
# Revision history for dwergaz
-## 0.1.0.0 -- YYYY-mm-dd
+## 0.1.0.0 -- 2017-04-03
* First version. Released on an unsuspecting world.
+
+## 0.1.0.1 -- 2017-04-09
+
+* Updated a bunch of administrivia.
+
+## 0.2.0.0 -- 2017-04-09
+
+* Renamed `Dwergaz` module to `Test.Dwergaz`.
+
+## 0.2.0.1 -- 2017-08-12
+
+* Loosened constraints on `base` for compatibility with GHC 8.2.1.
diff --git a/README.md b/README.md
index 324d514..6b326fc 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
# dwergaz
[![Build Status](https://travis-ci.org/xngns/dwergaz.svg?branch=master)](https://travis-ci.org/xngns/dwergaz)
+[![Hackage](https://img.shields.io/hackage/v/dwergaz.svg)](http://hackage.haskell.org/package/dwergaz)
`dwergaz` is a minimal testing library with no external dependencies.
-See the [tests](tests/Main.hs) for a usage example.
+See the [tests](https://github.com/xngns/dwergaz/blob/master/tests/Main.hs) for a usage example.
diff --git a/dwergaz.cabal b/dwergaz.cabal
index 53e8693..237b12f 100644
--- a/dwergaz.cabal
+++ b/dwergaz.cabal
@@ -2,7 +2,7 @@
-- documentation, see http://haskell.org/cabal/users-guide/
name: dwergaz
-version: 0.2.0.0
+version: 0.2.0.1
synopsis: A minimal testing library
description: A minimal testing library
license: BSD3
@@ -14,7 +14,7 @@ copyright: Copyright (c) 2017, Henry Till
category: Testing
build-type: Simple
cabal-version: >=1.10
-tested-with: GHC == 7.10.2, GHC == 7.10.3, GHC == 8.0.1
+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.1
extra-source-files:
.gitignore
@@ -30,7 +30,7 @@ library
exposed-modules: Test.Dwergaz
-- other-modules:
-- other-extensions:
- build-depends: base >=4.8 && <4.10
+ build-depends: base >=4.8 && <4.11
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -Wall
@@ -38,7 +38,7 @@ library
test-suite tests
type: exitcode-stdio-1.0
main-is: Main.hs
- build-depends: base >=4.8 && <4.10
+ build-depends: base >=4.8 && <4.11
, dwergaz
hs-source-dirs: tests
default-language: Haskell2010