Skip to content

Commit

Permalink
Add GHC 8.10.1, update Cabal, Stack, Debian base.
Browse files Browse the repository at this point in the history
Expand support matrix to include Debian Buster in
addition to Stretch. The default Debian base will
be Buster for both 8.8.3 and 8.10.1 (8.6.5 getting
dropped).

The GitHub Actions will now build/test the full
matrix for pull requests.

Remove examples as they don't work and are
unsupported.
  • Loading branch information
psftw committed May 1, 2020
1 parent c767592 commit 6b338fe
Show file tree
Hide file tree
Showing 45 changed files with 182 additions and 1,105 deletions.
79 changes: 26 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,41 @@
name: Build and Smoke Test

on:
push:
pull_request:
branches:
- master

jobs:
ci:
if: github.repository == 'haskell/docker-haskell'
timeout-minutes: 30
runs-on: ubuntu-18.04
name: ${{ matrix.ghc }}-${{ matrix.deb }}
strategy:
fail-fast: false
matrix:
ghc: [8.6.5, 8.8.2, 8.8.3]
ghc: ['8.8.3', '8.10.1']
deb: ['stretch', 'buster']
include:
- ghc: 8.6.5
ghc_minor: 8.6
- ghc: 8.8.2
ghc_minor: 8.8
- ghc: 8.8.3
ghc_minor: 8.8
- ghc: '8.8.3'
ghc_minor: '8.8'
- ghc: '8.10.1'
ghc_minor: '8.10'
steps:
- uses: actions/checkout@v2
- name: docker build [${{ matrix.ghc }}]
uses: nick-invision/retry@v1
with:
timeout_minutes: 8
max_attempts: 3
command: docker build --pull --build-arg GHC=${{ matrix.ghc }} -t haskell:${{ matrix.ghc }} ${{ matrix.ghc_minor }}
- uses: actions/checkout@v2
with:
repository: docker-library/official-images
path: official-images
- name: run official-images tests
run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}
- uses: actions/checkout@v2
- name: docker build [${{ matrix.ghc }}]
uses: nick-invision/retry@v1
with:
timeout_minutes: 8
max_attempts: 3
command: |
docker build --pull \
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
${{ matrix.ghc_minor }}/${{ matrix.deb }}
- uses: actions/checkout@v2
with:
repository: docker-library/official-images
path: official-images
- name: run official-images tests
run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }}

ci-self-hosted:
if: github.repository == 'psftw/docker-haskell-private'
timeout-minutes: 20
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
ghc: [8.6.5, 8.8.2, 8.8.3]
include:
- ghc: 8.6.5
ghc_minor: 8.6
- ghc: 8.8.2
ghc_minor: 8.8
- ghc: 8.8.3
ghc_minor: 8.8
steps:
- uses: actions/checkout@v2
- name: docker build [${{ matrix.ghc }}]
run: docker build --pull --build-arg GHC=${{ matrix.ghc }} -t haskell:${{ matrix.ghc }} ${{ matrix.ghc_minor }}
- name: check for cabal-cache
run: |
docker volume inspect cabal-cache-${{ matrix.ghc }} &> /dev/null || \
docker run -t --rm -v cabal-cache-${{ matrix.ghc }}:/root/.cabal haskell:${{ matrix.ghc }} cabal new-update
- name: cabal new-install
run: docker run -t --rm -v cabal-cache-${{ matrix.ghc }}:/root/.cabal haskell:${{ matrix.ghc }} cabal new-install --lib primitive
- name: wipe stack cache
run: docker volume rm stack-test-${{ matrix.ghc }}
continue-on-error: true
- name: stack new
run: docker run -t --rm -v stack-test-${{ matrix.ghc }}:/stack -w /stack haskell:${{ matrix.ghc }} stack --resolver ghc-${{ matrix.ghc }} new testproject --bare
- name: stack run
run: docker run -t --rm -v stack-test-${{ matrix.ghc }}:/stack -w /stack haskell:${{ matrix.ghc }} stack run
48 changes: 48 additions & 0 deletions 8.10/buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM debian:buster

RUN apt-get update && \
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr && \
rm -rf /var/lib/apt/lists/*

ARG GHC=8.10.1
ARG DEBIAN_KEY=427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574
ARG CABAL_INSTALL=3.2
ARG STACK=2.3.1
ARG STACK_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
ARG STACK_RELEASE_KEY=2C6A674E85EE3FB896AFC9B965101FF31C5C154D

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${DEBIAN_KEY} && \
gpg --batch --armor --export ${DEBIAN_KEY} > /etc/apt/trusted.gpg.d/haskell.org.gpg.asc && \
gpgconf --kill all && \
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
cabal-install-${CABAL_INSTALL} \
curl \
g++ \
ghc-${GHC} \
git \
libsqlite3-dev \
libtinfo-dev \
make \
netbase \
openssh-client \
xz-utils \
zlib1g-dev && \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/*

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_KEY} && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_RELEASE_KEY} && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz -o stack.tar.gz && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
gpg --batch --trusted-key 0x575159689BEFB442 --verify stack.tar.gz.asc stack.tar.gz && \
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
/usr/local/bin/stack config set system-ghc --global true && \
/usr/local/bin/stack config set install-ghc --global false && \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz

ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/${CABAL_INSTALL}/bin:/opt/ghc/${GHC}/bin:$PATH

CMD ["ghci"]
48 changes: 48 additions & 0 deletions 8.10/stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM debian:stretch

RUN apt-get update && \
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr && \
rm -rf /var/lib/apt/lists/*

ARG GHC=8.10.1
ARG DEBIAN_KEY=427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574
ARG CABAL_INSTALL=3.2
ARG STACK=2.3.1
ARG STACK_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
ARG STACK_RELEASE_KEY=2C6A674E85EE3FB896AFC9B965101FF31C5C154D

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${DEBIAN_KEY} && \
gpg --batch --armor --export ${DEBIAN_KEY} > /etc/apt/trusted.gpg.d/haskell.org.gpg.asc && \
gpgconf --kill all && \
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
cabal-install-${CABAL_INSTALL} \
curl \
g++ \
ghc-${GHC} \
git \
libsqlite3-dev \
libtinfo-dev \
make \
netbase \
openssh-client \
xz-utils \
zlib1g-dev && \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/*

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_KEY} && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_RELEASE_KEY} && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz -o stack.tar.gz && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
gpg --batch --trusted-key 0x575159689BEFB442 --verify stack.tar.gz.asc stack.tar.gz && \
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
/usr/local/bin/stack config set system-ghc --global true && \
/usr/local/bin/stack config set install-ghc --global false && \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz

ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/${CABAL_INSTALL}/bin:/opt/ghc/${GHC}/bin:$PATH

CMD ["ghci"]
48 changes: 48 additions & 0 deletions 8.8/buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
FROM debian:buster

RUN apt-get update && \
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr && \
rm -rf /var/lib/apt/lists/*

ARG GHC=8.8.3
ARG DEBIAN_KEY=427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574
ARG CABAL_INSTALL=3.2
ARG STACK=2.3.1
ARG STACK_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
ARG STACK_RELEASE_KEY=2C6A674E85EE3FB896AFC9B965101FF31C5C154D

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${DEBIAN_KEY} && \
gpg --batch --armor --export ${DEBIAN_KEY} > /etc/apt/trusted.gpg.d/haskell.org.gpg.asc && \
gpgconf --kill all && \
echo 'deb http://downloads.haskell.org/debian buster main' > /etc/apt/sources.list.d/ghc.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
cabal-install-${CABAL_INSTALL} \
curl \
g++ \
ghc-${GHC} \
git \
libsqlite3-dev \
libtinfo-dev \
make \
netbase \
openssh-client \
xz-utils \
zlib1g-dev && \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/*

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_KEY} && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_RELEASE_KEY} && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz -o stack.tar.gz && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
gpg --batch --trusted-key 0x575159689BEFB442 --verify stack.tar.gz.asc stack.tar.gz && \
tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 && \
/usr/local/bin/stack config set system-ghc --global true && \
/usr/local/bin/stack config set install-ghc --global false && \
rm -rf "$GNUPGHOME" /var/lib/apt/lists/* /stack.tar.gz.asc /stack.tar.gz

ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/cabal/${CABAL_INSTALL}/bin:/opt/ghc/${GHC}/bin:$PATH

CMD ["ghci"]
18 changes: 12 additions & 6 deletions 8.8/Dockerfile → 8.8/stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

ARG GHC=8.8.3
ARG STACK=2.1.3
ARG CABAL_INSTALL=3.0
ARG DEBIAN_KEY=427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574
ARG CABAL_INSTALL=3.2
ARG STACK=2.3.1
ARG STACK_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442
ARG STACK_RELEASE_KEY=2C6A674E85EE3FB896AFC9B965101FF31C5C154D

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 427CB69AAC9D00F2A43CAF1CBA3CBA3FFE22B574 && \
RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ${DEBIAN_KEY} && \
gpg --batch --armor --export ${DEBIAN_KEY} > /etc/apt/trusted.gpg.d/haskell.org.gpg.asc && \
gpgconf --kill all && \
echo 'deb http://downloads.haskell.org/debian stretch main' > /etc/apt/sources.list.d/ghc.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -24,11 +30,11 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 427CB69AAC9D00F2A43
openssh-client \
xz-utils \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*
rm -rf "$GNUPGHOME" /var/lib/apt/lists/*

RUN export GNUPGHOME="$(mktemp -d)" && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys C5705533DA4F78D8664B5DC0575159689BEFB442 && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 2C6A674E85EE3FB896AFC9B965101FF31C5C154D && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_KEY} && \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys ${STACK_RELEASE_KEY} && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz -o stack.tar.gz && \
curl -fSL https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-x86_64.tar.gz.asc -o stack.tar.gz.asc && \
gpg --batch --trusted-key 0x575159689BEFB442 --verify stack.tar.gz.asc stack.tar.gz && \
Expand Down
1 change: 0 additions & 1 deletion examples/7.10/snap/.dockerignore

This file was deleted.

4 changes: 0 additions & 4 deletions examples/7.10/snap/.ghci

This file was deleted.

19 changes: 0 additions & 19 deletions examples/7.10/snap/Dockerfile

This file was deleted.

Binary file removed examples/7.10/snap/site_key.txt
Binary file not shown.
63 changes: 0 additions & 63 deletions examples/7.10/snap/snap-example.cabal

This file was deleted.

9 changes: 0 additions & 9 deletions examples/7.10/snap/snaplets/heist/templates/_login.tpl

This file was deleted.

5 changes: 0 additions & 5 deletions examples/7.10/snap/snaplets/heist/templates/_new_user.tpl

This file was deleted.

13 changes: 0 additions & 13 deletions examples/7.10/snap/snaplets/heist/templates/base.tpl

This file was deleted.

Loading

0 comments on commit 6b338fe

Please sign in to comment.