Skip to content
Snippets Groups Projects
Verified Commit a43e2881 authored by Olivier Benz's avatar Olivier Benz
Browse files

Merge branch 'main' into freeze-version

parents 3e73e84d c2d0486d
Branches
No related tags found
No related merge requests found
......@@ -35,8 +35,8 @@
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
BUILDX_NO_DEFAULT_ATTESTATIONS: "true"
GHC_VERSION_BUILD: "9.4.6"
CABAL_VERSION_BUILD: "3.8.1.0"
GHC_VERSION_BUILD: "9.6.2"
CABAL_VERSION_BUILD: "3.10.1.0"
before_script:
- *before-script-build
......@@ -196,13 +196,6 @@ build-manifest:version-linux-multiarch:
$CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
fi
docker manifest push $CI_APP_REPO:$CI_APP_TAG
- |
docker manifest create $CI_APP_REPO:$VERSION_MAJ_MIN $CI_MANIFEST_LIST
if echo $OS_ARCH | grep "linux-arm64v8" >/dev/null ; then
docker manifest annotate --variant v8 $CI_APP_REPO:$VERSION_MAJ_MIN \
$CI_APP_REPO:$CI_APP_TAG-linux-arm64v8
fi
docker manifest push $CI_APP_REPO:$VERSION_MAJ_MIN
rules:
- if: $CI_COMMIT_BRANCH == "freeze-version"
changes:
......
ignored:
- DL3003
- DL3018
......@@ -3,8 +3,8 @@
# GHC musl
The multi-arch (`linux/amd64`, `linux/arm64/v8`) docker image used to build the
Linux amd64 and arm64 binary
[releases of pandoc](https://github.com/jgm/pandoc/releases).
Linux amd64 and arm64
[binary releases of pandoc](https://github.com/jgm/pandoc/releases).
Credits to
......@@ -26,7 +26,7 @@ who laid the groundwork for [this](https://gitlab.com/benz0li/ghc-musl).
## Prerequisites
This projects requires an installation of docker.
This project requires an installation of docker.
## Install
......@@ -43,7 +43,7 @@ To install docker, follow the instructions for your platform:
```bash
docker build \
--build-arg GHC_VERSION_BUILD=9.6.1 \
--build-arg GHC_VERSION_BUILD=9.6.2 \
--build-arg CABAL_VERSION_BUILD=3.10.1.0 \
-t ghc-musl \
-f latest.Dockerfile .
......
ARG GHC_VERSION_BUILD
ARG CABAL_VERSION_BUILD
FROM glcr.b-data.ch/ghc/ghc-musl:9.4.5 as bootstrap
FROM glcr.b-data.ch/ghc/ghc-musl:9.4.6 as bootstrap
ARG GHC_VERSION_BUILD
ARG CABAL_VERSION_BUILD
......@@ -29,13 +29,13 @@ RUN apk upgrade --no-cache \
zlib-dev
RUN cd /tmp \
&& curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz \
&& curl -sSLO https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-src.tar.xz.sig \
&& curl -sSLO https://downloads.haskell.org/~ghc/"$GHC_VERSION"/ghc-"$GHC_VERSION"-src.tar.xz \
&& curl -sSLO https://downloads.haskell.org/~ghc/"$GHC_VERSION"/ghc-"$GHC_VERSION"-src.tar.xz.sig \
&& gpg --keyserver hkps://keyserver.ubuntu.com:443 \
--receive-keys FFEB7CE81E16A36B3E2DED6F2DE04D4E97DB64AD \
&& gpg --verify ghc-$GHC_VERSION-src.tar.xz.sig ghc-$GHC_VERSION-src.tar.xz \
&& tar xf ghc-$GHC_VERSION-src.tar.xz \
&& cd ghc-$GHC_VERSION \
&& gpg --verify "ghc-$GHC_VERSION-src.tar.xz.sig" "ghc-$GHC_VERSION-src.tar.xz" \
&& tar -xJf "ghc-$GHC_VERSION-src.tar.xz" \
&& cd "ghc-$GHC_VERSION" \
&& ./boot.source \
&& ./configure --disable-ld-override LD=ld.gold \
# Use the LLVM backend
......@@ -46,13 +46,13 @@ RUN cd /tmp \
&& sed -i -e 's/unknown-linux-gnu/alpine-linux/g' llvm-targets \
&& cabal update \
# See https://unix.stackexchange.com/questions/519092/what-is-the-logic-of-using-nproc-1-in-make-command
&& hadrian/build binary-dist -j$((`nproc`+1)) \
&& hadrian/build binary-dist -j"$(($(nproc)+1))" \
--flavour=perf+llvm+split_sections \
--docs=none \
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history
&& cabal install --allow-newer --constraint 'Cabal-syntax<3.11' cabal-install-$CABAL_VERSION
&& cabal install --allow-newer --constraint 'Cabal-syntax<3.11' "cabal-install-$CABAL_VERSION"
FROM alpine:3.17 as builder
FROM alpine:3.18 as builder
LABEL org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://gitlab.b-data.ch/ghc/ghc-musl" \
......@@ -98,12 +98,12 @@ RUN apk upgrade --no-cache \
zlib-dev \
zlib-static
COPY --from=bootstrap /tmp/ghc-$GHC_VERSION/_build/bindist/ghc-$GHC_VERSION-*-alpine-linux.tar.xz /tmp/
COPY --from=bootstrap /tmp/ghc-"$GHC_VERSION"/_build/bindist/ghc-"$GHC_VERSION"-*-alpine-linux.tar.xz /tmp/
COPY --from=bootstrap /root/.cabal/bin/cabal /usr/bin/cabal
RUN cd /tmp \
&& tar -xJf ghc-$GHC_VERSION-*-alpine-linux.tar.xz \
&& cd ghc-$GHC_VERSION-*-alpine-linux \
&& tar -xJf ghc-"$GHC_VERSION"-*-alpine-linux.tar.xz \
&& cd ghc-"$GHC_VERSION"-*-alpine-linux \
&& ./configure --disable-ld-override \
&& make install \
&& cd / \
......@@ -111,6 +111,8 @@ RUN cd /tmp \
FROM builder as tester
WORKDIR /usr/local/src
COPY Main.hs Main.hs
RUN ghc -static -optl-pthread -optl-static Main.hs \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment