version: "3.5"

services:
  almalinux-8-base:
    image: almalinux:8

  almalinux-8:
    image: ghcr.io/${GITHUB_REPOSITORY}:almalinux-8
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:almalinux-8
      context: .
      dockerfile: dockerfiles/almalinux-8.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  almalinux-9-base:
    image: almalinux:9

  almalinux-9:
    image: ghcr.io/${GITHUB_REPOSITORY}:almalinux-9
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:almalinux-9
      context: .
      dockerfile: dockerfiles/almalinux-9.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  apache-arrow:
    image: ghcr.io/${GITHUB_REPOSITORY}:apache-arrow
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:apache-arrow
      context: .
      dockerfile: dockerfiles/apache-arrow.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-apache-arrow-test.sh

  arch-linux-base:
    image: archlinux

  arch-linux:
    image: ghcr.io/${GITHUB_REPOSITORY}:arch-linux
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:arch-linux
      context: .
      dockerfile: dockerfiles/arch-linux.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  centos-7-base:
    image: centos:7

  centos-7:
    image: ghcr.io/${GITHUB_REPOSITORY}:centos-7
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:centos-7
      context: .
      dockerfile: dockerfiles/centos-7.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test-scl.sh

  conda-base:
    image: continuumio/miniconda3

  conda:
    image: ghcr.io/${GITHUB_REPOSITORY}:conda
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:conda
      context: .
      dockerfile: dockerfiles/conda.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  fedora-arm32v7-rawhide-base:
    image: arm32v7/fedora:rawhide

  fedora-arm32v7-rawhide:
    image: ghcr.io/${GITHUB_REPOSITORY}:fedora-arm32v7-rawhide
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:fedora-arm32v7-rawhide
      context: .
      dockerfile: dockerfiles/fedora-arm32v7-rawhide.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh
    cap_add:
      - SYS_ADMIN

  fedora-rawhide-base:
    image: fedora:rawhide

  fedora-rawhide:
    image: ghcr.io/${GITHUB_REPOSITORY}:fedora-rawhide
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:fedora-rawhide
      context: .
      dockerfile: dockerfiles/fedora-rawhide.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh
    cap_add:
      - SYS_ADMIN

  ruby-3.0-base:
    image: ruby:3.0

  ruby-3.0:
    image: ghcr.io/${GITHUB_REPOSITORY}:ruby-3.0
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:ruby-3.0
      context: .
      dockerfile: dockerfiles/ruby.dockerfile
      args:
        RUBY_VERSION: "3.0"
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  ruby-3.1-base:
    image: ruby:3.1

  ruby-3.1:
    image: ghcr.io/${GITHUB_REPOSITORY}:ruby-3.1
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:ruby-3.1
      context: .
      dockerfile: dockerfiles/ruby.dockerfile
      args:
        RUBY_VERSION: "3.1"
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  ruby-3.2-base:
    image: ruby:3.2

  ruby-3.2:
    image: ghcr.io/${GITHUB_REPOSITORY}:ruby-3.2
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:ruby-3.2
      context: .
      dockerfile: dockerfiles/ruby.dockerfile
      args:
        RUBY_VERSION: "3.2"
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  ruby-3.3-base:
    image: ruby:3.3

  ruby-3.3:
    image: ghcr.io/${GITHUB_REPOSITORY}:ruby-3.3
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:ruby-3.3
      context: .
      dockerfile: dockerfiles/ruby.dockerfile
      args:
        RUBY_VERSION: "3.3"
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  ubuntu-20.04-base:
    image: ubuntu:20.04

  ubuntu-20.04:
    image: ghcr.io/${GITHUB_REPOSITORY}:ubuntu-20.04
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:ubuntu-20.04
      context: .
      dockerfile: dockerfiles/ubuntu-20.04.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh

  ubuntu-22.04-base:
    image: ubuntu:22.04

  ubuntu-22.04:
    image: ghcr.io/${GITHUB_REPOSITORY}:ubuntu-22.04
    build:
      cache_from:
        - ghcr.io/${GITHUB_REPOSITORY}:ubuntu-22.04
      context: .
      dockerfile: dockerfiles/ubuntu-22.04.dockerfile
    volumes:
      - .:/ruby-gnome:delegated
    environment:
      GITHUB_ACTIONS:
    command:
      /ruby-gnome/dockerfiles/run-test.sh
