forked from heidihoward/ocaml-raft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.sh
52 lines (39 loc) · 1.48 KB
/
travis.sh
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
#!/usr/bin/env bash
case "$OCAML_VERSION,$OPAM_VERSION" in
4.00.1,1.0.0) ppa=avsm/ocaml40+opam10 ;;
4.00.1,1.1.0) ppa=avsm/ocaml40+opam11 ;;
4.01.0,1.0.0) ppa=avsm/ocaml41+opam10 ;;
4.01.0,1.1.0) ppa=avsm/ocaml41+opam11 ;;
4.01.0,1.2.0) ppa=avsm/ocaml41+opam12 ;;
4.02.0,1.1.0) ppa=avsm/ocaml42+opam11 ;;
4.02.0,1.2.0) ppa=avsm/ocaml42+opam12 ;;
*) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;;
esac
echo "yes" | sudo add-apt-repository ppa:$ppa
sudo apt-get update -qq
sudo apt-get install -qq ocaml ocaml-native-compilers camlp4-extra opam
export OPAMYES=1
opam init
opam install core ounit yojson js_of_ocaml
eval `opam config env`
git clone https://github.com/heidi-ann/ocaml-raft-data.git ../ocaml-raft-data
# spl
# git clone https://github.com/avsm/melange.git
# cd melange/tools/spl
# make all
# cd ~
# build ocaml-raft
make
# testing ocaml-raft
./config.byte
./jparser.byte
./cmdstart.byte -termOnClient -nodes 2 -follower Uniform-150-300 -candidate Fixed-50 -leader Fixed-50 -delay Fixed-6 -failure Uniform-400-500 -recover Uniform-5-10 -d > output.log
./cmdstart.byte -nodes 30 -follower Uniform-150-155 -candidate Uniform-11-22 -leader Fixed-75 -delay Fixed-7 -termOnTimeout 50000 -termOnElec -cmds 0 -backoff -d > output.log
./cmdstart.byte -termOnClient -nodes 5 -follower Uniform-150-300 -candidate Uniform-150-300 -leader Fixed-75 -delay Normal-7-3 -d > output.log
# testing js
cd js
./get_core_kernel_js.sh
./build.sh
# unit testing
# ./test_splaytree.byte
# ./test_spl.byte