diff --git a/scripts/ghc-alpine-build.sh b/scripts/ghc-alpine-build.sh index b69a6449..a59e6924 100644 --- a/scripts/ghc-alpine-build.sh +++ b/scripts/ghc-alpine-build.sh @@ -1,21 +1,8 @@ -#!/bin/sh +#!/usr/bin/env bash set -ex -. "$HOME/.ghcup/env" - -cd ghc/ -cabal install happy alex --install-method=copy -cp ~/.cabal/bin/* /usr/bin - -# Build GHC -./boot -./configure --disable-numa -./hadrian/build -j17 --docs=none -mkdir _build/docs -./hadrian/build binary-dist --docs=none - -# Copy ghc to out -ls _build -ls _build/bindist -cp _build/bindist/ghc-"$GHC_VERSION"-x86_64-unknown-linux.tar.xz /out/ghc-"$GHC_VERSION"-x86_64-unknown-linux-integer-gmp.tar.xz +docker build -t concordium/alpine-ghc -f fpic/alpine-integer-gmp-ghc.Dockerfile --build-arg BOOTSTRAP_HASKELL_GHC_VERSION="$BOOTSTRAP_HASKELL_GHC_VERSION" --build-arg GHC_VERSION="$GHC_VERSION" fpic +mkdir out +docker run --name alpine-ghc -e GHC_VERSION -v "$(pwd)"/out:/out concordium/alpine-ghc +#aws s3 cp out/ghc-"$GHC_VERSION"-x86_64-unknown-linux-integer-gmp.tar.xz s3://static-libraries.concordium.com/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers