-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
.travis.yml
123 lines (116 loc) · 3.73 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
language: c
dist: xenial
cache:
apt: true
directories:
- $HOME/.mine
- $HOME/.opam
- $HOME/.local
- $HOME/.pyenv
- $HOME/Library/Caches/Homebrew
addons:
apt:
packages:
- m4
- git
- rsync
- aspcud
- libffi-dev
- libgmp-dev
- libzmq5-dev
env:
global:
- OPAM_PREFIX=$HOME/.mine
- OPAM_INIT_FLAGS='--disable-sandboxing'
- PATH=$PATH:$OPAM_PREFIX/bin:$HOME/.local/bin
- PYTHONUSERBASE=$HOME/.local
- PYTHONVERSION=3.6.1
- OPAM_VERSION=2.0.7
matrix:
include:
- os: linux
env: OCAML_VERSION=4.04.2 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.05.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.06.1 ARCHIMEDES=1 GIT_REMOTE_URL="https://akabe:$GITHUB_API_KEY@github.com/akabe/ocaml-jupyter"
- os: linux
env: OCAML_VERSION=4.07.1 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.08.1 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.09.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.10.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.11.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.12.0 ARCHIMEDES=1
- os: linux
env: OCAML_VERSION=4.13.0 ARCHIMEDES=1
# allow_failures:
# - os: linux
# env: OPAM_VERSION=2.0.4 OCAML_VERSION=4.09.0
# - os: linux
# env: OPAM_VERSION=2.0.4 OCAML_VERSION=4.10.0
before_script:
- eval "$(pyenv init -)"
- pyenv install --list
# for Mac OS X
- |
if which brew; then
brew update &&
brew unlink python &&
brew install m4 aspcud rsync libffi zeromq cairo
fi
# Install Python 3 and Jupyter
- pyenv install -s $PYTHONVERSION
- pyenv global $PYTHONVERSION
- pip install 'ipython>=7.0.0' jupyter
# Install OPAM and packages required for CI
- |
if ! which opam; then
mkdir -p "$OPAM_PREFIX/bin"
curl "https://github.com/ocaml/opam/releases/download/$OPAM_VERSION/opam-$OPAM_VERSION-$(uname -m)-$(uname -s)" \
-Lo "$OPAM_PREFIX/bin/opam"
chmod 755 "$OPAM_PREFIX/bin/opam"
opam init -a -y --bare ${OPAM_INIT_FLAGS:-}
opam switch create "$OCAML_VERSION" --repositories=default,beta=git://github.com/ocaml/ocaml-beta-repository.git
fi
- eval $(opam env)
- opam install -y ocamlfind 'merlin>=3.0.0' 'ounit>=2.0.0'
- opam remove -y jupyter # remove ocaml-jupyter package in cache (if it exists)
script:
# lint and code-format checks:
- ./git/pre-commit
- opam lint jupyter.opam
- opam lint jupyter-archimedes.opam
# installation
- opam pin add jupyter . -y --verbose
- opam info jupyter # package is installed.
- ocaml-jupyter-kernel --version # command is installed.
- ocamlfind query jupyter
- ocamlfind query jupyter.notebook
- ocamlfind query jupyter.comm
# unit tests
- dune runtest
# integration tests
- echo '#use "topfind" ;;' > $HOME/.ocamlinit
- ./config/ocaml-jupyter-opam-genspec
- jupyter kernelspec install --user --name ocaml-jupyter "$(opam config var share)/jupyter"
- dune build test/integration/runtest.exe
- ./_build/default/test/integration/runtest.exe test/integration/suite/jupyter-notebook.ml
- ./_build/default/test/integration/runtest.exe test/integration/suite/ppx.ml
# uninstallation
- opam remove jupyter -y --verbose
- (! ocamlfind query jupyter)
# Tests of jupyter-archimedes
- |
if [ "${ARCHIMEDES:-}" != "" ]; then
opam pin add jupyter-archimedes . -y --verbose
ocamlfind query jupyter-archimedes
./_build/default/test/integration/runtest.exe test/integration/suite/jupyter-archimedes.ml
opam remove jupyter-archimedes -y --verbose
fi
after_success: |
curl -sL https://gist.githubusercontent.com/akabe/24979afbf95c4cf4393f589cda997e1b/raw/update_gh-pages_dune.sh | sh -xeu