Skip to content

Commit

Permalink
Enable travis
Browse files Browse the repository at this point in the history
  • Loading branch information
adeboyed authored Oct 18, 2018
1 parent c5ef7b2 commit 674680f
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 25 deletions.
20 changes: 20 additions & 0 deletions .travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
set -e

OPAM_DEPENDS="ocamlfind ounit"

echo "yes" | sudo add-apt-repository ppa:avsm/ocaml42+opam12
sudo apt-get update -qq
sudo apt-get install -qq ocaml-nox ocaml-native-compilers camlp4-extra opam libgsl0-dev libshp-dev libplplot-dev
export OPAMYES=1
export OPAMVERBOSE=1
echo OCaml version
ocaml -version
echo OPAM versions
opam --version
opam --git-version

opam init
opam install ${OPAM_DEPENDS}
eval `opam config env`
make
# make test
21 changes: 10 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
language: c
sudo: required

install:
- wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-opam.sh

script:
- bash -ex .travis-opam.sh

env:
- OCAML_VERSION=4.07

script:
- bash -ex .travis.sh
os:
- linux
- linux
deploy:
provider: releases
api_key:
secure: cYtbDIt1q/ed158bqEL7yf0A1eRiPrJTpBCX1/jC1gKqkg9g24pyiyaKxtJS+PRD1uuv8DBnknkZFrVIpB8ftes5YqvZyppT3PaKWMpfxbNpY95DcWhWSqsr1094OOzGbuyXCByMOVHMmIIFq2u65BgDazQ47ZSxekimgZVBjoOPVXC2lkyCWrQPlw9ZU8lG1FZ2ES0OevUnnDewcSJIxDp3nNNOZSUZFMK5NWu3yM+E50y6blZd2vSb238m0wMp5r1oaovGy8zr+/YGi36iFPnNSzD3yPfXFRNnnEi806pmA3gedB8pC1TrAP0qrPFrAnKPSTDrdALTzj6SKUkXfr/JaDIznlNJaaZB8yqx1Hc5LFmBqDbBwjrKbQA0eYii/E+FNtACppGeDUD2JqA9rfVHHqwXaSCWqCERw1U+aqr44JfuiOmqXIjnY0LkPTqYprcWZpqUhBEctcNUx0B6NwrFKhpOiTdySaCwx42gqwBYZm9T9rkr9IUjs88BMbPe1qacw3utfzUbGS663/f5ptX+BShwBWV1zMMqeEWlyfXGIVWD2KiNl2GIXSVdASx/DdwBVqhc9Smdm8WWiZDy+XECDXTFmN7N935lfhY0XM3T5VYWfHjg+/QXuGMCpiIwYkH0ChLdMRCGKojwhKD7OWbmvPTDKBBAu9A41KGF1iI=
file: _build/src/main/Parliament.cmx
on:
branch: master
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ LIBS=owl
DOCFILE=Parliament

# Where everything is stored
SRCDIR=src
DOCDIR=docs
SRCDIR=src/main
BUILDDIR=_build

# Path separator for the current platform.
Expand All @@ -22,15 +21,10 @@ BUILDDIR=_build
# Uncomment the next line for UNIX platforms.
/=/

# Symbolic links created by this Makefile (DO NOT EDIT).
SYMLINKS=$(PROGRAM) $(PROGRAM).byte $(DOCDIR)

all: byte native
docs:
$(BUILDER) $(SRCDIR)$/$(DOCFILE).docdir/index.html -I $(SRCDIR) -build-dir $(BUILDDIR)
byte:
$(BUILDER).byte $(SRCDIR)$/$(PROGRAM).byte -use-ocamlfind
$(BUILDER).byte $(SRCDIR)$/$(PROGRAM).cma -use-ocamlfind
native:
$(BUILDER).native $(SRCDIR)$/$(PROGRAM).native -use-ocamlfind
$(BUILDER).native $(SRCDIR)$/$(PROGRAM).cmxa -use-ocamlfind
clean:
$(BUILDER) -clean -build-dir $(BUILDDIR)
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Parliament
Parliament

https://travis-ci.com/adeboyed/Parliament.svg?token=5Vp3phxq7vtDBfGmVxmm&branch=master


3 changes: 2 additions & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<*.ml> or "prog.byte": package(owl), package(num)
"src/main/Worker": include
<*.ml> or "prog.byte": package(num)
1 change: 0 additions & 1 deletion src/Parliament.odocl

This file was deleted.

3 changes: 1 addition & 2 deletions src/Parliament.ml → src/main/Parliament.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
* Parliament - A distributed general-purpose cluster-computing framework for OCaml
* Copyright (c) 2018-2019 David Adeboye <[email protected]>
*)

print_string "Hello world!\n";;

module Worker = Parliament_worker
2 changes: 2 additions & 0 deletions src/main/Parliament.mllib
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Worker/Parliament_worker
Parliament
2 changes: 2 additions & 0 deletions src/main/Parliament.odocl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Parliament
Parliament_worker
9 changes: 9 additions & 0 deletions src/main/Worker/Parliament_worker.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(*
* Parliament - A distributed general-purpose cluster-computing framework for OCaml
* Copyright (c) 2018-2019 David Adeboye <[email protected]>
*)


module Parliament_worker = struct
let empty = []
end
10 changes: 10 additions & 0 deletions src/tests/ParliamentTest.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
open OUnit2
open Parliament

let tests = "test suite for sum" >::: [
"empty" >:: (fun _ -> assert_equal 0 (sum []));
"one" >:: (fun _ -> assert_equal 1 (sum [1]));
"onetwo" >:: (fun _ -> assert_equal 3 (sum [1; 2]));
]

let _ = run_test_tt_main tests

0 comments on commit 674680f

Please sign in to comment.