Commit 6a70acfa authored by Ben Gamari's avatar Ben Gamari 🐢

CircleCI: Clean up docker image

parent 509d5be6
......@@ -110,7 +110,7 @@ jobs:
"validate-x86_64-linux":
resource_class: xlarge
docker:
- image: ghcci/x86_64-linux:0.0.4
- image: ghcci/x86_64-linux:0.0.5
environment:
<<: *buildenv
GHC_COLLECTOR_FLAVOR: x86_64-linux
......@@ -181,7 +181,7 @@ jobs:
"validate-hadrian-x86_64-linux":
resource_class: xlarge
docker:
- image: ghcci/x86_64-linux:0.0.4
- image: ghcci/x86_64-linux:0.0.5
environment:
<<: *buildenv
steps:
......@@ -196,7 +196,7 @@ jobs:
"validate-x86_64-linux-unreg":
resource_class: xlarge
docker:
- image: ghcci/x86_64-linux:0.0.4
- image: ghcci/x86_64-linux:0.0.5
environment:
<<: *buildenv
TEST_ENV: x86_64-linux-unreg
......@@ -215,7 +215,7 @@ jobs:
"validate-x86_64-linux-llvm":
resource_class: xlarge
docker:
- image: ghcci/x86_64-linux:0.0.4
- image: ghcci/x86_64-linux:0.0.5
environment:
<<: *buildenv
BUILD_FLAVOUR: perf-llvm
......@@ -243,7 +243,7 @@ jobs:
"validate-x86_64-linux-debug":
resource_class: xlarge
docker:
- image: ghcci/x86_64-linux:0.0.4
- image: ghcci/x86_64-linux:0.0.5
environment:
BUILD_FLAVOUR: devel2
<<: *buildenv
......@@ -308,7 +308,7 @@ jobs:
"slow-validate-x86_64-linux":
resource_class: xlarge
docker:
- image: ghcci/x86_64-linux:0.0.4
- image: ghcci/x86_64-linux:0.0.5
environment:
<<: *buildenv
GHC_COLLECTOR_FLAVOR: x86_64-linux
......
......@@ -42,8 +42,7 @@ USER ghc
WORKDIR /home/ghc/
# Install Alex, Happy, and HsColor with Cabal
RUN cabal update
RUN cabal install alex happy hscolour
RUN cabal update && cabal install alex happy hscolour
ENV PATH /home/ghc/.cabal/bin:$PATH
CMD ["bash"]
......@@ -7,23 +7,15 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286
RUN apt-get update -qq
# Core build utilities
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2 happy alex zlib1g-dev \
libtinfo-dev libsqlite3-0 libsqlite3-dev ca-certificates g++ git curl \
git make automake autoconf gcc perl python3 texinfo xz-utils lbzip2 \
patch openssh-client sudo
RUN apt-get install -qy zlib1g-dev libtinfo-dev libsqlite3-0 libsqlite3-dev
ca-certificates g++ git curl make automake autoconf gcc
perl python3 texinfo xz-utils lbzip2 patch openssh-client sudo
# Documentation tools
RUN apt-get install -qy python3-sphinx texlive-xetex texlive-latex-extra
# Stack intallation
RUN curl -fSL https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-linux-x86_64-static.tar.gz -o stack.tar.gz
RUN curl -fSL https://github.com/commercialhaskell/stack/releases/download/v1.6.5/stack-1.6.5-linux-x86_64-static.tar.gz.asc -o stack.tar.gz.asc
RUN export GNUPGHOME="$(mktemp -d)"
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys C5705533DA4F78D8664B5DC0575159689BEFB442
RUN gpg --batch --verify stack.tar.gz.asc stack.tar.gz
RUN tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1
RUN /usr/local/bin/stack config set system-ghc --global true
RUN rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz
# Basic Haskell toolchain
RUN apt-get install -qy cabal-install-2.2 ghc-8.4.2
ENV PATH /home/ghc/.cabal/bin:/home/ghc/.local/bin:/opt/cabal/2.2/bin:/opt/ghc/8.4.2/bin:$PATH
......@@ -32,6 +24,10 @@ 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
WORKDIR /home/ghc/
CMD ["bash"]
......@@ -27,15 +27,6 @@ case "$(uname)" in
if [[ -n ${TARGET:-} ]]; then
if [[ $TARGET = FreeBSD ]]; then
# cross-compiling to FreeBSD
add-apt-repository -y ppa:hvr/ghc
apt-get update -qq
apt-get install -qy ghc-8.0.2 cabal-install-1.24 alex happy \
ncurses-dev git make automake autoconf gcc perl \
python3 texinfo xz-utils lbzip2 patch
cabal update
cabal install --reinstall hscolour --index-state=$hackage_index_state
ln -s $HOME/.cabal/bin/HsColour /usr/local/bin/HsColour
echo 'HADDOCK_DOCS = NO' >> mk/build.mk
echo 'WERROR=' >> mk/build.mk
# https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables
......@@ -43,10 +34,6 @@ case "$(uname)" in
else
fail "TARGET=$target not supported"
fi
else
cabal update
cabal install --reinstall hscolour
sudo ln -s /home/ghc/.cabal/bin/HsColour /usr/local/bin/HsColour || true
fi
;;
......
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