-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.travis.yml
More file actions
167 lines (162 loc) · 4.57 KB
/
.travis.yml
File metadata and controls
167 lines (162 loc) · 4.57 KB
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
os: linux
language: c
jobs:
include:
- env: NGXVER=head CABALVER=head GHCVER=head
compiler: gcc
addons:
apt:
packages: [cabal-install-head, ghc-head]
sources: [hvr-ghc]
- env: NGXVER=head CABALVER=head GHCVER=8.10.2
compiler: gcc
addons:
apt:
packages: [cabal-install-head, ghc-8.10.2]
sources: [hvr-ghc]
- env: NGXVER=1.18.0 CABALVER=head GHCVER=8.10.2
compiler: gcc
addons:
apt:
packages: [cabal-install-head, ghc-8.10.2]
sources: [hvr-ghc]
- env: NGXVER=1.16.1 CABALVER=head GHCVER=8.8.4
compiler: gcc
addons:
apt:
packages: [cabal-install-head, ghc-8.8.4]
sources: [hvr-ghc]
- env: NGXVER=1.14.2 CABALVER=head GHCVER=8.6.5
compiler: gcc
addons:
apt:
packages: [cabal-install-head, ghc-8.6.5]
sources: [hvr-ghc]
- env: NGXVER=1.12.2 CABALVER=head GHCVER=8.4.4
compiler: gcc
addons:
apt:
packages: [cabal-install-head, ghc-8.4.4]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=head
addons:
apt:
packages: [cabal-install-head, ghc-head]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=8.10.2
addons:
apt:
packages: [cabal-install-head, ghc-8.10.2]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=8.8.4
addons:
apt:
packages: [cabal-install-head, ghc-8.8.4]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=8.6.5
addons:
apt:
packages: [cabal-install-head, ghc-8.6.5]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=8.4.4
addons:
apt:
packages: [cabal-install-head, ghc-8.4.4]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=8.2.2
addons:
apt:
packages: [cabal-install-head, ghc-8.2.2]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=8.0.2
addons:
apt:
packages: [cabal-install-head, ghc-8.0.2]
sources: [hvr-ghc]
- env: CABALVER=head GHCVER=7.10.3
addons:
apt:
packages: [cabal-install-head, ghc-7.10.3]
sources: [hvr-ghc]
allow_failures:
- env: NGXVER=head CABALVER=head GHCVER=head
- env: NGXVER=head CABALVER=head GHCVER=8.10.2
- env: CABALVER=head GHCVER=head
before_install:
- |
set -e
export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
if [ -n "$NGXVER" ]
then
cpanm -v --notest --local-lib=~/perl5 local::lib Test::Nginx &&
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
export PATH=~/.cabal/bin:$PATH
fi
set +e
install:
- |
set -e
cabal --version
echo "$(ghc --version) "`
`"[$(ghc --print-project-git-commit-id 2>/dev/null || echo '?')]"
travis_retry cabal v1-update
cd haskell/ngx-export
cabal v1-install --only-dependencies
if [ -n "$NGXVER" ]
then
cd -
if [ "$NGXVER" == head ]
then
git clone https://github.com/nginx/nginx.git nginx-head
else
wget http://nginx.org/download/nginx-${NGXVER}.tar.gz &&
tar xzvf nginx-${NGXVER}.tar.gz
fi
git clone https://github.com/openresty/echo-nginx-module.git
cabal v1-install cpphs regex-pcre-builtin aeson bytestring safe
cd -
elif [ "$GHCVER" != "7.10.3" ]
then
cd -
cd haskell/ngx-export-tools
cabal v1-install --only-dependencies
cd -
cd haskell/ngx-export
fi
set +e
script:
- |
set -e
cabal v1-configure
cabal v1-build
cabal v2-sdist --builddir=dist
SRC_TGZ=$(cabal info . | awk '{print $2; exit}').tar.gz &&
(cd dist/sdist && cabal v1-install --force-reinstalls "$SRC_TGZ")
if [ -n "$NGXVER" ]
then
cd -
cd nginx-${NGXVER}/
if [ "$NGXVER" == head ]
then
NGX_CONFIGURE=./auto/configure
else
NGX_CONFIGURE=./configure
fi
$NGX_CONFIGURE --add-module=.. --add-module=../echo-nginx-module
make -j2
export PATH=$(pwd)/objs:$PATH
cd -
cd test
set +e
prove -r t-travis
elif [ "$GHCVER" != "7.10.3" ]
then
cd -
cd haskell/ngx-export-tools
cabal v1-configure
cabal v1-build
cabal v2-sdist --builddir=dist
SRC_TGZ=$(cabal info . | awk '{print $2; exit}').tar.gz &&
(cd dist/sdist && cabal v1-install --force-reinstalls "$SRC_TGZ")
fi
set +e