From 8a4286d194e228bbfff683e4a434063cc621507f Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sun, 23 Aug 2015 09:20:25 -0700 Subject: [PATCH] Adding Travis build and test of ml-proto. --- .gitignore | 3 ++- .travis.yml | 11 +++++++++++ README.md | 2 ++ ml-proto/travis/build-test.sh | 24 ++++++++++++++++++++++++ ml-proto/travis/install-ocaml.sh | 18 ++++++++++++++++++ 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100755 ml-proto/travis/build-test.sh create mode 100755 ml-proto/travis/install-ocaml.sh diff --git a/.gitignore b/.gitignore index afa09f7c4c..fa25ff72ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ **/*~ **/*.tmproj -_build \ No newline at end of file +_build +ml-proto/ocaml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..395e7ba711 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 3f85ccc624..227b73b03c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/ml-proto/travis/build-test.sh b/ml-proto/travis/build-test.sh new file mode 100755 index 0000000000..4156f1c83b --- /dev/null +++ b/ml-proto/travis/build-test.sh @@ -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 diff --git a/ml-proto/travis/install-ocaml.sh b/ml-proto/travis/install-ocaml.sh new file mode 100755 index 0000000000..a1bac07f77 --- /dev/null +++ b/ml-proto/travis/install-ocaml.sh @@ -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