Try using custom resolvers to ease caching load

This commit is contained in:
Nikolay Yakimov 2016-08-03 16:10:53 +03:00
parent 234f377028
commit d4283e78ec

View File

@ -6,7 +6,6 @@ cache:
directories: directories:
- $HOME/.stack - $HOME/.stack
- $HOME/.ghc-mod - $HOME/.ghc-mod
- $TRAVIS_BUILD_DIR/.stack-work/install
addons: addons:
apt: apt:
@ -28,7 +27,18 @@ install:
- cabal update - cabal update
- stack install happy --resolver=$RES - stack install happy --resolver=$RES
# - stack init --ignore-subdirs --resolver=ghc-$GHCVER ./ cabal-helper/ # - stack init --ignore-subdirs --resolver=ghc-$GHCVER ./ cabal-helper/
- stack init --ignore-subdirs --resolver=ghc-$GHCVER ./ # - stack init --ignore-subdirs --resolver=ghc-$GHCVER ./
- |
resf="ghc-$GHCVER.yaml"
echo "resolver: ghc-$GHCVER" > "$resf"
stack solver --update-config --stack-yaml="$resf"
sed -i 's/^resolver:/compiler:/;s/^extra-deps:/packages:/' "$resf"
echo "resolver: { name: 'ghc-$GHCVER', location: './$resf' }" > stack.yaml
ir=$( stack path --snapshot-install-root )
ls -d ${ir%/custom-ghc-*}/custom-ghc-* | grep -v "${ir%/*}" | while read i; do
rm -rfv "$i"
done
script: script:
- cabal check - cabal check