From a439a953ab7b84b77e89bd434e6157c0c74a970a Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Mon, 7 Nov 2016 10:12:12 +0100 Subject: [PATCH 1/6] [add] travis-ci test suite configuration --- .travis.yml | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e8bf53de0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,85 @@ +# This file has been generated -- see https://github.com/hvr/multi-ghc-travis +language: c +sudo: false + +cache: + directories: + - $HOME/.cabsnap + - $HOME/.cabal/packages + +before_cache: + - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log + - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar + +matrix: + include: + - env: CABALVER=1.16 GHCVER=7.6.3 + compiler: ": #GHC 7.6.3" + addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}} + - env: CABALVER=1.18 GHCVER=7.8.4 + compiler: ": #GHC 7.8.4" + addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], 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]}} + +before_install: + - unset CC + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH + +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 + - 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 installplan.txt $HOME/.cabsnap/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 + +# 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 + +# 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") + +# EOF From 221f0b718fa33a7166d75603cc94b17b9a8234d9 Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Mon, 7 Nov 2016 10:38:45 +0100 Subject: [PATCH 2/6] [add] Setup.hs for cabal check --- Setup.hs | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Setup.hs diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain From d55f8f0c607d9bda76a6e161e35380b115bb5f89 Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Mon, 7 Nov 2016 10:41:10 +0100 Subject: [PATCH 3/6] [add] source-repository, tested-with, make cabal check happy --- tidal.cabal | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tidal.cabal b/tidal.cabal index 83434f5df..a53250669 100644 --- a/tidal.cabal +++ b/tidal.cabal @@ -11,7 +11,8 @@ Stability: Experimental Copyright: (c) Alex McLean and other contributors, 2016 category: Sound build-type: Simple -cabal-version: >=1.4 +cabal-version: >=1.6 +tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 Extra-source-files: README.md tidal.el doc/tidal.md @@ -33,3 +34,7 @@ library Sound.Tidal.Transition Build-depends: base < 5, process, parsec, hosc > 0.13, hashable, colour, containers, time, websockets > 0.8, text, mtl >=2.1, transformers, mersenne-random-pure64, binary, bytestring, hmt +source-repository head + type: git + location: https://github.com/tidalcycles/Tidal + From d9ac46b399c497973a3fbcef5af49b4e6789e72d Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Sat, 19 Nov 2016 13:00:36 +0100 Subject: [PATCH 4/6] [add] travis-ci build status [ci skip] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a9844533f..5d23373da 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Tidal +Tidal [![Build Status](https://travis-ci.org/tidalcycles/Tidal.svg?branch=master)](https://travis-ci.org/tidalcycles/Tidal) ===== Language for live coding of pattern From fe0877bf511e0be0dfeba7edcd1948c85cd7b954 Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Mon, 5 Dec 2016 17:54:08 +0100 Subject: [PATCH 5/6] [++] cabal >= 1.18 in build matrix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e8bf53de0..f3cf78c8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ before_cache: matrix: include: - - env: CABALVER=1.16 GHCVER=7.6.3 + - env: CABALVER=1.18 GHCVER=7.6.3 compiler: ": #GHC 7.6.3" addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}} - env: CABALVER=1.18 GHCVER=7.8.4 From 700df2075d00bb78a86dae262dae3ed68caeca1f Mon Sep 17 00:00:00 2001 From: Lennart Melzer Date: Mon, 5 Dec 2016 18:01:40 +0100 Subject: [PATCH 6/6] [fix] oops, also install cabal-install-1.18 in build matrix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f3cf78c8e..3b01d6cee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ matrix: include: - env: CABALVER=1.18 GHCVER=7.6.3 compiler: ": #GHC 7.6.3" - addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}} + addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3], sources: [hvr-ghc]}} - env: CABALVER=1.18 GHCVER=7.8.4 compiler: ": #GHC 7.8.4" addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}