forked from aantron/bisect_ppx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
190 lines (173 loc) · 4.45 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
sudo: required
language: generic
scripts:
- &bucklescript
before_install:
- |
if [ "$TRAVIS_EVENT_TYPE" == cron ]
then
rm -rf ./test/bucklescript/node_modules
rm -rf ./node_modules
rm -rf ./_cache
fi
install:
- npm --version
- |
if [ "$TRAVIS_BRANCH" != binaries ]
then
WD=`pwd`
if [ ! -f node_modules/.bin/esy ]
then
npm install --no-save [email protected]
export PATH="$WD/node_modules/.bin:$PATH"
else
mkdir -p _wrapped_esy
ln -s $WD/node_modules/.bin/esy-solve-cudf _wrapped_esy/esy-solve-cudf
cp test/ci/travis-wrapped-esy.sh _wrapped_esy/esy
chmod a+x _wrapped_esy/esy
export PATH="$WD/_wrapped_esy:$PATH"
fi
fi
- make -C test/bucklescript clean-for-caching
- make -C test/bucklescript install
script:
- make -C test/bucklescript test
- |
if [ "$SAVE_BINARIES" == YES ]
then
if [ "$TRAVIS_BRANCH" == master ]
then
if [ "$TRAVIS_PULL_REQUEST" == false ]
then
bash ./test/ci/travis-binaries.sh
fi
fi
fi
before_cache:
- make -C test/bucklescript clean-for-caching
- &opam
before_install:
- '[ "$TRAVIS_EVENT_TYPE" != cron ] || rm -rf ~/.opam ~/.esy ./_opam'
install:
- mkdir -p _cache
- |
case $TRAVIS_OS_NAME in
"linux") OPAM_OS=linux;;
"osx") OPAM_OS=macos;;
esac
- OPAM_VERSION=2.0.6
- OPAM_PKG=opam-${OPAM_VERSION}-x86_64-${OPAM_OS}
- |
if [ ! -f _cache/opam ]
then
wget https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/${OPAM_PKG}
mv ${OPAM_PKG} _cache/opam
fi
- sudo cp _cache/opam /usr/local/bin/opam
- sudo chmod a+x /usr/local/bin/opam
- opam init -y --bare --disable-sandboxing --disable-shell-hook
- OPAM_FROM_CACHE=YES
- |
if [ ! -d _opam/bin ]
then
OPAM_FROM_CACHE=NO
rm -rf _opam
opam switch create . $COMPILER $REPOSITORIES --no-install
fi
- eval `opam config env`
- ocaml -version
- opam --version
- opam install -y --with-test --deps-only .
- opam list
script:
- |
if [ -d _cache/_build ]
then
cp -r _cache/_build .
fi
- make build
- (unset TRAVIS && unset TRAVIS_JOB_ID && make test)
- |
if [ ! -d _cache/_build ]
then
cp -r _build _cache
fi
- |
if [ "$USAGE_TEST" == YES ]
then
opam install -y reason
opam install -y js_of_ocaml
make clean-usage usage
fi
- |
if [ "$SELF_COVERAGE" == YES ]
then
(unset TRAVIS && unset TRAVIS_JOB_ID && make self-coverage)
(cd _self && \
_build/install/default/bin/meta-bisect-ppx-report \
send-to Coveralls bisect*.meta)
fi
before_cache:
- opam clean
matrix:
include:
- <<: *bucklescript
os: osx
env: BUCKLESCRIPT=YES SAVE_BINARIES=YES
- <<: *bucklescript
os: linux
env: BUCKLESCRIPT=YES SAVE_BINARIES=YES
- <<: *opam
os: osx
env: COMPILER=4.11.1
- <<: *opam
os: freebsd
env: COMPILER=4.11.1
- <<: *opam
os: linux
env: COMPILER=4.11.1
- <<: *opam
os: linux
env: COMPILER=4.10.1
- <<: *opam
os: linux
env: COMPILER=4.09.0
- <<: *opam
os: linux
env: COMPILER=4.08.1 SELF_COVERAGE=YES
- <<: *opam
os: linux
env: COMPILER=4.07.1 USAGE_TEST=YES
- <<: *opam
os: linux
env: COMPILER=4.06.1
- <<: *opam
os: linux
env: COMPILER=4.05.0
- <<: *opam
os: linux
env: COMPILER=4.04.2
- <<: *opam
os: linux
env: COMPILER=4.03.0
- <<: *opam
os: linux
env: COMPILER=4.02.3
allow_failures:
- env: COMPILER=4.10.1
- env: COMPILER=4.09.0
- env: COMPILER=4.08.1 SELF_COVERAGE=YES
- env: COMPILER=4.07.1 USAGE_TEST=YES
- env: COMPILER=4.06.1
- env: COMPILER=4.05.0
- env: COMPILER=4.04.2
- env: COMPILER=4.03.0
fast_finish: true
cache:
directories:
- $HOME/.opam
- ./_opam
- $HOME/.esy
- ./test/bucklescript/node_modules
- ./node_modules
- ./_cache