Commit 8dd831a5 authored by Matthew Pickering's avatar Matthew Pickering

Initialise with images from .circleci folder

parents
FROM aarch64/debian:stretch
ENV LANG C.UTF-8
# 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 \
jq wget curl libnuma-dev
# Documentation tools
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Boot LLVM
ENV PATH /usr/local/bin:$PATH
ENV LLVM_TARBALL http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-aarch64-linux-gnu.tar.xz
RUN curl $LLVM_TARBALL | tar -xJC .. && \
mkdir /opt/llvm6 && \
cp -R clang+llvm*/* /opt/llvm6 && \
rm -R clang+llvm* && \
/opt/llvm6/bin/llc --version
# GHC
#RUN curl http://downloads.haskell.org/~ghc/8.6.2/ghc-8.6.2-aarch64-deb8-linux.tar.xz | tar -xJ && \
COPY ghc-8.6.2-aarch64-unknown-linux.tar.xz .
RUN cat ghc-8.6.2-aarch64-unknown-linux.tar.xz | tar -xJ && \
cd ghc-8.6.2 && \
./configure --prefix=/usr/local LLC=/opt/llvm6/bin/llc OPT=/opt/llvm6/bin/opt && \
make install && \
cd .. && \
rm -Rf ghc-*
RUN ghc --version
# LLVM
ENV LLVM_TARBALL http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-aarch64-linux-gnu.tar.xz
ENV LLC /opt/llvm7/bin/llc
ENV OPT /opt/llvm7/bin/opt
RUN curl $LLVM_TARBALL | tar -xJC .. && \
mkdir /opt/llvm7 && \
cp -R clang+llvm*/* /opt/llvm7 && \
rm -R clang+llvm* && \
$LLC --version
# Cabal
RUN git clone https://github.com/haskell/Cabal && \
cd Cabal && \
git checkout cabal-install-v2.4.1.0 && \
cd cabal-install && \
./bootstrap.sh --global --no-doc
RUN ls Cabal/cabal-install/dist/build
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
FROM i386/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 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 \
jq wget curl
# Documentation tools
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Core build utilities
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
# 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 && \
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
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
FROM i386/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 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 \
jq wget curl
# Documentation tools
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Core build utilities
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
# 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 && \
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
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
FROM debian:stretch
ENV LANG C.UTF-8
RUN apt-get update -qq; apt-get install -qy gnupg sudo git python3
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
RUN apt-get update -qq
# Basic Haskell toolchain
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
# 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 Linting tools
RUN cabal update
RUN git clone git://github.com/haskell-infra/git-haskell-org-hooks && \
cd git-haskell-org-hooks && \
cabal install
ENV PATH /home/ghc/.cabal/bin:$PATH
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"
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
ca-certificates \
curl \
file \
g++ \
git \
make \
openssh-client \
patch \
perl \
python2.7 \
python3 \
software-properties-common \
sudo \
wget \
jq \
xz-utils
COPY build-toolchain.sh /tmp/
RUN /tmp/build-toolchain.sh x86_64
#!/usr/bin/env bash
set -ex
ARCH=$1
BINUTILS=2.25.1
GCC=6.4.0
FREEBSD=10.4-RELEASE
mkdir binutils
cd binutils
# Build binutils for target platform.
curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf -
mkdir binutils-build
cd binutils-build
../binutils-$BINUTILS/configure --target=$ARCH-unknown-freebsd10
make -j$(nproc)
make install
cd ..
cd ..
rm -rf binutils
mkdir freebsd
case "$ARCH" in
x86_64)
FREEBSD_ARCH=amd64
;;
i686)
FREEBSD_ARCH=i386
;;
esac
URL=ftp://ftp.freebsd.org/pub/FreeBSD/releases/$FREEBSD_ARCH/$FREEBSD/base.txz
curl $URL | tar xJf - -C freebsd ./usr/include ./usr/lib ./lib
dst=/usr/local/$ARCH-unknown-freebsd10
cp -r freebsd/usr/include $dst/
cp freebsd/usr/lib/crt1.o $dst/lib
cp freebsd/usr/lib/Scrt1.o $dst/lib
cp freebsd/usr/lib/crti.o $dst/lib
cp freebsd/usr/lib/crtn.o $dst/lib
cp freebsd/usr/lib/libc.a $dst/lib
cp freebsd/usr/lib/libutil.a $dst/lib
cp freebsd/usr/lib/libutil_p.a $dst/lib
cp freebsd/usr/lib/libm.a $dst/lib
cp freebsd/usr/lib/librt.so.1 $dst/lib
cp freebsd/usr/lib/libexecinfo.so.1 $dst/lib
cp freebsd/lib/libc.so.7 $dst/lib
cp freebsd/lib/libm.so.5 $dst/lib
cp freebsd/lib/libutil.so.9 $dst/lib
cp freebsd/lib/libthr.so.3 $dst/lib
cp freebsd/lib/libncurses.so.8 $dst/lib
cp freebsd/lib/libncursesw.so.8 $dst/lib
# Install iconv port in target env.
URL_ICONV=http://pkg.freebsd.org/FreeBSD:11:$FREEBSD_ARCH/latest/All/libiconv-1.14_11.txz
curl $URL_ICONV | tar xJf - -C freebsd
cp -r freebsd/usr/local/include $dst/
cp -d freebsd/usr/local/lib/* $dst/lib
ln -s libc.so.7 $dst/lib/libc.so
ln -s libm.so.5 $dst/lib/libm.so
ln -s librt.so.1 $dst/lib/librt.so
ln -s libutil.so.9 $dst/lib/libutil.so
ln -s libexecinfo.so.1 $dst/lib/libexecinfo.so
ln -s libthr.so.3 $dst/lib/libpthread.so
ln -s libncurses.so.8 $dst/lib/libncurses.so
ln -s libncursesw.so.8 $dst/lib/libncursesw.so
rm -rf freebsd
# Build gcc for target platform.
mkdir gcc
cd gcc
curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.gz | tar xzf -
cd gcc-$GCC
./contrib/download_prerequisites
mkdir ../gcc-build
cd ../gcc-build
../gcc-$GCC/configure \
--enable-languages=c \
--target=$ARCH-unknown-freebsd10 \
--disable-nls \
--disable-libgomp \
--disable-libquadmath \
--disable-libssp \
--disable-libvtv \
--disable-libcilkrts \
--disable-libada \
--disable-libsanitizer \
--disable-libquadmath-support \
--disable-lto
make -j$(nproc)
make install
cd ..
cd ..
rm -rf gcc
FROM centos:7
ENV LANG C.UTF-8
# Core build utilities
RUN yum -y install coreutils binutils which git make \
automake autoconf gcc perl python3 texinfo xz lbzip2 \
patch openssh-clients sudo zlib-devel sqlite \
ncurses-compat-libs gmp-devel ncurses-devel gcc-c++ findutils \
curl wget jq
# Python 3
RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm; \
yum install -y python34u python34u-libs
# Documentation tools
RUN yum -y install python-sphinx \
texlive texlive-latex texlive-xetex \
texlive-collection-latex texlive-collection-latexrecommended \
texlive-xetex-def texlive-collection-xetex \
python-sphinx-latex dejavu-sans-fonts dejavu-serif-fonts \
dejavu-sans-mono-fonts
# This is in the PATH when I ssh into the CircleCI machine but somehow
# sphinx-build isn't found during configure unless we explicitly
# add it here as well; perhaps PATH is being overridden by CircleCI's
# infrastructure?
ENV PATH /usr/libexec/python3-sphinx:$PATH
# systemd isn't running so remove it from nsswitch.conf
# Failing to do this will result in testsuite failures due to
# non-functional user lookup (#15230).
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
# Create a normal user.
RUN adduser ghc --comment "GHC builds"
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
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
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 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 \
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
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
FROM debian:stretch
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
RUN apt-get update -qq
# Core build utilities
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 \
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
ENV PATH /home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/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
ENV PATH /opt/llvm/bin:$PATH
RUN curl $LLVM_TARBALL | tar -xJC ..; \
mkdir /opt/llvm; \
cp -R clang+llvm*/* /opt/llvm; \
rm -R clang+llvm*; \
llc --version
# Create a normal user.
RUN adduser ghc --gecos "GHC builds" --disabled-password
RUN echo "ghc ALL = NOPASSWD : ALL" > /etc/sudoers.d/ghc
USER ghc
# Build Haskell tools
RUN cabal update && \
cabal install hscolour happy alex
ENV PATH /home/ghc/.cabal/bin:$PATH
WORKDIR /home/ghc/
CMD ["bash"]
FROM fedora:27
ENV LANG C.UTF-8
# Core build utilities
RUN dnf -y install coreutils binutils which git make \
automake autoconf gcc perl python3 texinfo xz lbzip2 \
patch openssh-clients sudo zlib-devel sqlite \
ncurses-compat-libs gmp-devel ncurses-devel gcc-c++ findutils \
curl wget jq
# Documentation tools
RUN dnf -y install python3-sphinx \
texlive texlive-latex texlive-xetex \
texlive-collection-latex texlive-collection-latexrecommended \
texlive-xetex-def texlive-collection-xetex \
python-sphinx-latex dejavu-sans-fonts dejavu-serif-fonts \
dejavu-sans-mono-fonts
# This is in the PATH when I ssh into the CircleCI machine but somehow
# sphinx-build isn't found during configure unless we explicitly
# add it here as well; perhaps PATH is being overridden by CircleCI's
# infrastructure?
ENV PATH /usr/libexec/python3-sphinx:$PATH
# systemd isn't running so remove it from nsswitch.conf
# Failing to do this will result in testsuite failures due to
# non-functional user lookup (#15230).
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
# Create a normal user.
RUN adduser ghc --comment "GHC builds"
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
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