diff --git a/.travis.yml b/.travis.yml index 118614210..e6549e648 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 560739866..267c7bd33 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -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