-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (52 loc) · 1.86 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
dist: trusty
sudo: required
language: generic
services:
- docker
env:
global:
- PACKAGE_NAME="coq-bonsai"
matrix:
- COQ_IMAGE="coqorg/coq:8.4" SHOULD_SUPPORT="false"
- COQ_IMAGE="coqorg/coq:8.5" SHOULD_SUPPORT="false"
- COQ_IMAGE="coqorg/coq:8.6" SHOULD_SUPPORT="false"
- COQ_IMAGE="coqorg/coq:8.7" SHOULD_SUPPORT="false"
- COQ_IMAGE="coqorg/coq:8.8" SHOULD_SUPPORT="true"
- COQ_IMAGE="coqorg/coq:8.9" SHOULD_SUPPORT="true"
- COQ_IMAGE="coqorg/coq:8.10" SHOULD_SUPPORT="true"
install: |
# Prepare the COQ container
docker pull ${COQ_IMAGE}
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/project -w /home/project ${COQ_IMAGE}
docker exec COQ /bin/bash --login -c "
# This bash script is double-quoted to interpolate Travis CI env vars:
echo \"Build triggered by ${TRAVIS_EVENT_TYPE}\"
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
set -ex # -e = exit on failure; -x = trace for debug
opam update
opam pin add ${PACKAGE_NAME}.opam . --kind=path --no-action -y
opam config list
opam repo list
opam pin list
opam list
" install
script:
- echo -e "${ANSI_YELLOW}Building...${ANSI_RESET}" && echo -en 'travis_fold:start:script\\r'
- |
docker exec COQ /bin/bash --login -c "
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '
set -ex
sudo chown -R coq:coq /home/project
# Check if the package is compatible with the current environment
if [ "${SHOULD_SUPPORT}" = "true" ] || opam install ${PACKAGE_NAME} --show-action; then
# First install the dependencies
opam install ${PACKAGE_NAME} --deps-only -y
opam list
# Then install the package itself in verbose mode
opam install ${PACKAGE_NAME} -v
# Check that the binary is installed
which coq-bonsai
fi;
" script
- docker stop COQ # optional
- echo -en 'travis_fold:end:script\\r'