This repository has been archived by the owner on Nov 4, 2021. It is now read-only.
forked from quchen/prettyprinter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
106 lines (78 loc) · 2.85 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Stack's standard Travis config, taken from
# http://docs.haskellstack.org/en/stable/GUIDE.html#travis-with-caching
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
language: c
# GHC depends on GMP. You can add other dependencies here as well.
addons:
apt:
packages:
- libgmp-dev
# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
# LTS 1 and 2 use uses GHC 7.8.4
- >
STACK_ARGS="--resolver lts-2 --stack-yaml stack-older-snapshots.yaml"
STACK_BUILD_ARGS=""
SKIP_RELEASE_CHECKS=1
# LTS 3 to 6 all use GHC 7.10.{2,3}
- >
STACK_ARGS="--resolver lts-6 --stack-yaml stack-older-snapshots.yaml"
STACK_BUILD_ARGS=""
SKIP_RELEASE_CHECKS=1
# LTS 7, 8 and 9 use GHC 8.0.{1,2}
- >
STACK_ARGS="--resolver lts-9 --stack-yaml stack-older-snapshots.yaml"
STACK_BUILD_ARGS=""
# LTS 10 uses GHC 8.2.2
- >
STACK_ARGS="--resolver lts-10"
STACK_BUILD_ARGS="--ghc-options -Werror"
- >
STACK_ARGS="--resolver lts"
STACK_BUILD_ARGS=""
- >
STACK_ARGS="--resolver nightly"
STACK_BUILD_ARGS="--ghc-options -Werror"
SKIP_RELEASE_CHECKS=1
matrix:
fast_finish: true
allow_failures:
- env:
- >
STACK_ARGS="--resolver nightly"
STACK_BUILD_ARGS="--ghc-options \"-Wcompat -Werror\""
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- >
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64
| tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- stack $STACK_ARGS --no-terminal setup
- |
if [[ -z "$SKIP_RELEASE_CHECKS" ]]; then
stack $STACK_ARGS --no-terminal install hlint-2.0.9 stylish-haskell-0.8.1.0
fi
script:
- >
travis_wait stack $STACK_ARGS --no-terminal test
$STACK_BUILD_ARGS
- >
travis_wait stack $STACK_ARGS --no-terminal haddock --no-haddock-deps
$STACK_BUILD_ARGS
- |
if [[ -z "$SKIP_RELEASE_CHECKS" ]]; then
travis_wait stack $STACK_ARGS --no-terminal bench --no-run-benchmarks $STACK_BUILD_ARGS
fi
- stack $STACK_ARGS --no-terminal sdist
- if [[ -z "$SKIP_RELEASE_CHECKS" ]]; then ./scripts/checks/hlint; fi
- if [[ -z "$SKIP_RELEASE_CHECKS" ]]; then ./scripts/checks/readme-was-generated; fi
- if [[ -z "$SKIP_RELEASE_CHECKS" ]]; then ./scripts/checks/negated-cpp-macro-syntax; fi
- if [[ -z "$SKIP_RELEASE_CHECKS" ]]; then ./scripts/checks/stylish-haskell; fi
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack