.etnaviv-rules:
  stage: etnaviv
  rules:
    - !reference [.test, rules]
    - !reference [.austriancoder-farm-rules, rules]
    - !reference [.gl-rules, rules]
    - changes: &etnaviv_file_list
        - src/etnaviv/*
        - src/etnaviv/ci/gitlab-ci.yml
        - src/etnaviv/ci/deqp-$DEQP_SUITE.toml
        - src/etnaviv/ci/$GPU_VERSION-fails.txt
        - src/etnaviv/ci/$GPU_VERSION-flakes.txt
        - src/etnaviv/ci/$GPU_VERSION-skips.txt
        - src/etnaviv/drm/**/*
        - src/etnaviv/drm-shim/**/*
        - src/etnaviv/isa/**/*
        - src/gallium/drivers/etnaviv/**/*
        - src/gallium/winsys/etnaviv/**/*
        - src/gallium/auxiliary/renderonly/**/*
        - src/gallium/winsys/kmsro/**/*
      when: on_success

.etnaviv-manual-rules:
  stage: etnaviv-postmerge
  extends: .no-auto-retry
  rules:
    - !reference [.test, rules]
    - !reference [.austriancoder-farm-manual-rules, rules]
    - !reference [.gl-manual-rules, rules]
    - changes:
        *etnaviv_file_list
      when: manual

# 1 devices (2023-12-16)
.austriancoder-imx6q-cubox-i:arm32:
  variables:
    BM_CMDLINE: "ip=dhcp console=ttymxc0,115200n8 root=/dev/nfs rw nfsrootdebug init=/init $BM_KERNELARGS"
    BM_DTB: imx6q-cubox-i
    BM_KERNEL: zImage
    DEQP_EXPECTED_RENDERER: GC2000
    GPU_VERSION: "etnaviv-gc2000"
  script:
    - ./install/bare-metal/fastboot.sh
  tags:
    - etnaviv-gc2000

# 1 devices (2023-12-16)
.austriancoder-imx8mq-nitrogen:arm64:
  variables:
    BM_CMDLINE: "ip=dhcp console=ttymxc0,115200n8 root=/dev/nfs rw nfsrootdebug init=/init $BM_KERNELARGS"
    BM_DTB: imx8mq-nitrogen
    BM_KERNEL: Image
    DEQP_EXPECTED_RENDERER: GC7000
    GPU_VERSION: "etnaviv-gc7000"
  script:
    - ./install/bare-metal/fastboot.sh
  tags:
    - austriancoder-etnaviv-imx8mq-nitrogen


gc2000_gles2:
  extends:
    - .baremetal-test-arm32
    - .austriancoder-imx6q-cubox-i:arm32
    - .etnaviv-manual-rules
  variables:
    FLAKES_CHANNEL: "#etnaviv-ci"
    HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
    DEQP_VER: gles2
  timeout: 20m

gc2000_gles2_asan:
  extends:
    - gc2000_gles2
    - .baremetal-arm32-asan-test
  variables:
    DEQP_FRACTION: 100
    FDO_CI_CONCURRENT: 1

gc2000_piglit:
  extends:
    - .baremetal-deqp-test
    - .baremetal-test-arm32
    - .austriancoder-imx6q-cubox-i:arm32
    - .etnaviv-manual-rules
  variables:
    DEQP_SUITE: etnaviv-gc2000-piglit
    FLAKES_CHANNEL: "#etnaviv-ci"
  timeout: 40m

gc7000_gles2:
  extends:
    - .baremetal-test-arm64
    - .austriancoder-imx8mq-nitrogen:arm64
    - .etnaviv-manual-rules
  variables:
    FLAKES_CHANNEL: "#etnaviv-ci"
    HWCI_TEST_SCRIPT: "/install/deqp-runner.sh"
    DEQP_VER: gles2
  timeout: 20m
