forked from coq-community/chapar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (64 loc) · 1.98 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
os: linux
dist: bionic
language: shell
.opam: &OPAM
language: shell
services: docker
install: |
# Prepare the COQ container
docker pull ${COQ_IMAGE}
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${PACKAGE} -w /home/coq/${PACKAGE} ${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 -y
opam pin add ${PACKAGE} . -y -n -k path
opam install ${PACKAGE} -y -j ${NJOBS} --deps-only
opam config list
opam repo list
opam list
"
script:
- echo -e "${ANSI_YELLOW}Building ${PACKAGE}...${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/${PACKAGE}
opam install ${PACKAGE} -v -y -j ${NJOBS}
"
- docker stop COQ # optional
- echo -en 'travis_fold:end:script\\r'
.nix: &NIX
language: nix
script:
- nix-build --argstr coq-version-or-url "$COQ" --extra-substituters https://coq.cachix.org --trusted-public-keys "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= coq.cachix.org-1:5QW/wwEnD+l2jvN6QRbRRsa4hBHG3QiQQ26cxu1F5tI="
jobs:
include:
# Test supported versions of Coq via Nix
- env:
- COQ=https://github.com/coq/coq-on-cachix/tarball/master
<<: *NIX
- env:
- COQ=8.11
<<: *NIX
- env:
- COQ=8.10
<<: *NIX
- env:
- COQ=8.9
<<: *NIX
# Test supported versions of Coq via OPAM
- env:
- COQ_IMAGE=coqorg/coq:dev
- PACKAGE=coq-chapar.dev
- NJOBS=2
<<: *OPAM
# Test extracted supported versions of Coq via OPAM
- env:
- COQ_IMAGE=coqorg/coq:dev
- PACKAGE=chapar-kv-stores.dev
- NJOBS=2
<<: *OPAM