Skip to content

Commit

Permalink
try to make it so we can specify less for osx builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Sep 20, 2015
1 parent bd97f5c commit 91a4555
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .travis.yml
Expand Up @@ -30,7 +30,7 @@ matrix:
compiler: ": #GHC 7.8.4"
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}}

- env: CABALVER=1.22 GHCVER=7.10.1 BUILD=stack STACK_YAML=stack-7.8.yaml PLATFORM=osx
- env: BUILD=stack PLATFORM=osx STACK_YAML=stack-7.8.yaml
compiler: ": #GHC 7.8.4"
os: osx

Expand All @@ -42,36 +42,34 @@ matrix:
compiler: ": #GHC 7.10.1"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}}

- env: CABALVER=1.22 GHCVER=7.10.1 BUILD=stack PLATFORM=osx
compiler: ": #GHC 7.10.1"
os: osx

- env: CABALVER=1.22 GHCVER=7.10.2 BUILD=cabal PLATFORM=linux
compiler: ": #GHC 7.10.2"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,alex-3.1.4,happy-1.19.5], sources: [hvr-ghc]}}

- env: CABALVER=1.22 GHCVER=7.10.2 BUILD=stack PLATFORM=osx
- env: BUILD=stack PLATFORM=osx
compiler: ": #GHC 7.10.2"
os: osx


before_install:
- unset CC
- export HAPPYVER=1.19.5
- export ALEXVER=3.1.4
- export STACK_VERSION=0.1.3.0
- mkdir -p ~/.cabal/bin
- export PATH=~/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/$HAPPYVER/bin:/opt/alex/$ALEXVER/bin:$PATH
- if [ "$BUILD" = "stack" ]; then
travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-x86_64-$PLATFORM.gz | gunzip > ~/.cabal/bin/stack;
chmod a+x ~/.cabal/bin/stack;
if [ "$PLATFORM" = "osx" ]; then
- case "$BUILD" in
stack)
export STACK_VERSION=0.1.3.0;
mkdir -p ~/bin;
travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v$STACK_VERSION/stack-$STACK_VERSION-x86_64-$PLATFORM.gz | gunzip > ~/bin/stack;
chmod a+x ~/bin/stack;
scripts/travis_long stack --no-terminal setup;
fi
fi

export PATH=~/bin:$PATH;;
cabal)
export HAPPYVER=1.19.5
export ALEXVER=3.1.4
export PATH=~/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:/opt/happy/$HAPPYVER/bin:/opt/alex/$ALEXVER/bin:$PATH;;
esac
install:
- case "$BUILD" in
stack)
scripts/travis_long stack --no-terminal $STACK_OPTIONS build --only-snapshot -j2;;
cabal)
echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
cabal --version;
Expand Down Expand Up @@ -101,8 +99,6 @@ install:
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
fi;;
stack)
scripts/travis_long stack --no-terminal $STACK_OPTIONS build --only-snapshot -j2;;
esac

# snapshot package-db on cache miss
Expand All @@ -111,15 +107,15 @@ install:
# any command which exits with a non-zero exit code causes the build to fail.
script:
- case "$BUILD" in
stack)
scripts/travis_long stack --no-terminal $STACK_OPTIONS build -j2;;
cabal)
cabal configure --enable-tests -v2;
cabal build;
cabal test;
cabal bench || true;
cabal sdist || true;
SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && (cd dist && cabal install --force-reinstalls "$SRC_TGZ");;
stack)
scripts/travis_long stack --no-terminal $STACK_OPTIONS build -j2;;
esac

notifications:
Expand Down

0 comments on commit 91a4555

Please sign in to comment.