From 3406233ec9a49e94c77acb75f88e995fb7c2be1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 1 Sep 2022 10:19:00 +0800 Subject: [PATCH 1/2] update travis to more recent ghc versions --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e2437e..fe94fe6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,15 +13,15 @@ before_cache: matrix: include: - - 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.2 - compiler: ": #GHC 7.10.2" - addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], 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]}} + - env: GHCVER=8.8.4 + compiler: ": #GHC 8.8.4" + addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.4], sources: [hvr-ghc]}} + - env: GHCVER=8.10.7 + compiler: ": #GHC 8.10.4" + addons: {apt: {packages: [cabal-install-3.2,ghc-8.10.4], sources: [hvr-ghc]}} + - env: GHCVER=9.0.1 + compiler: ": #GHC 9.0.1" + addons: {apt: {packages: [cabal-install-3.4,ghc-9.0.1], sources: [hvr-ghc]}} before_install: - unset CC @@ -78,4 +78,4 @@ script: - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && (cd dist && cabal install --force-reinstalls "$SRC_TGZ") -# EOF \ No newline at end of file +# EOF From a0b31ce7480869fad9c5e8194c7d942068a9de42 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 1 Sep 2022 10:51:19 +0800 Subject: [PATCH 2/2] try to get travis working with contemporary cabal --- .travis.yml | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe94fe6..54fa059 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,38 +30,13 @@ before_install: 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 ]; + - if [ -d $HOME/.cabsnap ]; then - zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz > - $HOME/.cabal/packages/hackage.haskell.org/00-index.tar; + cp -a $HOME/.cabsnap/ghc $HOME/.ghc; + cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/; 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. @@ -78,4 +53,9 @@ script: - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && (cd dist && cabal install --force-reinstalls "$SRC_TGZ") + - rm -rf $HOME/.cabsnap + - mkdir $HOME/.cabsnap; + - cp -a $HOME/.ghc $HOME/.cabsnap/ghc; + - cp -a $HOME/.cabal $HOME/.cabsnap/; + # EOF