include:
  - 'ci/integration-template.yml'

.centos-stream-8-tests:
  variables:
    # needed by libvirt-gitlab-executor
    DISTRO: centos-stream-8
    # can be overridden in forks to set a different runner tag
    LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
  tags:
    - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG

centos-stream-8-tests-prebuilt-env:
  extends:
    - .integration_tests_prebuilt_env
    - .centos-stream-8-tests
  needs:
    - x86_64-centos-stream-8-prebuilt-env
    - project: libvirt/libvirt-perl
      job: x86_64-centos-stream-8-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-centos-stream-8-prebuilt-env
      ref: master
      artifacts: true

centos-stream-8-tests-local-env:
  extends:
    - .integration_tests_local_env
    - .centos-stream-8-tests
  needs:
    - x86_64-centos-stream-8-local-env
    - project: libvirt/libvirt-perl
      job: x86_64-centos-stream-8-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-centos-stream-8-prebuilt-env
      ref: master
      artifacts: true


.centos-stream-9-tests:
  variables:
    # needed by libvirt-gitlab-executor
    DISTRO: centos-stream-9
    # can be overridden in forks to set a different runner tag
    LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
  tags:
    - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG

centos-stream-9-tests-prebuilt-env:
  extends:
    - .integration_tests_prebuilt_env
    - .centos-stream-9-tests
  needs:
    - x86_64-centos-stream-9-prebuilt-env
    - project: libvirt/libvirt-perl
      job: x86_64-centos-stream-9-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-centos-stream-9-prebuilt-env
      ref: master
      artifacts: true

centos-stream-9-tests-local-env:
  extends:
    - .integration_tests_local_env
    - .centos-stream-9-tests
  needs:
    - x86_64-centos-stream-9-local-env
    - project: libvirt/libvirt-perl
      job: x86_64-centos-stream-9-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-centos-stream-9-prebuilt-env
      ref: master
      artifacts: true


.fedora-36-tests:
  variables:
    # needed by libvirt-gitlab-executor
    DISTRO: fedora-36
    # can be overridden in forks to set a different runner tag
    LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
  tags:
    - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG

fedora-36-tests-prebuilt-env:
  extends:
    - .integration_tests_prebuilt_env
    - .fedora-36-tests
  needs:
    - x86_64-fedora-36-prebuilt-env
    - project: libvirt/libvirt-perl
      job: x86_64-fedora-36-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-fedora-36-prebuilt-env
      ref: master
      artifacts: true

fedora-36-tests-local-env:
  extends:
    - .integration_tests_local_env
    - .fedora-36-tests
  needs:
    - x86_64-fedora-36-local-env
    - project: libvirt/libvirt-perl
      job: x86_64-fedora-36-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-fedora-36-prebuilt-env
      ref: master
      artifacts: true


.fedora-37-tests:
  variables:
    # needed by libvirt-gitlab-executor
    DISTRO: fedora-37
    # can be overridden in forks to set a different runner tag
    LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
  tags:
    - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG

fedora-37-tests-prebuilt-env:
  extends:
    - .integration_tests_prebuilt_env
    - .fedora-37-tests
  needs:
    - x86_64-fedora-37-prebuilt-env
    - project: libvirt/libvirt-perl
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true

fedora-37-tests-local-env:
  extends:
    - .integration_tests_local_env
    - .fedora-37-tests
  needs:
    - x86_64-fedora-37-local-env
    - project: libvirt/libvirt-perl
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true


.fedora-37-upstream-qemu-tests:
  variables:
    # needed by libvirt-gitlab-executor
    DISTRO: fedora-37
    # can be overridden in forks to set a different runner tag
    LIBVIRT_CI_INTEGRATION_RUNNER_TAG: redhat-vm-host
  tags:
    - $LIBVIRT_CI_INTEGRATION_RUNNER_TAG

fedora-37-upstream-qemu-tests-prebuilt-env:
  extends:
    - .integration_tests_prebuilt_env
    - .fedora-37-upstream-qemu-tests
  needs:
    - x86_64-fedora-37-prebuilt-env
    - project: libvirt/libvirt-perl
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true

fedora-37-upstream-qemu-tests-local-env:
  extends:
    - .integration_tests_local_env
    - .fedora-37-upstream-qemu-tests
  needs:
    - x86_64-fedora-37-local-env
    - project: libvirt/libvirt-perl
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true
    - project: libvirt/libvirt-python
      job: x86_64-fedora-37-prebuilt-env
      ref: master
      artifacts: true