-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
57 lines (47 loc) · 1.75 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
os: linux
dist: bionic
language: shell
services:
- docker
env:
global:
- NJOBS="2"
- CONTRIB_NAME="demo"
jobs:
# TODO: remove unneeded versions below
# - COQ_IMAGE="coqorg/coq:8.4"
# - COQ_IMAGE="coqorg/coq:8.5"
# - COQ_IMAGE="coqorg/coq:8.6"
# - COQ_IMAGE="coqorg/coq:8.7"
# - COQ_IMAGE="coqorg/coq:8.8"
# - COQ_IMAGE="coqorg/coq:8.9"
# - COQ_IMAGE="coqorg/coq:8.10"
- COQ_IMAGE="coqorg/coq:8.11"
- COQ_IMAGE="coqorg/coq:dev"
# All these images contain $COMPILER as default switch.
# This example uses $COMPILER_EDGE => see command "opam switch" below
# and https://github.com/coq-community/docker-coq/wiki#supported-tags
install: |
# Prepare the COQ container
docker pull ${COQ_IMAGE}
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${CONTRIB_NAME} -w /home/coq/${CONTRIB_NAME} ${COQ_IMAGE}
docker exec COQ /bin/bash --login -c "
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '; set -ex
if [ -n \"\${COMPILER_EDGE}\" ]; then opam switch \${COMPILER_EDGE}; eval \$(opam env); fi
opam update -y
# TODO: remove/specify dependencies below
opam install -y -v -j ${NJOBS} coq-mathcomp-ssreflect
opam config list; opam repo list; opam list
" install
script:
- echo -e "${ANSI_YELLOW}Building ${CONTRIB_NAME}...${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/coq/${CONTRIB_NAME}
# TODO: update configuration/build step below
( coq_makefile -f _CoqProject -o Makefile && make -j ${NJOBS} && make install )
" script
- echo -en 'travis_fold:end:script\\r'
after_script:
- docker stop COQ # optional but recommended