forked from OCamlPro/alt-ergo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
164 lines (155 loc) · 5.65 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# ocaml is not a recognized language by travis, and using it
# make travis default to ruby, whose setup is a bit time-consuming.
# Hence, we currently use c given it's the most lightweight
# in terms of language setup for the VMs.
language: c
# Cache the opam directory to avoid re-compiling the compiler
cache:
directories:
- $HOME/.opam
# System dependencies
addons:
apt:
sources:
- avsm
packages:
- opam>=2
- asciidoc
- libgmp-dev
- libgtksourceview2.0-dev
- zlib1g-dev
- libgtk2.0-dev
- libexpat1-dev
# Global environment variables
env:
global:
- LOCAL_INSTALL_DIR=${HOME}/local
# Prepare the opam switch and pin some needed repos
before_install:
- git status
# Create local install dir and add it to path
- mkdir -p ${LOCAL_INSTALL_DIR}
- export PATH=$PATH:${LOCAL_INSTALL_DIR}/bin
# Some opam boilerplate
- export OPAMYES=1
- export OPAMJOBS=2
# Init opam, and the default switch with the right ocaml version
- opam init --disable-sandboxing --compiler=${OCAML_VERSION}
- eval `opam config env`
# Install odoc & ocp-indent
- opam install odoc ocp-indent.1.8.1
# Set the verbose option *after* compiling the compiler
# and installing odoc, else the log oveflows
- export OPAMVERBOSE=1
# Install dependencies
install:
- opam pin add --no-action .
- opam install --deps-only alt-ergo-lib alt-ergo-parsers alt-ergo altgr-ergo ||
( opam update && opam install --deps-only alt-ergo-lib alt-ergo-parsers alt-ergo altgr-ergo )
# Remove source pins before the cache is updated, to avoid
# having the alt-ergo sources in the cache
before_cache:
- opam uninstall alt-ergo-lib alt-ergo-parsers alt-ergo altgr-ergo
- opam pin remove alt-ergo-lib alt-ergo-parsers alt-ergo altgr-ergo
# Order stages to test style and indent first,
# then run non-regression tests, and finally,
# build the doc and push it to gh-pages
stages:
- pre-check
- test
- documentation
jobs:
include:
# === Pre-check stage ===
- stage: "pre-check"
# style check
name: "Style check"
script: rsc/extra/check_style.sh
env: OPAMBUILDTEST=false OCAML_VERSION=4.04.2
# indentation check
- stage: "pre-check"
name: "Indent check"
script: rsc/extra/check_indentation.sh
env: OPAMBUILDTEST=false OCAML_VERSION=4.04.2
# === Build Tests ===
# Installation (no tests)
- stage: "test"
name: "install (no tests)"
script: rsc/extra/travis_install_test.sh
env: OPAMBUILDTEST=false OCAML_VERSION=4.04.2
# Installation (with tests)
- stage: "test"
name: "install (with tests)"
script: rsc/extra/travis_install_test.sh
env: OPAMBUILDTEST=true OCAML_VERSION=4.04.2
# Non-regression tests
- stage: "test"
name: "non-regression (4.04.2)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.04.2
- stage: "test"
name: "non-regression (4.04.2+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.04.2+flambda
- stage: "test"
name: "non-regression (4.05.0)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.05.0
- stage: "test"
name: "non-regression (4.05.0+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.05.0+flambda
- stage: "test"
name: "non-regression (4.06.1)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.06.1
- stage: "test"
name: "non-regression (4.06.1+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.06.1+flambda
- stage: "test"
name: "non-regression (4.07.1)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.07.1
- stage: "test"
name: "non-regression (4.07.1+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.07.1+flambda
- stage: "test"
name: "non-regression (4.08.1)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.08.1
- stage: "test"
name: "non-regression (4.08.1+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.08.1+flambda
- stage: "test"
name: "non-regression (4.09.1)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.09.1
- stage: "test"
name: "non-regression (4.09.1+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.09.1+flambda
- stage: "test"
name: "non-regression (4.10.0)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.10.0
- stage: "test"
name: "non-regression (4.10.0+flambda)"
script: rsc/extra/travis_local_test.sh ${LOCAL_INSTALL_DIR}
env: OPAMBUILDTEST=true OCAML_VERSION=4.10.0+flambda
# === Doc stage ===
# Next branch (upload doc in gh-pages)
- stage: "documentation"
name: "doc build && dev upload"
script: rsc/extra/travis_doc_test.sh
before_deploy: ./rsc/extra/deploy_doc.sh dev
env: OPAMBUILDTEST=false OCAML_VERSION=4.04.2
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: next