Browse Source

Add configuration file for Tavis CI

tags/v0.2.3.0
Peter J. Jones 2 years ago
parent
commit
5f3b8a1e6d
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
3 changed files with 90 additions and 1 deletions
  1. 87
    0
      .travis.yml
  2. 2
    0
      README.md
  3. 1
    1
      vimeta.cabal

+ 87
- 0
.travis.yml View File

@@ -0,0 +1,87 @@
1
+# This Travis job script has been generated by a script via
2
+#
3
+#   make_travis_yml_2.hs 'vimeta.cabal'
4
+#
5
+# For more information, see https://github.com/hvr/multi-ghc-travis
6
+#
7
+language: c
8
+sudo: false
9
+
10
+git:
11
+  submodules: false  # whether to recursively clone submodules
12
+
13
+cache:
14
+  directories:
15
+    - $HOME/.cabal/packages
16
+    - $HOME/.cabal/store
17
+
18
+before_cache:
19
+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
20
+  # remove files that are regenerated by 'cabal update'
21
+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
22
+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
23
+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
24
+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
25
+  - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
26
+
27
+matrix:
28
+  include:
29
+    - compiler: "ghc-7.8.4"
30
+    # env: TEST=--disable-tests BENCH=--disable-benchmarks
31
+      addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
32
+    - compiler: "ghc-7.10.3"
33
+    # env: TEST=--disable-tests BENCH=--disable-benchmarks
34
+      addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
35
+    - compiler: "ghc-8.0.1"
36
+    # env: TEST=--disable-tests BENCH=--disable-benchmarks
37
+      addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.1], sources: [hvr-ghc]}}
38
+
39
+before_install:
40
+ - HC=${CC}
41
+ - unset CC
42
+ - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
43
+ - PKGNAME='vimeta'
44
+
45
+install:
46
+ - cabal --version
47
+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
48
+ - BENCH=${BENCH---enable-benchmarks}
49
+ - TEST=${TEST---enable-tests}
50
+ - travis_retry cabal update -v
51
+ - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
52
+ - rm -fv cabal.project.local
53
+ - "echo 'packages: .' > cabal.project"
54
+ - rm -f cabal.project.freeze
55
+ - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
56
+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
57
+
58
+# Here starts the actual work to be performed for the package under test;
59
+# any command which exits with a non-zero exit code causes the build to fail.
60
+script:
61
+ - if [ -f configure.ac ]; then autoreconf -i; fi
62
+ - rm -rf dist/
63
+ - cabal sdist # test that a source-distribution can be generated
64
+ - cd dist/
65
+ - SRCTAR=(${PKGNAME}-*.tar.gz)
66
+ - SRC_BASENAME="${SRCTAR/%.tar.gz}"
67
+ - tar -xvf "./$SRC_BASENAME.tar.gz"
68
+ - cd "$SRC_BASENAME/"
69
+## from here on, CWD is inside the extracted source-tarball
70
+ - rm -fv cabal.project.local
71
+ - "echo 'packages: .' > cabal.project"
72
+ # this builds all libraries and executables (without tests/benchmarks)
73
+ - rm -f cabal.project.freeze
74
+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
75
+ # this builds all libraries and executables (including tests/benchmarks)
76
+ # - rm -rf ./dist-newstyle
77
+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all
78
+
79
+ # there's no 'cabal new-test' yet, so let's emulate for now
80
+ - TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) )
81
+ - if [ "$TEST" != "--enable-tests" ]; then TESTS=(); fi
82
+ - shopt -s globstar;
83
+   RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
84
+   if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";
85
+   else echo "= $T FAILED ="; RC=false; fi; done; $RC
86
+
87
+# EOF

+ 2
- 0
README.md View File

@@ -6,6 +6,8 @@
6 6
 
7 7
 vimeta - frontend for video metadata tagging tools
8 8
 
9
+[![Build Status](https://travis-ci.org/pjones/vimeta.svg?branch=master)](https://travis-ci.org/pjones/vimeta)
10
+
9 11
 # SYNOPSIS
10 12
 
11 13
 vimeta --version

+ 1
- 1
vimeta.cabal View File

@@ -11,7 +11,7 @@ maintainer:    Peter Jones <pjones@devalot.com>
11 11
 copyright:     Copyright (c) 2013-2015 Peter Jones
12 12
 category:      Video
13 13
 stability:     experimental
14
-tested-with:   GHC == 7.8.4, GHC == 7.10.1
14
+tested-with:   GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
15 15
 build-type:    Simple
16 16
 cabal-version: >=1.10
17 17
 description:

Loading…
Cancel
Save