regen .travis.yml
This commit is contained in:
parent
5866046ca0
commit
e6c898ff58
187
.travis.yml
187
.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
|
language: c
|
||||||
sudo: false
|
dist: xenial
|
||||||
|
|
||||||
|
git:
|
||||||
|
submodules: false # whether to recursively clone submodules
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.cabsnap
|
|
||||||
- $HOME/.cabal/packages
|
- $HOME/.cabal/packages
|
||||||
|
- $HOME/.cabal/store
|
||||||
|
|
||||||
before_cache:
|
before_cache:
|
||||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
|
- rm -fv $CABALHOME/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 $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:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: CABALVER=1.16 GHCVER=7.4.1 HAPPYVER=1.19.5
|
- compiler: "ghc-8.6.4"
|
||||||
compiler: ": #GHC 7.4.1"
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.4], sources: [hvr-ghc]}}
|
||||||
addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.1,happy-1.19.5], sources: [hvr-ghc]}}
|
- compiler: "ghc-8.2.2"
|
||||||
- env: CABALVER=1.16 GHCVER=7.4.2 HAPPYVER=1.19.5
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
|
||||||
compiler: ": #GHC 7.4.2"
|
- compiler: "ghc-8.0.2"
|
||||||
addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2,happy-1.19.5], sources: [hvr-ghc]}}
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
|
||||||
- env: CABALVER=1.16 GHCVER=7.6.1 HAPPYVER=1.19.5
|
- compiler: "ghc-7.10.3"
|
||||||
compiler: ": #GHC 7.6.1"
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
|
||||||
addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.1,happy-1.19.5], sources: [hvr-ghc]}}
|
- compiler: "ghc-7.8.4"
|
||||||
- env: CABALVER=1.16 GHCVER=7.6.2 HAPPYVER=1.19.5
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
|
||||||
compiler: ": #GHC 7.6.2"
|
- compiler: "ghc-7.6.3"
|
||||||
addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.2,happy-1.19.5], sources: [hvr-ghc]}}
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}}
|
||||||
- env: CABALVER=1.16 GHCVER=7.6.3 HAPPYVER=1.19.5
|
- compiler: "ghc-7.4.2"
|
||||||
compiler: ": #GHC 7.6.3"
|
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.4.2], sources: [hvr-ghc]}}
|
||||||
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]}}
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
- HC=/opt/ghc/bin/${CC}
|
||||||
|
- HCPKG=${HC/ghc/ghc-pkg}
|
||||||
- unset CC
|
- unset CC
|
||||||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/$HAPPYVER/bin:$PATH
|
- 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:
|
install:
|
||||||
- cabal --version
|
- ${CABAL} --version
|
||||||
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
||||||
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
|
- TEST=--enable-tests
|
||||||
then
|
- BENCH=--enable-benchmarks
|
||||||
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
|
- GHCHEAD=${GHCHEAD-false}
|
||||||
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
|
- travis_retry ${CABAL} update -v
|
||||||
fi
|
- sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
|
||||||
- travis_retry cabal update -v
|
- rm -fv cabal.project cabal.project.local
|
||||||
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
|
- grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
|
||||||
- cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
|
- rm -f cabal.project
|
||||||
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
|
- touch cabal.project
|
||||||
|
- "printf 'packages: \".\"\\n' >> cabal.project"
|
||||||
# check whether current requested install-plan matches cached package-db snapshot
|
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
|
||||||
- if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
|
- touch cabal.project.local
|
||||||
then
|
- "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"
|
||||||
echo "cabal build-cache HIT";
|
- cat cabal.project || true
|
||||||
rm -rfv .ghc;
|
- cat cabal.project.local || true
|
||||||
cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
|
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
|
||||||
cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
|
- rm -f cabal.project.freeze
|
||||||
else
|
- ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry
|
||||||
echo "cabal build-cache MISS";
|
- "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
|
||||||
rm -rf $HOME/.cabsnap;
|
- rm "cabal.project.freeze"
|
||||||
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
|
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
|
||||||
cabal install --only-dependencies --enable-tests --enable-benchmarks;
|
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
|
||||||
fi
|
- rm -rf .ghc.environment.* "."/dist
|
||||||
|
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||||
# 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;
|
# 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.
|
# any command which exits with a non-zero exit code causes the build to fail.
|
||||||
script:
|
script:
|
||||||
- if [ -f configure.ac ]; then autoreconf -i; fi
|
# test that source-distributions can be generated
|
||||||
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
|
- ${CABAL} new-sdist all
|
||||||
- cabal build # this builds all libraries and executables (including tests/benchmarks)
|
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
|
||||||
- cabal test
|
- cd ${DISTDIR} || false
|
||||||
- cabal check
|
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
|
||||||
- cabal sdist # tests that a source-distribution can be generated
|
- 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.
|
# build & run tests, build benchmarks
|
||||||
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
|
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
|
||||||
# `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")
|
|
||||||
|
|
||||||
|
# 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
|
# EOF
|
||||||
|
@ -20,12 +20,13 @@ author: Don Stewart 2004..2010
|
|||||||
maintainer: Jeremy Shaw <jeremy@seereason.com>
|
maintainer: Jeremy Shaw <jeremy@seereason.com>
|
||||||
cabal-version: >= 1.6
|
cabal-version: >= 1.6
|
||||||
build-type: Configure
|
build-type: Configure
|
||||||
Tested-with: GHC == 7.4.*
|
Tested-with: GHC == 7.4.2
|
||||||
, GHC == 7.6.*
|
, GHC == 7.6.3
|
||||||
, GHC == 7.8.*
|
, GHC == 7.8.4
|
||||||
, GHC == 7.10.*
|
, GHC == 7.10.3
|
||||||
, GHC == 8.0.*
|
, GHC == 8.0.2
|
||||||
, GHC == 8.2.*
|
, GHC == 8.2.2
|
||||||
|
, GHC == 8.6.4
|
||||||
extra-source-files: config.guess, config.h.in, config.mk.in, config.sub,
|
extra-source-files: config.guess, config.h.in, config.mk.in, config.sub,
|
||||||
configure, configure.ac, install.sh, Makefile,
|
configure, configure.ac, install.sh, Makefile,
|
||||||
testsuite/makewith/io/TestIO.conf.in,
|
testsuite/makewith/io/TestIO.conf.in,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user