Skip to content

Commit

Permalink
Build libc (Everyone else) and musl (Alpine) ropoly
Browse files Browse the repository at this point in the history
  • Loading branch information
archis-polyverse committed Oct 6, 2018
1 parent 24ced85 commit cae85c7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/bin/bash

mkdir bin

docker run --rm -it \
-v $PWD:/go/src/github.com/polyverse/ropoly \
-w /go/src/github.com/polyverse/ropoly \
golang
golang scripts/buildlibc.sh

echo "Copying libc binary into bin..."
cp ./ropoly ./bin/ropoly-libc-x86_64

docker run --rm -it \
-v $PWD:/go/src/github.com/polyverse/ropoly \
-w /go/src/github.com/polyverse/ropoly \
golang:alpine scripts/buildmusl.sh

echo "Copying musl binary into bin..."
cp ./ropoly ./bin/ropoly-musl-x86_64
16 changes: 16 additions & 0 deletions scripts/buildmusl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

echo "Building Ropoly inside Docker (Alpine)..."

apk update
apk add curl bash alpine-sdk

echo "Installing dep..."
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

echo "Installing dependencies..."
dep ensure

echo "Building..."
go build

0 comments on commit cae85c7

Please sign in to comment.