diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d19e229e6811afacbc4ac5740328b286e9914d7..a7105425141a6e7aab6bdd73f35949339fca8a11 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,3 +124,11 @@ build-x86_64-linux-fedora27: tags: - docker - x86_64-linux + +build-ppc64le-linux-fedora29: + extends: .build + variables: + IMAGE: ppc64le-linux-fedora29 + tags: + - docker + - ppc64le-linux diff --git a/ppc64le-linux-fedora29/Dockerfile b/ppc64le-linux-fedora29/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..ac988e93d47bf0322194d62a55837d7bf8306ce2 --- /dev/null +++ b/ppc64le-linux-fedora29/Dockerfile @@ -0,0 +1,60 @@ +FROM ppc64le/fedora:29 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +ENV LANG C.UTF-8 + +# Core build utilities +RUN dnf -y install coreutils binutils which git make \ + automake autoconf gcc perl python3 texinfo xz bzip2 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 + +WORKDIR /tmp +# Install GHC and cabal +ENV GHC_VERSION 8.6.5 +RUN curl https://downloads.haskell.org/~ghc/$GHC_VERSION/ghc-$GHC_VERSION-powerpc64le-fedora29-linux.tar.xz | tar -Jx; +WORKDIR /tmp/ghc-$GHC_VERSION +RUN ./configure --prefix=/opt/ghc/$GHC_VERSION; \ + make install; \ + rm -rf /tmp/ghc-$GHC_VERSION +ENV PATH /opt/ghc/$GHC_VERSION/bin:$PATH + +WORKDIR /tmp +# Get Cabal +ENV CABAL_VERSION 3.0.0.0 +RUN curl http://home.smart-cactus.org/~ben/ghc/cabal-install-$CABAL_VERSION-powerpc64le-fedora29-linux.tar.xz | tar -Jx && \ + mv cabal /usr/local/bin/cabal + +# 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/ + +# Build Haskell tools +RUN cabal v2-update && \ + cabal v2-install hscolour happy alex --constraint 'happy ^>= 1.19.10' +ENV PATH /home/ghc/.cabal/bin:$PATH + +CMD ["bash"]