Skip to content
29 changes: 9 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
language: node_js
dist: trusty
sudo: required

git:
submodules: false
# subtree now

env:
- BS_TRAVIS_CI=1
node_js:
- 6

# script: npm run coveralls
# if we turn on this script, we should make
# sure `npm test` is executed
#
# - 6
# This delays notification

# Not a very reliable service..

# FIXME: instrumentation takes too much time
services:
- docker

before_install:
- docker pull phusion/holy-build-box-64:latest

script:
- docker run -t -i --rm -v ${TRAVIS_BUILD_DIR}:/io phusion/holy-build-box-64:latest bash /io/scripts/linux-build-helper.sh
20 changes: 16 additions & 4 deletions scripts/linux-build-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,39 @@ set -ex
################################################################

# install zip in order to create the zip package later
yum install -y zip
yum install -y zip unzip

# activate the Holy Build Box environment.
source /hbb/activate

# build ocaml
cd /io/vendor/ocaml
DIRNAME=`pwd` /io/vendor/ocaml/configure -prefix `pwd` -no-ocamldoc -no-ocamlbuild -no-curses -no-graph -no-debugger
DIRNAME=`pwd` /io/vendor/ocaml/configure -prefix `pwd` -cc "gcc -fPIC" -aspp "gcc -c -fPIC" -no-ocamldoc -no-ocamlbuild -no-curses -no-graph -no-debugger
make -j9 world.opt
make install
mkdir -p $DIRNAME/lib/ocaml/caml
make -C otherlibs/systhreads
cp otherlibs/systhreads/threads.h $DIRNAME/lib/ocaml/caml/threads.h

# get cppo
curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip
unzip /cppo.zip -d /
mv /cppo-windows /cppo
# dumb hack for now
cp /io/vendor/ocaml/ocamlopt.opt /io/vendor/ocaml/ocamlopt.opt.exe
PATH=/io/vendor/ocaml:/io/vendor/ocaml/bin:$PATH make -C /cppo
cp /cppo/src/cppo.exe /cppo/cppo

# copy ninja binary
cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe

# build bsc/bsb
cd /io
PATH=/io/vendor/ocaml:$PATH make
PATH=/io/vendor/ocaml:$PATH make install
PATH=/io/vendor/ocaml:/cppo:$PATH make
PATH=/io/vendor/ocaml:/cppo:$PATH make install

# copy refmt3 for now
cp lib/refmt.exe lib/refmt3.exe

# create zip package
rm -f bsb-native-linux-2.1.1.zip
Expand Down