Commit 4d3d93d3 authored by Ben Gamari's avatar Ben Gamari 🐢
Browse files

Merge branch 'update-ghc-cabal' into 'master'

Update CI images to GHC-8.4.4 & cabal-install-2.4.1.0

See merge request ghc/ci-images!2
parents 6722f585 7986f270
GHC CI Docker images
====================
This repository contains the Docker images used for most of GHC's Linux-based
CI builds. These are built via CI and pushed to this repository's Docker
Registry.
See the [GHC
Wiki](https://gitlab.haskell.org/ghc/ghc/wikis/continuous-integration-configuration)
for details.
......@@ -57,13 +57,12 @@ ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
......@@ -19,27 +19,26 @@ RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
RUN apt-get install -qy libgmp-dev:i386
# Get i386 GHC bindist for 32 bit CI builds.
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-i386-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.2 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux
RUN cd /tmp/ghc-8.4.2 && make install
RUN rm -rf /tmp/ghc-8.4.2
ENV PATH /opt/ghc-i386/8.4.2/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-i386-deb8-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.4 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc-i386/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-linux.tar.gz | tar -zx && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-i386-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
FROM i386/debian:jessie
FROM i386/debian:stretch
ENV LANG C.UTF-8
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
RUN apt-get update -qq
# Core build utilities
RUN apt-get update -qq
RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \
ca-certificates g++ git make automake autoconf gcc \
perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo \
......@@ -19,27 +16,26 @@ RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
RUN apt-get install -qy libgmp-dev:i386
# Get i386 GHC bindist for 32 bit CI builds.
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-i386-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.2 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux
RUN cd /tmp/ghc-8.4.2 && make install
RUN rm -rf /tmp/ghc-8.4.2
ENV PATH /opt/ghc-i386/8.4.2/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-i386-deb8-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && setarch i386 ./configure --prefix=/opt/ghc-i386/8.4.4 CFLAGS=-m32 --target=i386-unknown-linux --build=i386-unknown-linux --host=i386-unknown-linux; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc-i386/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-linux.tar.gz | tar -zx && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-i386-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
#!/usr/bin/env bash
set -e
repo=ghcci
if [[ $# != 2 ]]; then
echo "Usage: $0 DIR VERSION"
echo
echo "Update Docker image in DIR, pushing it to the $repo repository as"
echo "version VERSION"
echo
echo "Example: $0 x86_64-linux-fedora 0.0.3"
exit 1
fi
name=$1
version=$2
#versions="$(curl -s https://registry.hub.docker.com/v1/repositories/$repo/$name/tags | jq -r .[].name)"
#if echo "$versions" | grep $version > /dev/null; then
# echo "Version $version of $name already exists"
# echo "Previous versions are:"
# echo "$versions"
# exit 1
#fi
docker build $name -t $repo/$name:$version
docker push $repo/$name:$version
repo_name="$repo/$name"
sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../config.yml
sed -i -E -e "s%$repo_name"':[0-9]+(\.[0-9]+)*%'"$repo_name:$version%" ../../.gitlab-ci.yml
echo "Built, pushed, and bumped $name:$version"
......@@ -33,12 +33,16 @@ ENV PATH /usr/libexec/python3-sphinx:$PATH
RUN sed -i -e 's/systemd//g' /etc/nsswitch.conf
# Install GHC and cabal
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-x86_64-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && ./configure --prefix=/opt/ghc/8.4.2
RUN cd /tmp/ghc-8.4.2 && make install
RUN mkdir -p /opt/cabal/bin
RUN cd /opt/cabal/bin && curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz | tar -zx
ENV PATH /opt/ghc/8.4.2/bin:/opt/cabal/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-centos70-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && ./configure --prefix=/opt/ghc/8.4.4; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --comment "GHC builds"
......@@ -46,9 +50,9 @@ RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Install Alex, Happy, and HsColor with Cabal
RUN cabal update && \
cabal install hscolour happy alex
# Build Haskell tools
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -2,34 +2,37 @@ FROM debian:jessie
ENV LANG C.UTF-8
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu trusty main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
RUN apt-get update -qq
# Core build utilities
RUN apt-get update -qq
RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \
ca-certificates g++ git make automake autoconf gcc \
perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo \
perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo libgmp-dev \
jq wget curl
# Documentation tools
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Basic Haskell toolchain
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
# Install GHC and cabal
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-deb8-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && ./configure --prefix=/opt/ghc/8.4.4; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc/8.4.4/bin:$PATH
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
......@@ -4,8 +4,9 @@ ENV LANG C.UTF-8
RUN apt-get update -qq; apt-get install -qy gnupg
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
# http://downloads.haskell.org/debian/
RUN echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA3CBA3FFE22B574
RUN apt-get update -qq
# Core build utilities
......@@ -18,9 +19,9 @@ RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev \
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Basic Haskell toolchain
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
RUN apt-get install -qy cabal-install-2.4 ghc-8.4.4
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.4/bin:/opt/ghc/8.4.4/bin:$PATH
# LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
......@@ -35,12 +36,11 @@ RUN curl $LLVM_TARBALL | tar -xJC ..; \
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
......@@ -29,12 +29,16 @@ ENV PATH /usr/libexec/python3-sphinx:$PATH
RUN sed -i -e 's/systemd//g' /etc/nsswitch.conf
# Install GHC and cabal
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-x86_64-deb8-linux.tar.xz | tar -Jx
RUN cd /tmp/ghc-8.4.2 && ./configure --prefix=/opt/ghc/8.4.2
RUN cd /tmp/ghc-8.4.2 && make install
RUN mkdir -p /opt/cabal/bin
RUN cd /opt/cabal/bin && curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-x86_64-unknown-linux.tar.gz | tar -zx
ENV PATH /opt/ghc/8.4.2/bin:/opt/cabal/bin:$PATH
RUN cd /tmp && curl https://downloads.haskell.org/~ghc/8.4.4/ghc-8.4.4-x86_64-fedora27-linux.tar.xz | tar -Jx; \
cd /tmp/ghc-8.4.4 && ./configure --prefix=/opt/ghc/8.4.4; \
cd /tmp/ghc-8.4.4 && make install; \
rm -rf /tmp/ghc-8.4.4
ENV PATH /opt/ghc/8.4.4/bin:$PATH
# Get Cabal
RUN cd /tmp && \
curl https://downloads.haskell.org/cabal/cabal-install-2.4.1.0/cabal-install-2.4.1.0-x86_64-unknown-linux.tar.xz | tar -Jx && \
mv cabal /usr/local/bin/cabal
# Create a normal user.
RUN adduser ghc --comment "GHC builds"
......@@ -42,9 +46,9 @@ RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
WORKDIR /home/ghc/
# Install Alex, Happy, and HsColor with Cabal
RUN cabal update && \
cabal install hscolour happy alex
# Build Haskell tools
RUN cabal v2-update && \
cabal v2-install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment