-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
231 lines (211 loc) · 10.2 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# Liang-Ting Chen 2019-09-07:
# Switched to Build Stages
# NB: don't set `language: haskell` here.
language: c
# Request Ubuntu Trusty (14.04 LTS).
dist: trusty
# Explicitly request sudo-enabled virtual environments [Issue #1992].
sudo: required
##############################################################################
# Every master and maintenance branches >= 2.5 or >= maint-2.4 must
# be here. You can also add your private branches if you want travis to
# test them.
branches:
only:
- master
- future
- maint-2.4
- stable-2.5
- /^release-.*/
# Test all issue* branches. Saves you opening a PR.
- /^issue.*/
##############################################################################
# The submodule is only needed by std-lib compiler test, so
# it is fetched manually in the `install` section.
#
git:
submodules: false
##############################################################################
# Stages:
#
stages:
- name: compilation
if: NOT (branch =~ /^release-.*/) AND NOT (tag IS present) AND NOT (commit_message =~ complete\s+tests)
- name: main
if: NOT (branch =~ /^release-.*/) AND NOT (tag IS present) AND NOT (commit_message =~ complete\s+tests)
- name: complete
if: (branch =~ /^release-.*/) OR (tag IS present) OR (commit_message =~ complete\s+tests)
jobs:
# Builds are loooong, we want to send an email as fast as possible.
fast_finish: true
include:
- stage: compilation
env:
GHC_VER=8.8.2
cache:
directories:
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work
- $HOME/.local/bin
before_install:
# Install ghc
- sudo -E apt-add-repository -y "ppa:hvr/ghc" &&
travis_apt_get_update &&
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ghc-${GHC_VER} &&
export PATH=/opt/ghc/$GHC_VER/bin:$PATH
# Install stack
- 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'
# Set up arguments and flags for stack compilation
- export ARGS="--stack-yaml stack-${GHC_VER}.yaml --no-terminal --system-ghc" &&
export FLAGS="--flag Agda:enable-cluster-counting"
- echo "*** GHC version ***" && ghc --version &&
echo "*** Stack version ***" && stack --version &&
echo "*** Haddock version ***" && haddock --version &&
echo "*** Emacs version ***" && emacs --version | sed 2q
install: |
stack build Agda ${ARGS} ${FLAGS} --test --no-run-tests --only-dependencies
script: |
stack build Agda ${ARGS} ${FLAGS} --test --no-run-tests
# shelltestrunner is used by `make test-size-solver`
# we need to cache it first.
stack install shelltestrunner ${ARGS}
before_cache:
- find ${TRAVIS_BUILD_DIR}/.stack-work -type f -name '*.agdai' -delete
- &main-job
stage: main
name: "Bug, successful, and failing tests"
env:
GHC_VER=8.8.2
addons:
apt:
packages:
- ghc-8.8.2
- cabal-install-3.0
- texlive-binaries
- librsvg2-bin
sources:
- hvr-ghc
cache:
directories:
- $HOME/.stack
- ${TRAVIS_BUILD_DIR}/.stack-work
- $HOME/.local/bin
before_install:
# Test suites shouldn't touch global stack packages, so we try to avoid changing its database.
- cp ${HOME}/.stack/stack.sqlite3 $HOME/stack.sqlite3.ori
- cp ${TRAVIS_BUILD_DIR}/.stack-work/stack.sqlite3 $HOME/stack-work.sqlite3.ori
- # Setup ghc & cabal path
- export PATH=/opt/ghc/$GHC_VER/bin:$PATH
- export PATH=/opt/ghc/$GHC_VER/bin:/opt/cabal/$CABAL_VER/bin:$PATH
- export PATH=$HOME/.cabal/bin:$PATH
- # Install stack
- 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'
- export PATH=$HOME/.local/bin:$PATH
- export PATH=$HOME/texlive/bin/x86_64-linux:$PATH
- export PARALLEL_TESTS=2
- export FLAGS="--flag Agda:enable-cluster-counting"
- export ARGS="--silent --stack-yaml stack-${GHC_VER}.yaml --no-terminal --system-ghc"
- export AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes"
- export BUILD_DIR=$(pwd)/$(stack ${ARGS} path --dist-dir)
- export MAKE_CMD="make AGDA_TESTS_OPTIONS=${ARGA_TESTS_OPTIONS} TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR"
- echo "*** Agda version ***" && stack ${ARGS} exec -- agda --version
script:
- stack ${ARGS} exec -- ${MAKE_CMD} bugs
- stack ${ARGS} exec -- ${MAKE_CMD} succeed
- stack ${ARGS} exec -- ${MAKE_CMD} fail
before_cache:
- find ${TRAVIS_BUILD_DIR}/.stack-work -type f -name '*.agdai' -delete
- find ${TRAVIS_BUILD_DIR}/.stack-work -type f -name '*.elc' -delete
- find ${TRAVIS_BUILD_DIR}/.stack-work -type f -name '*.agda.vim' -delete
- rm $(stack ${ARGS} path --local-install-root)/bin/size-solver
- mv $HOME/stack-work.sqlite3.ori ${TRAVIS_BUILD_DIR}/.stack-work/stack.sqlite3
- mv $HOME/stack.sqlite3.ori ${HOME}/.stack/stack.sqlite3
- <<: *main-job
name: "Test suites using standard library"
git:
submodules: true
script:
- stack ${ARGS} exec -- ${MAKE_CMD} std-lib-test
- stack ${ARGS} exec -- ${MAKE_CMD} benchmark-without-logs
- stack ${ARGS} exec -- ${MAKE_CMD} std-lib-compiler-test
- stack ${ARGS} exec -- ${MAKE_CMD} std-lib-succeed
- stack ${ARGS} exec -- ${MAKE_CMD} std-lib-interaction
- <<: *main-job
name: "Compiler tests, benchmark, and other test suites"
git:
submodules: true
script:
- stack ${ARGS} exec -- ${MAKE_CMD} compiler-test
- stack ${ARGS} exec -- ${MAKE_CMD} interaction
- stack ${ARGS} exec -- ${MAKE_CMD} interactive
- stack ${ARGS} exec -- ${MAKE_CMD} DONT_RUN_LATEX="Y" latex-html-test
- stack ${ARGS} exec -- ${MAKE_CMD} examples
- stack ${ARGS} exec -- ${MAKE_CMD} api-test
- stack ${ARGS} exec -- ${MAKE_CMD} user-manual-test
- stack ${ARGS} exec -- ${MAKE_CMD} internal-tests
- stack ${ARGS} exec -- ${MAKE_CMD} testing-emacs-mode
- travis_retry cabal v1-update
- ${MAKE_CMD} TAGS
# Build & install size-solver
- stack build ${ARGS} ${FLAGS} size-solver
- mkdir -p src/size-solver/dist/build/size-solver &&
cp $(stack path ${ARGS} --local-install-root)/bin/size-solver src/size-solver/dist/build/size-solver/size-solver
# Test size-solver
- ${MAKE_CMD} -C src/size-solver/ test
# Build agda-bisect
- ${MAKE_CMD} install-agda-bisect
- &complete-job
stage: complete
env: GHC_VER=8.8.2 CABAL_VER=3.0
before_install:
- sudo -E apt-add-repository -y "ppa:hvr/ghc" &&
travis_apt_get_update &&
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ghc-${GHC_VER} cabal-install-${CABAL_VER} &&
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install texlive-binaries
- export PATH=/opt/ghc/$GHC_VER/bin:/opt/cabal/$CABAL_VER/bin:$PATH &&
export PATH=$HOME/.local/bin:$PATH &&
export BUILD_DIR=$HOME/dist &&
export PARALLEL_TESTS=2 &&
export PATH=$HOME/.cabal/bin:$PATH &&
export PATH=$HOME/texlive/bin/x86_64-linux:$PATH
install:
- .travis/cabal_install
##############################################################################
script:
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR succeed
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR fail
- make BUILD_DIR=$BUILD_DIR interaction
- make BUILD_DIR=$BUILD_DIR interactive
# We don't run LaTeX/XeLaTeX/LuaLaTeX on Travis (see Issues #1022 and
# #1675), but we still compare the generated tex/html files with the
# golden files.
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR DONT_RUN_LATEX="Y" latex-html-test
- make BUILD_DIR=$BUILD_DIR examples
- make BUILD_DIR=$BUILD_DIR std-lib-test
- make BUILD_DIR=$BUILD_DIR api-test
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR user-manual-test
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR internal-tests
- make BUILD_DIR=$BUILD_DIR benchmark-without-logs
##################################################################################
# Andreas, 2019-08-20: disable compiler test on ghc 8.0 since it takes too long,
# making the whole travis run fail.
# Ulf, 2019-08-29: only disable the std-lib compiler test
# Liang-Ting, 2019-12-02: the maximum heap size has been increased, and std-lib compiler test is working again on GHC 8.0
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR compiler-test
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR std-lib-compiler-test
- make AGDA_TESTS_OPTIONS="-j${PARALLEL_TESTS} --hide-successes" TASTY_ANSI_TRICKS=false BUILD_DIR=$BUILD_DIR std-lib-succeed
- make BUILD_DIR=$BUILD_DIR std-lib-interaction
- make BUILD_DIR=$BUILD_DIR TAGS
- make test-size-solver
- make BUILD_DIR=$BUILD_DIR testing-emacs-mode
- make install-agda-bisect
- <<: *complete-job
env: GHC_VER=8.6.5 CABAL_VER=2.4
- <<: *complete-job
env: GHC_VER=8.4.4 CABAL_VER=2.2
- <<: *complete-job
env: GHC_VER=8.2.2 CABAL_VER=2.0
- <<: *complete-job
env: GHC_VER=8.0.2 CABAL_VER=1.24