-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
81 lines (71 loc) · 2.25 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
dist: bionic
language: minimal
services:
- docker
env:
global:
- NJOBS="2"
- CONTRIB_NAME="dot-iris"
- OPAM_NAME="dot-iris-builddep"
matrix:
- COQ_IMAGE="blaisorblade/docker-dot-iris:coq-8.13.0-iris-2021-01-12.0.bbaf3eaf"
# this config uses: $COMPILER_EDGE (cf. "opam switch" command below)
# See https://github.com/coq-community/docker-coq/wiki#supported-tags
before_install: |
export -f travis_fold
export -f travis_time_start
export -f travis_time_finish
do_travis() {
travis_fold start "$1"
travis_time_start
docker exec COQ /bin/bash --login -c "
export PS4='+ \e[33;1m(\$0 @ line \$LINENO) \$\e[0m '; set -ex
$2" "$1"
ret=$?
travis_time_finish
travis_fold end "$1"
return $ret
}
export -f do_travis
install: |
set -e
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Download the COQ container
docker pull ${COQ_IMAGE}
# Start the COQ container
docker run -d -i --init --name=COQ -v ${TRAVIS_BUILD_DIR}:/home/coq/${CONTRIB_NAME} -w /home/coq/${CONTRIB_NAME} ${COQ_IMAGE}
# Prepare the COQ container
do_travis "update" "
if [ -n \"\${COMPILER_EDGE}\" ]; then opam switch \${COMPILER_EDGE}; eval \$(opam env); fi
opam update -y
opam pin add -y -n -k path $OPAM_NAME ."
#
# Likely redundant, except during upgrades
do_travis "deps" "opam install -y -v -j ${NJOBS} --deps-only $OPAM_NAME"
do_travis "settings" "opam config list; opam repo list; opam list"
script:
- echo -e "${ANSI_YELLOW}Building ${CONTRIB_NAME}...${ANSI_RESET}"
- |
do_travis "script" "
sudo chown -R coq:coq /home/coq/${CONTRIB_NAME}
make -k -j ${NJOBS} TIMED=1
make html"
after_script:
- docker stop COQ # optional but recommended
- docker logout
- rm -f /home/travis/.docker/config.json
deploy:
edge: true # https://docs.travis-ci.com/user/deployment-v2
provider: pages
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
repo: dot-iris/dot-iris.github.io
target_branch: master
keep_history: true
# keep_history: false
allow_empty_commit: true
verbose: true
local_dir: website
# cleanup: false
on:
branch: master
commit_message: Deploy %{project_name}@%{git_sha} to %{url}:%{target_branch}