forked from rocq-archive/coq-serapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (67 loc) · 2.13 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
dist: xenial
sudo: required
language: c
branches:
only:
- v8.8
- v8.9
- v8.10
cache:
apt: true
directories:
- $HOME/.opam
addons:
apt:
packages:
- gcc-multilib
env:
global:
- OPAMJOBS="2"
- OPAMROOTISOK="true"
- OPAMYES="true"
- NJOBS="2"
- COQ_REPOS="https://github.com/coq/coq.git"
- COQ_VERSION="v8.10"
- COQ_BRANCH="v8.10"
- COQ_CONF="-local -native-compiler no -coqide no"
- COMPILER="4.07.1"
# Main test suites
- SERAPI_COQ_HOME="$HOME/coq-$COQ_VERSION/"
matrix:
- TEST_TARGET="build" COMPILER="4.07.0"
- TEST_TARGET="test" COMPILER="4.07.1"
- TEST_TARGET="js-dune" COMPILER="4.07.1+32bit" EXTRA_OPAM="js_of_ocaml js_of_ocaml-lwt"
# Don't test opam in 8.10 [yet]
# - TEST_TARGET="test" EXTRA_OPAM="coq"
install:
- sudo curl -sL https://github.com/ocaml/opam/releases/download/2.0.4/opam-2.0.4-x86_64-linux -o /usr/bin/opam
- sudo chmod 755 /usr/bin/opam
- opam init -c "$COMPILER" --disable-sandboxing
- opam switch set "$COMPILER"
- eval $(opam env)
# OPAM 2 seems quite broken here
- opam config set-global jobs $NJOBS
- opam pin add -y -n --kind=path coq-serapi .
- opam install -y --deps-only -j $NJOBS coq-serapi
- opam pin remove coq-serapi
- opam list
- >
if [[ -v SERAPI_COQ_HOME ]]; then
git clone --depth=3 -b "$COQ_BRANCH" "$COQ_REPOS" "$HOME/coq-$COQ_VERSION" &&
pushd "$HOME/coq-$COQ_VERSION" &&
make -f Makefile.dune coq &&
popd;
PATH="$HOME/coq-$COQ_VERSION/_build/install/default/bin":$PATH &&
git clone --depth=3 -b master https://github.com/math-comp/math-comp.git &&
pushd math-comp/mathcomp/ssreflect &&
make && make install &&
popd;
fi
- if [[ -v EXTRA_OPAM ]]; then opam install --ignore-constraints-on=coq $EXTRA_OPAM; fi
script:
- set -e
- echo 'Building SerAPI...' && echo -en 'travis_fold:start:serapi.build\\r'
- make -j "$NJOBS" SERAPI_COQ_HOME="$SERAPI_COQ_HOME/_build/install/default/lib/" "$TEST_TARGET"
- ls -lR _build/install/default/ || true
- ls -lR _build/default/sertop/*.js || true
- echo -en 'travis_fold:end:serapi.build\\r'