-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a32aa55
commit cf9e109
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
on: | ||
push: | ||
branches: | ||
- ekw/SRE-996/release-ghc-alpine | ||
tags: | ||
- ghc-alpine/* | ||
|
||
jobs: | ||
release-ghc-alpine: | ||
uses: concordium/.github/.github/workflows/s3-release-workflow.yaml@ekw/SRE-996/s3-artifact | ||
with: | ||
SERVICE_NAME: "ghc-alpine" | ||
BUILD_ARGS: --build-arg BOOTSTRAP_HASKELL_GHC_VERSION="9.4.6" --build-arg GHC_VERSION="9.4.6" | ||
DOCKER_FILE: docker/ghc-alpine.Dockerfile | ||
FILE_NAME: "ghc-9.2.5-x86_64-unknown-linux-integer-gmp.tar.xz" | ||
BUCKET: "s3://static-libraries.concordium.com" | ||
IAM_ROLE: "arn:aws:iam::192549843005:role/github_ghc-alpine" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM alpine:latest | ||
ARG GHC_VERSION | ||
ARG BOOTSTRAP_HASKELL_GHC_VERSION | ||
|
||
WORKDIR / | ||
|
||
# Install system ghc and dependencies | ||
RUN apk add musl-dev python3 autoconf automake ncurses-dev make file g++ xz git bash wget gmp-dev gmp libffi libffi-dev curl | ||
ENV BOOTSTRAP_HASKELL_NONINTERACTIVE=1 | ||
ENV BOOTSTRAP_HASKELL_NO_UPGRADE=1 | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh | ||
|
||
# Get GHC source | ||
RUN git clone -b ghc-"$GHC_VERSION"-release https://gitlab.haskell.org/ghc/ghc.git/ --recurse-submodules | ||
|
||
COPY ../scripts/ghc-alpine-build.sh /ghc-alpine-build.sh | ||
RUN chmod +x /ghc-alpine-build.sh | ||
ENTRYPOINT ["../scripts/ghc-alpine-build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
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 /build/dpkg-build-package/ghc-"$GHC_VERSION"-x86_64-unknown-linux-integer-gmp.tar.xz |