From 960c4be907add1d6bd53b6ca80167545d670c98f Mon Sep 17 00:00:00 2001 From: Brent Pedersen Date: Mon, 19 Nov 2018 10:14:55 -0700 Subject: [PATCH] add docker stuff for building --- docker/build.sh | 22 ++++++++++++++++++++++ docker/hbb.sh | 7 +++++++ 2 files changed, 29 insertions(+) create mode 100644 docker/build.sh create mode 100644 docker/hbb.sh diff --git a/docker/build.sh b/docker/build.sh new file mode 100644 index 0000000..0891130 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -euo pipefail + +base=$(pwd) + +git clone -b devel --depth 1000 git://github.com/nim-lang/nim nim +cd nim +# before unchecked was removed: +git checkout cc5b8c6 +sh build_all.sh +export PATH=$(base)/nim/bin:$PATH + +cd $base +git clone --depth 1 git://github.com/brentp/duphold.git +cd duphold +nimble install -y kexpr +nimble install -y genoiser + +nimble install -y + +nim c -d:release src/duphold.nim +cp ./src/duphold /io diff --git a/docker/hbb.sh b/docker/hbb.sh new file mode 100644 index 0000000..0f0a45d --- /dev/null +++ b/docker/hbb.sh @@ -0,0 +1,7 @@ +set -e +mkdir -p built/ +cp docker/build.sh built/ +docker run -t -i --rm -v `pwd`/built:/io \ + centos:centos6 \ + bash -c "yum install -y git curl wget && wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo && yum install -y devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ && chmod +x /io/build.sh && scl enable devtoolset-2 /io/build.sh" +echo "binary in built/"