diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml index 47b68f3..38de813 100644 --- a/.github/workflows/debian.yml +++ b/.github/workflows/debian.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ['9.0.2', '9.2.8', '9.4.8', '9.6.5', '9.8.2'] + ghc: ['9.0.2', '9.2.8', '9.4.8', '9.6.5', '9.8.2', '9.10.1'] deb: ['buster', 'slim-buster'] include: - ghc: '9.0.2' @@ -35,6 +35,8 @@ jobs: ghc_minor: '9.6' - ghc: '9.8.2' ghc_minor: '9.8' + - ghc: '9.10.1' + ghc_minor: '9.10' steps: - uses: actions/checkout@v2 - name: build + smoke test [${{ matrix.ghc }}] @@ -48,8 +50,7 @@ jobs: ${{ matrix.ghc_minor }}/${{ matrix.deb }} - uses: actions/checkout@v2 with: - repository: AlistairB/official-images - ref: haskell-cabal-test-change + repository: docker-library/official-images path: official-images - name: run official-images tests run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }} @@ -61,7 +62,7 @@ jobs: strategy: fail-fast: false matrix: - ghc: ['9.0.2', '9.2.8', '9.4.8', '9.6.5', '9.8.2'] + ghc: ['9.0.2', '9.2.8', '9.4.8', '9.6.5', '9.8.2', '9.10.1'] # uraimo/run-on-arch-action does not support debian slim variants deb: ['buster'] arch: ['aarch64'] @@ -76,6 +77,8 @@ jobs: ghc_minor: '9.6' - ghc: '9.8.2' ghc_minor: '9.8' + - ghc: '9.10.1' + ghc_minor: '9.10' - arch: aarch64 docker_platform: arm64 steps: diff --git a/9.10/buster/Dockerfile b/9.10/buster/Dockerfile new file mode 100644 index 0000000..49f637f --- /dev/null +++ b/9.10/buster/Dockerfile @@ -0,0 +1,120 @@ +FROM buildpack-deps:buster + +ENV LANG C.UTF-8 + +# additional haskell specific deps +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libnuma-dev \ + libtinfo-dev && \ + rm -rf /var/lib/apt/lists/* + +ARG STACK=2.15.7 +ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442 + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \ + # sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256 + case "$ARCH" in \ + 'aarch64') \ + STACK_SHA256='f0c4b038c7e895902e133a2f4c4c217e03c4be44aa5da48aec9f7947f4af090b'; \ + ;; \ + 'x86_64') \ + STACK_SHA256='4e635d6168f7578a5694a0d473c980c3c7ed35d971acae969de1fd48ef14e030'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \ + esac; \ + curl -sSL "$STACK_URL" -o stack.tar.gz; \ + echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \ + \ + curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \ + gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \ + gpgconf --kill all; \ + \ + tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \ + stack config set system-ghc --global true; \ + stack config set install-ghc --global false; \ + \ + rm -rf /tmp/*; \ + \ + stack --version; + +ARG CABAL_INSTALL=3.10.3.0 +ARG CABAL_INSTALL_RELEASE_KEY=EAF2A9A722C0C96F2B431CA511AAD8CEDEE0CAEF + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + CABAL_INSTALL_TAR="cabal-install-$CABAL_INSTALL-$ARCH-linux-deb10.tar.xz"; \ + CABAL_INSTALL_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/$CABAL_INSTALL_TAR"; \ + CABAL_INSTALL_SHA256SUMS_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS"; \ + # sha256 from https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS + case "$ARCH" in \ + 'aarch64') \ + CABAL_INSTALL_SHA256='92d341620c60294535f03098bff796ef6de2701de0c4fcba249cde18a2923013'; \ + ;; \ + 'x86_64') \ + CABAL_INSTALL_SHA256='1d7a7131402295b01f25be5373fde095a404c45f9b5a5508fb7474bb0d3d057a'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'"; exit 1 ;; \ + esac; \ + curl -fSL "$CABAL_INSTALL_URL" -o cabal-install.tar.gz; \ + echo "$CABAL_INSTALL_SHA256 cabal-install.tar.gz" | sha256sum --strict --check; \ + \ + curl -sSLO "$CABAL_INSTALL_SHA256SUMS_URL"; \ + curl -sSLO "$CABAL_INSTALL_SHA256SUMS_URL.sig"; \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$CABAL_INSTALL_RELEASE_KEY"; \ + gpg --batch --verify SHA256SUMS.sig SHA256SUMS; \ + # confirm we are verifying SHA256SUMS that matches the release + sha256 + grep "$CABAL_INSTALL_SHA256 $CABAL_INSTALL_TAR" SHA256SUMS; \ + gpgconf --kill all; \ + \ + tar -xf cabal-install.tar.gz -C /usr/local/bin; \ + \ + rm -rf /tmp/*; \ + \ + cabal --version + +ARG GHC=9.10.1 +ARG GHC_RELEASE_KEY=FFEB7CE81E16A36B3E2DED6F2DE04D4E97DB64AD + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + GHC_URL="https://downloads.haskell.org/~ghc/$GHC/ghc-$GHC-$ARCH-deb10-linux.tar.xz"; \ + # sha256 from https://downloads.haskell.org/~ghc/$GHC/SHA256SUMS + case "$ARCH" in \ + 'aarch64') \ + GHC_SHA256='e6df50e62b696e3a8b759670fc79207ccc26e88a79a047561ca1ccb8846157dd'; \ + ;; \ + 'x86_64') \ + GHC_SHA256='7fbdca8971c89a54cff8e88aee825c2ef2bcc9f7a050ee1e1e844763e39c361f'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \ + esac; \ + curl -sSL "$GHC_URL" -o ghc.tar.xz; \ + echo "$GHC_SHA256 ghc.tar.xz" | sha256sum --strict --check; \ + \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + curl -sSL "$GHC_URL.sig" -o ghc.tar.xz.sig; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$GHC_RELEASE_KEY"; \ + gpg --batch --verify ghc.tar.xz.sig ghc.tar.xz; \ + gpgconf --kill all; \ + \ + tar xf ghc.tar.xz; \ + cd "ghc-$GHC-$ARCH-unknown-linux"; \ + ./configure --prefix "/opt/ghc/$GHC"; \ + make install; \ + \ + rm -rf /tmp/*; \ + \ + "/opt/ghc/$GHC/bin/ghc" --version + +ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/ghc/${GHC}/bin:$PATH + +CMD ["ghci"] diff --git a/9.10/slim-buster/Dockerfile b/9.10/slim-buster/Dockerfile new file mode 100644 index 0000000..533ef62 --- /dev/null +++ b/9.10/slim-buster/Dockerfile @@ -0,0 +1,136 @@ +FROM debian:buster-slim + +ENV LANG C.UTF-8 + +# common haskell + stack dependencies +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + dpkg-dev \ + git \ + gcc \ + gnupg \ + g++ \ + libc6-dev \ + libffi-dev \ + libgmp-dev \ + libnuma-dev \ + libtinfo-dev \ + make \ + netbase \ + xz-utils \ + zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* + +ARG STACK=2.15.7 +ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442 + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \ + # sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256 + case "$ARCH" in \ + 'aarch64') \ + STACK_SHA256='f0c4b038c7e895902e133a2f4c4c217e03c4be44aa5da48aec9f7947f4af090b'; \ + ;; \ + 'x86_64') \ + STACK_SHA256='4e635d6168f7578a5694a0d473c980c3c7ed35d971acae969de1fd48ef14e030'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \ + esac; \ + curl -sSL "$STACK_URL" -o stack.tar.gz; \ + echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \ + \ + curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \ + gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \ + gpgconf --kill all; \ + \ + tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \ + stack config set system-ghc --global true; \ + stack config set install-ghc --global false; \ + \ + rm -rf /tmp/*; \ + \ + stack --version; + +ARG CABAL_INSTALL=3.10.3.0 +ARG CABAL_INSTALL_RELEASE_KEY=EAF2A9A722C0C96F2B431CA511AAD8CEDEE0CAEF + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + CABAL_INSTALL_TAR="cabal-install-$CABAL_INSTALL-$ARCH-linux-deb10.tar.xz"; \ + CABAL_INSTALL_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/$CABAL_INSTALL_TAR"; \ + CABAL_INSTALL_SHA256SUMS_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS"; \ + # sha256 from https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS + case "$ARCH" in \ + 'aarch64') \ + CABAL_INSTALL_SHA256='92d341620c60294535f03098bff796ef6de2701de0c4fcba249cde18a2923013'; \ + ;; \ + 'x86_64') \ + CABAL_INSTALL_SHA256='1d7a7131402295b01f25be5373fde095a404c45f9b5a5508fb7474bb0d3d057a'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'"; exit 1 ;; \ + esac; \ + curl -fSL "$CABAL_INSTALL_URL" -o cabal-install.tar.gz; \ + echo "$CABAL_INSTALL_SHA256 cabal-install.tar.gz" | sha256sum --strict --check; \ + \ + curl -sSLO "$CABAL_INSTALL_SHA256SUMS_URL"; \ + curl -sSLO "$CABAL_INSTALL_SHA256SUMS_URL.sig"; \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$CABAL_INSTALL_RELEASE_KEY"; \ + gpg --batch --verify SHA256SUMS.sig SHA256SUMS; \ + # confirm we are verifying SHA256SUMS that matches the release + sha256 + grep "$CABAL_INSTALL_SHA256 $CABAL_INSTALL_TAR" SHA256SUMS; \ + gpgconf --kill all; \ + \ + tar -xf cabal-install.tar.gz -C /usr/local/bin; \ + \ + rm -rf /tmp/*; \ + \ + cabal --version + +ARG GHC=9.10.1 +ARG GHC_RELEASE_KEY=FFEB7CE81E16A36B3E2DED6F2DE04D4E97DB64AD + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + GHC_URL="https://downloads.haskell.org/~ghc/$GHC/ghc-$GHC-$ARCH-deb10-linux.tar.xz"; \ + # sha256 from https://downloads.haskell.org/~ghc/$GHC/SHA256SUMS + case "$ARCH" in \ + 'aarch64') \ + GHC_SHA256='e6df50e62b696e3a8b759670fc79207ccc26e88a79a047561ca1ccb8846157dd'; \ + ;; \ + 'x86_64') \ + GHC_SHA256='7fbdca8971c89a54cff8e88aee825c2ef2bcc9f7a050ee1e1e844763e39c361f'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \ + esac; \ + curl -sSL "$GHC_URL" -o ghc.tar.xz; \ + echo "$GHC_SHA256 ghc.tar.xz" | sha256sum --strict --check; \ + \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + curl -sSL "$GHC_URL.sig" -o ghc.tar.xz.sig; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$GHC_RELEASE_KEY"; \ + gpg --batch --verify ghc.tar.xz.sig ghc.tar.xz; \ + gpgconf --kill all; \ + \ + tar xf ghc.tar.xz; \ + cd "ghc-$GHC-$ARCH-unknown-linux"; \ + ./configure --prefix "/opt/ghc/$GHC"; \ + make install; \ + # remove profiling support to save space + find "/opt/ghc/$GHC/" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete; \ + \ + rm -rf /tmp/*; \ + \ + "/opt/ghc/$GHC/bin/ghc" --version + +ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/ghc/${GHC}/bin:$PATH + +CMD ["ghci"]