From 78fa51c00cdc4de58a430b47369a941b57dd6e2e Mon Sep 17 00:00:00 2001 From: Jeremy Shaw Date: Tue, 3 Sep 2019 09:52:21 -0500 Subject: [PATCH] regen .travis.yml --- .travis.yml | 189 ++++++++++++++++++++++++++------------------------ plugins.cabal | 13 ++-- 2 files changed, 105 insertions(+), 97 deletions(-) diff --git a/.travis.yml b/.travis.yml index e69c61d..9282ba5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,112 +1,119 @@ -# This file has been generated -- see https://github.com/hvr/multi-ghc-travis +# This Travis job script has been generated by a script via +# +# haskell-ci 'plugins.cabal' +# +# For more information, see https://github.com/haskell-CI/haskell-ci +# +# version: 0.2.1 +# language: c -sudo: false +dist: xenial + +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 + - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log + # remove files that are regenerated by 'cabal update' + - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.* + - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar + - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx + + - rm -rfv $CABALHOME/packages/head.hackage matrix: include: - - env: CABALVER=1.16 GHCVER=7.4.1 HAPPYVER=1.19.5 - compiler: ": #GHC 7.4.1" - addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.1,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.16 GHCVER=7.4.2 HAPPYVER=1.19.5 - compiler: ": #GHC 7.4.2" - addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.16 GHCVER=7.6.1 HAPPYVER=1.19.5 - compiler: ": #GHC 7.6.1" - addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.1,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.16 GHCVER=7.6.2 HAPPYVER=1.19.5 - compiler: ": #GHC 7.6.2" - addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.2,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.16 GHCVER=7.6.3 HAPPYVER=1.19.5 - compiler: ": #GHC 7.6.3" - addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.1 HAPPYVER=1.19.5 - compiler: ": #GHC 7.8.1" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.1,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.2 HAPPYVER=1.19.5 - compiler: ": #GHC 7.8.2" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.2,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.3 HAPPYVER=1.19.5 - compiler: ": #GHC 7.8.3" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.3,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.18 GHCVER=7.8.4 HAPPYVER=1.19.5 - compiler: ": #GHC 7.8.4" - addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.22 GHCVER=7.10.1 HAPPYVER=1.19.5 - compiler: ": #GHC 7.10.1" - addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.22 GHCVER=7.10.2 HAPPYVER=1.19.5 - compiler: ": #GHC 7.10.2" - addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.22 GHCVER=7.10.3 HAPPYVER=1.19.5 - compiler: ": #GHC 7.10.3" - addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5], sources: [hvr-ghc]}} - - env: CABALVER=1.24 GHCVER=8.0.1 HAPPYVER=1.19.5 - compiler: ": #GHC 8.0.1" - addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,happy-1.19.5], 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.2.2" + addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}} + - compiler: "ghc-8.0.2" + addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}} + - compiler: "ghc-7.10.3" + addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}} + - compiler: "ghc-7.8.4" + addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}} + - compiler: "ghc-7.6.3" + addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}} + - compiler: "ghc-7.4.2" + addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.4.2], sources: [hvr-ghc]}} before_install: - - unset CC - - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/$HAPPYVER/bin:$PATH + - HC=/opt/ghc/bin/${CC} + - HCPKG=${HC/ghc/ghc-pkg} + - unset CC + - CABAL=/opt/ghc/bin/cabal + - CABALHOME=$HOME/.cabal + - export PATH="$CABALHOME/bin:$PATH" + - ROOTDIR=$(pwd) + - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') )) + - echo $HCNUMVER 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 + - ${CABAL} --version + - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" + - TEST=--enable-tests + - BENCH=--enable-benchmarks + - GHCHEAD=${GHCHEAD-false} + - travis_retry ${CABAL} update -v + - sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config + - rm -fv cabal.project cabal.project.local + - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$' + - rm -f cabal.project + - touch cabal.project + - "printf 'packages: \".\"\\n' >> 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 -- '^(plugins)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" + - cat cabal.project || true + - cat cabal.project.local || true + - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi + - rm -f cabal.project.freeze + - ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry + - "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'" + - rm "cabal.project.freeze" + - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all + - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all + - rm -rf .ghc.environment.* "."/dist + - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX) # 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 + # test that source-distributions can be generated + - ${CABAL} new-sdist all + - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/ + - cd ${DISTDIR} || false + - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \; + - rm -f cabal.project + - touch cabal.project + - "printf 'packages: \"plugins-*/*.cabal\"\\n' >> 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 -- '^(plugins)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" + - cat cabal.project || true + - cat cabal.project.local || true + # this builds all libraries and executables (without tests/benchmarks) + - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all -# 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") + # build & run tests, build benchmarks + - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all + # cabal check + - (cd plugins-* && ${CABAL} check) + + # haddock + - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all + + # Build without installed constraints for packages in global-db + - rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all; + +# REGENDATA ["plugins.cabal"] # EOF diff --git a/plugins.cabal b/plugins.cabal index 9f7f8b5..057d061 100644 --- a/plugins.cabal +++ b/plugins.cabal @@ -20,12 +20,13 @@ author: Don Stewart 2004..2010 maintainer: Jeremy Shaw cabal-version: >= 1.6 build-type: Configure -Tested-with: GHC == 7.4.* - , GHC == 7.6.* - , GHC == 7.8.* - , GHC == 7.10.* - , GHC == 8.0.* - , GHC == 8.2.* +Tested-with: GHC == 7.4.2 + , GHC == 7.6.3 + , GHC == 7.8.4 + , GHC == 7.10.3 + , GHC == 8.0.2 + , GHC == 8.2.2 + , GHC == 8.6.4 extra-source-files: config.guess, config.h.in, config.mk.in, config.sub, configure, configure.ac, install.sh, Makefile, testsuite/makewith/io/TestIO.conf.in,