git.iko.soy/typeable/hjsonpointer
on master help sign in
Regenerate .travis.yaml; bump lts.
commit766385fafd9faa11990573e2c1c2dbc73d3a55f2 authorIan Grant Jeffries <ian@housejeffries.com> dateSun 30 Sep 2018, 00:34 (8 years ago) parent84f02e6
5 files changed+62−50
.travis.yml+55−46 changelog.md+4 hjsonpointer.cabal+2−1 stack.yaml+1−1 test/Unit.hs−2
.travis.yml+55−46
@@ -1,9 +1,11 @@
11# This Travis job script has been generated by a script via
22#
3−# make_travis_yml_2.hs 'hjsonpointer.cabal'
3+# runghc make_travis_yml_2.hs 'hjsonpointer.cabal'
44#
55# For more information, see https://github.com/hvr/multi-ghc-travis
6−#
6+
7+# NOTE: After generating comment out `cabal check`, it requires a description field.
8+
79language: c
810sudo: false
911
@@ -24,6 +26,8 @@ before_cache:
2426 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
2527 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
2628
29+ - rm -rfv $HOME/.cabal/packages/head.hackage
30+
2731matrix:
2832 include:
2933 - compiler: "ghc-8.0.2"
@@ -37,59 +41,64 @@ matrix:
3741 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.4.1], sources: [hvr-ghc]}}
3842
3943before_install:
40− - HC=${CC}
41− - HCPKG=${HC/ghc/ghc-pkg}
42− - unset CC
43− - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
44− - PKGNAME='hjsonpointer'
44+ - HC=${CC}
45+ - HCPKG=${HC/ghc/ghc-pkg}
46+ - unset CC
47+ - ROOTDIR=$(pwd)
48+ - mkdir -p $HOME/.local/bin
49+ - "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
50+ - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
51+ - echo $HCNUMVER
4552
4653install:
47− - cabal --version
48− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
49− - BENCH=${BENCH---enable-benchmarks}
50− - TEST=${TEST---enable-tests}
51− - HADDOCK=${HADDOCK-true}
52− - INSTALLED=${INSTALLED-true}
53− - travis_retry cabal update -v
54− - sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
55− - rm -fv cabal.project.local
56− - "echo 'packages: .' > cabal.project"
57− - rm -f cabal.project.freeze
58− - cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
59− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
54+ - cabal --version
55+ - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
56+ - BENCH=${BENCH---enable-benchmarks}
57+ - TEST=${TEST---enable-tests}
58+ - HADDOCK=${HADDOCK-true}
59+ - INSTALLED=${INSTALLED-true}
60+ - GHCHEAD=${GHCHEAD-false}
61+ - travis_retry cabal update -v
62+ - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
63+ - rm -fv cabal.project cabal.project.local
64+ - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
65+ - "printf 'packages: \".\"\\n' > cabal.project"
66+ - cat cabal.project
67+ - if [ -f "./configure.ac" ]; then
68+ (cd "." && autoreconf -i);
69+ fi
70+ - rm -f cabal.project.freeze
71+ - cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
72+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
73+ - rm -rf .ghc.environment.* "."/dist
74+ - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
6075
6176# Here starts the actual work to be performed for the package under test;
6277# any command which exits with a non-zero exit code causes the build to fail.
6378script:
64− - if [ -f configure.ac ]; then autoreconf -i; fi
65− - rm -rf .ghc.environment.* dist/
66− - cabal sdist # test that a source-distribution can be generated
67− - cd dist/
68− - SRCTAR=(${PKGNAME}-*.tar.gz)
69− - SRC_BASENAME="${SRCTAR/%.tar.gz}"
70− - tar -xvf "./$SRC_BASENAME.tar.gz"
71− - cd "$SRC_BASENAME/"
72−## from here on, CWD is inside the extracted source-tarball
73− - rm -fv cabal.project.local
74− - "echo 'packages: .' > cabal.project"
75− # this builds all libraries and executables (without tests/benchmarks)
76− - rm -f cabal.project.freeze
77− - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
78− # this builds all libraries and executables (including tests/benchmarks)
79− # - rm -rf ./dist-newstyle
79+ # test that source-distributions can be generated
80+ - (cd "." && cabal sdist)
81+ - mv "."/dist/hjsonpointer-*.tar.gz ${DISTDIR}/
82+ - cd ${DISTDIR} || false
83+ - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
84+ - "printf 'packages: hjsonpointer-*/*.cabal\\n' > cabal.project"
85+ - cat cabal.project
86+ # this builds all libraries and executables (without tests/benchmarks)
87+ - cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
88+
89+ # Build with installed constraints for packages in global-db
90+ - 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
8091
81− # Build with installed constraints for packages in global-db
82− - if $INSTALLED; then
83− 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;
84− else echo "Not building with installed constraints"; fi
92+ # build & run tests, build benchmarks
93+ - cabal new-build -w ${HC} ${TEST} ${BENCH} all
94+ - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
8595
86− # build & run tests, build benchmarks
87− - cabal new-build -w ${HC} ${TEST} ${BENCH} all
88− - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} all; fi
96+ # cabal check
97+ # - (cd hjsonpointer-* && cabal check)
8998
90− # haddock
91− - rm -rf ./dist-newstyle
92− - if $HADDOCK; then cabal new-haddock -w ${HC} --disable-tests --disable-benchmarks all; else echo "Skipping haddock generation";fi
99+ # haddock
100+ - rm -rf ./dist-newstyle
101+ - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
93102
94103# REGENDATA ["hjsonpointer.cabal"]
95104# EOF
changelog.md+4
@@ -1,3 +1,7 @@
1+# 1.5.0
2+
3++ Drop QuickCheck dependency (thanks @mmhat !).
4+
15# 1.4.0
26
37+ Enable GHC 8.4 (thanks @4e6 !).
hjsonpointer.cabal+2−1
@@ -1,5 +1,5 @@
11name: hjsonpointer
2−version: 1.4.0
2+version: 1.5.0
33synopsis: JSON Pointer library
44homepage: https://github.com/seagreen/hjsonpointer
55license: MIT
@@ -42,6 +42,7 @@ test-suite unit
4242 OverloadedStrings
4343 ghc-options:
4444 -Wall
45+ -fno-warn-orphans
4546 other-modules: Example
4647 build-depends:
4748 aeson
stack.yaml+1−1
@@ -1,2 +1,2 @@
1−resolver: lts-11.6
1+resolver: lts-12.10
22pvp-bounds: upper-revision
test/Unit.hs−2
@@ -1,8 +1,6 @@
11{-# LANGUAGE GeneralizedNewtypeDeriving #-}
22{-# LANGUAGE StandaloneDeriving #-}
33
4−{-# OPTIONS_GHC -fno-warn-orphans #-}
5−
64module Main where
75
86import Data.Aeson