-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
85 lines (85 loc) · 3.69 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
language: c
sudo: false
matrix:
include:
- env: GHCVER=7.8.4 CABALVER=1.22 COVERAGE=true
compiler: ": #GHC 7.8.4 - tests"
# ^ HACK before https://github.com/travis-ci/travis-ci/issues/4393 is resolved
addons: {apt: {packages: [cabal-install-1.22,ghc-7.8.4,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=7.8.4 CABALVER=1.22 STACKAGE=lts-2.22
compiler: ": #GHC 7.8.4 - lts-2.22-1"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.8.4,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=7.6.3 CABALVER=1.22
compiler: ": #GHC 7.6.3"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.6.3,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=7.10.1 CABALVER=1.22 DEPLOY=yes
compiler: ": #GHC 7.10.1"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.1,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=7.10.2 CABALVER=1.22 STACKAGE=lts=3.6 RUNSDISTTESTS=YES
compiler: ": #GHC 7.10.2 lts-3.6"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=7.10.2 CABALVER=1.22 STACKAGE=nightly-2015-09-29
compiler: ": #GHC 7.10.2 nightly-2015-09-29"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=7.10.3 CABALVER=1.22
compiler: ": #GHC 7.10.3"
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
- env: GHCVER=8.0.1 CABALVER=1.24
compiler: ": #GHC 8.0.1"
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1,happy-1.19.5,alex-3.1.4], sources: [hvr-ghc]}}
before_install:
- unset CC
- export PATH="/opt/ghc/$GHCVER/bin:$PATH"
- export PATH="/opt/cabal/$CABALVER/bin:$PATH"
- export PATH="$HOME/.cabal/bin:$PATH"
- export PATH="/opt/happy/1.19.5/bin:/$PATH"
- export PATH="/opt/alex/3.1.4/bin:/$PATH"
install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update
# Run sequentially
# Travis container infrastructure seems to expose all host CPUs (16?), thus
# cabal and ghc tries to use them all. Which is bad idea on a shared box.
# See also: https://ghc.haskell.org/trac/ghc/ticket/9221
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
# Cache sandboxes in ~/cabal-sandboxes
# Move right sandbox to .cabal-sandbox if exists
- if [ -d ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none} ]; then
mv ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none} .cabal-sandbox;
fi
- mkdir -p .cabal-sandbox
- cabal sandbox init --sandbox .cabal-sandbox
# Download stackage cabal.config, not sure whether filtering is necessary
- if [ -n "$STACKAGE" ]; then curl https://www.stackage.org/$STACKAGE/cabal.config | grep -v purescript > cabal.config; fi
- cabal install --only-dependencies --enable-tests
- cabal install hpc-coveralls
# Snapshot state of the sandbox now, so we don't need to make new one for test install
- rm -rf ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none}
- cp -r .cabal-sandbox ~/cabal-sandboxes/$GHCVER-${STACKAGE:-none}
# Install bower globally (for psc-docs/psc-publish tests)
- npm install -g bower
script:
- ./travis/configure.sh
- cabal build --ghc-options="-Werror"
- cabal test
- ./travis/test-install.sh
after_script:
- ./travis/after.sh
notifications:
email: true
before_deploy: "./bundle/build.sh linux64"
deploy:
provider: releases
api_key: $RELEASE_KEY
file:
- bundle/linux64.tar.gz
- bundle/linux64.sha
skip_cleanup: true
on:
all_branches: true
tags: true
condition: "$DEPLOY = yes"
cache:
directories:
- ~/cabal-sandboxes