diff options
author | Ben Gamari <ben@smart-cactus.org> | 2018-11-24 12:34:57 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-11-24 12:35:36 -0500 |
commit | 6a70acfa0b8757b9a6a56cffedc4b16a39dad510 (patch) | |
tree | 9ea14fd4722b6e7b001ffa42028a3c116c27d7db /.circleci | |
parent | 509d5be69c7507ba5d0a5f39ffd1613a59e73eea (diff) | |
download | haskell-6a70acfa0b8757b9a6a56cffedc4b16a39dad510.tar.gz |
CircleCI: Clean up docker image
Diffstat (limited to '.circleci')
-rw-r--r-- | .circleci/config.yml | 12 | ||||
-rw-r--r-- | .circleci/images/x86_64-linux-fedora/Dockerfile | 3 | ||||
-rw-r--r-- | .circleci/images/x86_64-linux/Dockerfile | 22 | ||||
-rwxr-xr-x | .circleci/prepare-system.sh | 13 |
4 files changed, 16 insertions, 34 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e49cde2c7..ebf5737151 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.circleci/images/x86_64-linux-fedora/Dockerfile b/.circleci/images/x86_64-linux-fedora/Dockerfile index f60398d990..959231b0b7 100644 --- a/.circleci/images/x86_64-linux-fedora/Dockerfile +++ b/.circleci/images/x86_64-linux-fedora/Dockerfile @@ -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"] diff --git a/.circleci/images/x86_64-linux/Dockerfile b/.circleci/images/x86_64-linux/Dockerfile index f68c7e6a71..9fe713e329 100644 --- a/.circleci/images/x86_64-linux/Dockerfile +++ b/.circleci/images/x86_64-linux/Dockerfile @@ -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"] diff --git a/.circleci/prepare-system.sh b/.circleci/prepare-system.sh index 4be1b64a6f..9a16c01284 100755 --- a/.circleci/prepare-system.sh +++ b/.circleci/prepare-system.sh @@ -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 ;; |