From 8d6ec2660cbd2fbab91f6cf74e40e5999ac0231b Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Wed, 11 Jul 2018 11:32:11 -0700 Subject: [PATCH 01/16] Update .travis.yml --- .travis.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index 118614210..0ecb7f5e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,10 @@ -language: node_js +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 From 88df4425ed2b6b4a4e0260602161dc2489d2a738 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Wed, 11 Jul 2018 11:54:25 -0700 Subject: [PATCH 02/16] try to add cppo and fix some other stuff --- scripts/linux-build-helper.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 560739866..bd2859b48 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -6,14 +6,20 @@ 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 +# get cppo +mkdir /cppo +curl https://github.com/bsansouci/cppo/archive/windows.zip -o /cppo/cppo.zip +unzip /cppo/cppo.zip -d /cppo +make -C /cppo + # 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 @@ -25,8 +31,11 @@ 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 From 1eff43cf1cb890739f06c1920518db58b26527ce Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Wed, 11 Jul 2018 11:58:06 -0700 Subject: [PATCH 03/16] Update linux-build-helper.sh --- scripts/linux-build-helper.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index bd2859b48..3a3b03df5 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -13,8 +13,9 @@ source /hbb/activate # get cppo mkdir /cppo -curl https://github.com/bsansouci/cppo/archive/windows.zip -o /cppo/cppo.zip -unzip /cppo/cppo.zip -d /cppo +curl https://github.com/bsansouci/cppo/archive/windows.zip -o /cppo.zip +ls / +unzip /cppo.zip -d /cppo make -C /cppo # build ocaml From b44e197436c7a1de70d3b038c33decffefbe0d6a Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Wed, 11 Jul 2018 12:09:15 -0700 Subject: [PATCH 04/16] Maybe wget will behave better --- scripts/linux-build-helper.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 3a3b03df5..966783fc4 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -12,10 +12,9 @@ yum install -y zip unzip source /hbb/activate # get cppo -mkdir /cppo -curl https://github.com/bsansouci/cppo/archive/windows.zip -o /cppo.zip -ls / -unzip /cppo.zip -d /cppo +wget https://github.com/bsansouci/cppo/archive/windows.zip +unzip /windows.zip -d / +mv /cppo-windows /cppo make -C /cppo # build ocaml From 957a50068ef461dd936033a1482166c50e59403e Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Wed, 11 Jul 2018 12:12:48 -0700 Subject: [PATCH 05/16] install wget I guess --- scripts/linux-build-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 966783fc4..3bba1185c 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -6,7 +6,7 @@ set -ex ################################################################ # install zip in order to create the zip package later -yum install -y zip unzip +yum install -y zip unzip wget # activate the Holy Build Box environment. source /hbb/activate From 153b12a1626bd038c3d662b7ed8579c3821f33f6 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Wed, 11 Jul 2018 12:16:05 -0700 Subject: [PATCH 06/16] ??? https://elixirforum.com/t/if-youre-using-travis-ci-you-probably-want-to-read-this/4915/2 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0ecb7f5e5..e6549e648 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty sudo: required services: From 349c04cc8a1eb70f5112e7d3eb2807639409b6e9 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 01:03:23 -0700 Subject: [PATCH 07/16] try curl again was being dumb, need redirect --- scripts/linux-build-helper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 3bba1185c..2eb8c3db2 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -6,14 +6,14 @@ set -ex ################################################################ # install zip in order to create the zip package later -yum install -y zip unzip wget +yum install -y zip unzip # activate the Holy Build Box environment. source /hbb/activate # get cppo -wget https://github.com/bsansouci/cppo/archive/windows.zip -unzip /windows.zip -d / +curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o cppo.zip +unzip /cppo.zip -d / mv /cppo-windows /cppo make -C /cppo From aa1c493750ab4e1142fb242a4f659c6fba7f23bf Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 01:26:47 -0700 Subject: [PATCH 08/16] use ocaml to build cppo --- scripts/linux-build-helper.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 2eb8c3db2..c1493b829 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -11,12 +11,6 @@ yum install -y zip unzip # activate the Holy Build Box environment. source /hbb/activate -# get cppo -curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o cppo.zip -unzip /cppo.zip -d / -mv /cppo-windows /cppo -make -C /cppo - # build ocaml cd /io/vendor/ocaml 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 @@ -26,6 +20,12 @@ 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 +PATH=/io/vendor/ocaml:$PATH make -C /cppo + # copy ninja binary cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe From 2c55b2e7d2459768488c5c22abf524e6433e8716 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 10:48:11 -0700 Subject: [PATCH 09/16] Didn't realize I was cd-ing --- scripts/linux-build-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index c1493b829..36332d563 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -21,7 +21,7 @@ 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 +curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip unzip /cppo.zip -d / mv /cppo-windows /cppo PATH=/io/vendor/ocaml:$PATH make -C /cppo From 1290f18278cb6db0b78c899465b79b1938eb4a90 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 10:53:39 -0700 Subject: [PATCH 10/16] Might be missing bin Not sure why this works later when we build bsb --- scripts/linux-build-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 36332d563..169ca2084 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -24,7 +24,7 @@ cp otherlibs/systhreads/threads.h $DIRNAME/lib/ocaml/caml/threads.h curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip unzip /cppo.zip -d / mv /cppo-windows /cppo -PATH=/io/vendor/ocaml:$PATH make -C /cppo +PATH=/io/vendor/ocaml:/io/vendor/ocaml/bin:$PATH make -C /cppo # copy ninja binary cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe From 9f9f10a10836dbdcd14845f2fe96c2cfeccc3347 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 12:01:32 -0700 Subject: [PATCH 11/16] Look for ocamlopt I guess --- scripts/linux-build-helper.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 169ca2084..879eb54e8 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -20,6 +20,8 @@ mkdir -p $DIRNAME/lib/ocaml/caml make -C otherlibs/systhreads cp otherlibs/systhreads/threads.h $DIRNAME/lib/ocaml/caml/threads.h +find /io/vendor/ocaml | grep ocamlopt + # get cppo curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip unzip /cppo.zip -d / From 74af9870ac9dee5ee4737ed39367bfc30fe3fe7e Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 12:08:54 -0700 Subject: [PATCH 12/16] dumb hack --- scripts/linux-build-helper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 879eb54e8..4a983c0c4 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -26,7 +26,9 @@ find /io/vendor/ocaml | grep ocamlopt curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip unzip /cppo.zip -d / mv /cppo-windows /cppo -PATH=/io/vendor/ocaml:/io/vendor/ocaml/bin:$PATH make -C /cppo +# dumb hack for now +cp /io/vendor/ocaml/ocamlopt.opt /io/vendor/ocaml/ocamlopt.opt.exe +PATH=/io/vendor/ocaml:$PATH make -C /cppo # copy ninja binary cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe From 22afb92ce70742f840e90cdd2dcb6751d77e3f35 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 12:45:38 -0700 Subject: [PATCH 13/16] try to add yacc and lex so close --- scripts/linux-build-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 4a983c0c4..ba925f264 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -20,7 +20,7 @@ mkdir -p $DIRNAME/lib/ocaml/caml make -C otherlibs/systhreads cp otherlibs/systhreads/threads.h $DIRNAME/lib/ocaml/caml/threads.h -find /io/vendor/ocaml | grep ocamlopt +find /io/vendor/ocaml | grep ocamllex # get cppo curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip @@ -28,7 +28,7 @@ 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:$PATH make -C /cppo +PATH=/io/vendor/ocaml:/io/vendor/ocaml/bin:$PATH make -C /cppo # copy ninja binary cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe From 6709779c4976d3168b66c365eca3f71796a8702d Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 12:56:16 -0700 Subject: [PATCH 14/16] dumb exes --- scripts/linux-build-helper.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index ba925f264..8fa7b83c4 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -20,8 +20,6 @@ mkdir -p $DIRNAME/lib/ocaml/caml make -C otherlibs/systhreads cp otherlibs/systhreads/threads.h $DIRNAME/lib/ocaml/caml/threads.h -find /io/vendor/ocaml | grep ocamllex - # get cppo curl https://github.com/bsansouci/cppo/archive/windows.zip -L -o /cppo.zip unzip /cppo.zip -d / @@ -29,6 +27,7 @@ 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/cppo.exe /cppo/cppo # copy ninja binary cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe From 8b307729ed7e9f56b3b2b37f697dbcf8840313fe Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 13:01:10 -0700 Subject: [PATCH 15/16] Update linux-build-helper.sh --- scripts/linux-build-helper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index 8fa7b83c4..ff60cc20e 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -27,7 +27,8 @@ 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/cppo.exe /cppo/cppo +find /cppo +cp /cppo/src/cppo.exe /cppo/cppo # copy ninja binary cp /io/vendor/ninja-build/ninja.linux64 /io/lib/ninja.exe From 4bf2904dd2ad2ec6df971ab084cd77357038b180 Mon Sep 17 00:00:00 2001 From: Avery Morin Date: Thu, 12 Jul 2018 13:06:17 -0700 Subject: [PATCH 16/16] bad path --- scripts/linux-build-helper.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/linux-build-helper.sh b/scripts/linux-build-helper.sh index ff60cc20e..267c7bd33 100644 --- a/scripts/linux-build-helper.sh +++ b/scripts/linux-build-helper.sh @@ -27,7 +27,6 @@ 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 -find /cppo cp /cppo/src/cppo.exe /cppo/cppo # copy ninja binary @@ -39,7 +38,7 @@ 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 +cp lib/refmt.exe lib/refmt3.exe # create zip package rm -f bsb-native-linux-2.1.1.zip