# Run tests on multiple ghc versions.
#
# Dependencies are cached between runs in the cabal-store-cache volume.
#
# To launch tests:
#
#  $ docker-compose up -d
#
# To check on their status:
#
#  $ docker-compose ps
#
# To read logs from a build:
#
#  $ docker-compose logs binary_binary_ghc842
#
# To cancel or clean up when finished:
#  
#  $ docker-compose down
#  $ docker volume rm cabal-store-cache
#

version: '3'
services:
  binary_ghc865:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=8.6.5
    volumes:
     - cabal-store-cache:/root/.cabal/store

  binary_ghc844:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=8.4.4
    volumes:
     - cabal-store-cache:/root/.cabal/store

  binary_ghc822:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=8.2.2
    volumes:
     - cabal-store-cache:/root/.cabal/store

  binary_ghc802:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=8.0.2
    volumes:
     - cabal-store-cache:/root/.cabal/store

  binary_ghc7103:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=7.10.3
    volumes:
     - cabal-store-cache:/root/.cabal/store

  binary_ghc784:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=7.8.4
    volumes:
     - cabal-store-cache:/root/.cabal/store

  binary_ghc763:
    build:
      context: .
      dockerfile: docker/Dockerfile.anyghc
      args:
       - ghcver=7.6.3
    volumes:
     - cabal-store-cache:/root/.cabal/store

volumes:
  cabal-store-cache:
    driver: local
