Skip to content

Commit

Permalink
Adding Travis build and test of ml-proto.
Browse files Browse the repository at this point in the history
  • Loading branch information
flagxor committed Aug 24, 2015
1 parent 521cfa2 commit 8a4286d
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/*~
**/*.tmproj
_build
_build
ml-proto/ocaml
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: c++

sudo: off

install: ./ml-proto/travis/install-ocaml.sh

script: ./ml-proto/travis/build-test.sh

os:
- linux
- osx
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/WebAssembly/spec.svg?branch=master)](https://travis-ci.org/WebAssembly/spec)

# spec

This repository holds the official specifications and reference implementations
Expand Down
24 changes: 24 additions & 0 deletions ml-proto/travis/build-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e
set -x

# Move to a location relative to the script so it runs
# from anywhere.
cd $(dirname ${BASH_SOURCE[0]})/..

export PATH=$PWD/ocaml/install/bin:$PATH

cd src

make clean
rm -f lexer.ml
rm -f parser.ml
rm -f parser.mli

ocamlbuild -libs bigarray main.native
make

cd ..

./runtests.py
18 changes: 18 additions & 0 deletions ml-proto/travis/install-ocaml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e

# Move to a location relative to the script so it runs
# from anywhere.
cd $(dirname ${BASH_SOURCE[0]})/..

rm -rf ocaml
mkdir ocaml
cd ocaml
curl http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.2.tar.gz -O
tar xfz ocaml-4.02.2.tar.gz
cd ocaml-4.02.2
./configure -prefix $PWD/../install
make world.opt
mkdir ../install
make install

0 comments on commit 8a4286d

Please sign in to comment.