Created
August 18, 2014 22:26
-
-
Save herry13/b6ed811709f8a3f0619c to your computer and use it in GitHub Desktop.
Shell script for building and testing an OCaml project in Travis-CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ####################################### | |
| # | |
| # Bash script file for travis-ci.org. | |
| # | |
| ####################################### | |
| OPAM_DEPENDS="ocamlfind yojson" | |
| case "$OCAML_VERSION,$OPAM_VERSION" in | |
| 3.12.1,1.0.0) ppa=avsm/ocaml1312+opam10 ;; | |
| 3.12.1,1.1.0) ppa=avsm/ocaml1312+opam11 ;; | |
| 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 ;; | |
| *) echo Unknown $OCAML_VERSION,$OPAM_VERSION; exit 1 ;; | |
| esac | |
| # install ocaml ubuntu package | |
| 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 ${OPAM_DEPENDS} | |
| eval `opam config env` | |
| # build csfp | |
| cd ocaml | |
| make | |
| # run test | |
| make test |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This requires file
.travis.ymlto be added to the project's root directory.