# This defines the full set of distros we run CI on.
---
platform_map:  # map packaging architectures to docker platforms
  aarch64: linux/arm64/v8
  amd64: linux/amd64
  arm64: linux/arm64/v8
  armhf: linux/arm/v7
  armhfp: linux/arm/v7
  armv6l: linux/arm/v6
  armv7l: linux/arm/v7
  i386: linux/386
  ppc64le: linux/ppc64le
  x86_64: linux/amd64
arch_order:  # sort order for per-architecture jobs in CI
  - amd64
  - x86_64
  - i386
  - armhf
  - armhfp
  - armv6l
  - armv7l
  - arm64
  - aarch64
  - ppc64le
arch_data:  # Mapping of per-architecture matrix behavior.
  amd64: &amd64
    qemu: false
    runner: &x86-runner ubuntu-22.04
  x86_64: *amd64
  i386: *amd64
  armhf: &arm
    qemu: false
    runner: &arm-runner ubuntu-22.04-arm
  armhfp: *arm
  armv6l: *arm
  armv7l: *arm
  arm64: &arm64
    qemu: false
    runner: *arm-runner
  aarch64: *arm64
  ppc64le:
    qemu: true
    runner: *x86-runner
static_arches:  # Static build architectures
  - x86_64
  - armv6l
  - armv7l
  - aarch64
  - ppc64le
docker_arches:  # Docker build archtiectures
  - amd64
  - i386
  - armv7l
  - arm64
  - ppc64le
default_sentry: &default_sentry # Default configuration for Sentry usage
  amd64: false
  x86_64: false
  i386: false
  armhf: false
  armhfp: false
  arm64: false
  aarch64: false
default_builder_rev: &def_builder_rev v1
include:
  - &alpine
    distro: alpine
    version: edge
    support_type: Community
    notes: ''
    eol_check: false
    bundle_sentry: *default_sentry
    env_prep: |
      apk add -U bash
    jsonc_removal: |
      apk del json-c-dev
    test:
      ebpf-core: true
  - <<: *alpine
    version: "3.20"
    support_type: Core
    notes: ''
    eol_check: true

  - distro: archlinux
    version: latest
    support_type: Intermediate
    notes: ''
    eol_check: false
    bundle_sentry: *default_sentry
    env_prep: |
      pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi
    test:
      ebpf-core: true

  - &amzn
    distro: amazonlinux
    version: "2"
    support_type: Core
    notes: ''
    eol_check: 'amazon-linux'
    bundle_sentry: *default_sentry
    packages: &amzn_packages
      type: rpm
      repo_distro: amazonlinux/2
      builder_rev: *def_builder_rev
      arches:
        - x86_64
        - aarch64
    test: &amzn_test
      ebpf-core: false
      skip-local-build: true
  - <<: *amzn
    version: "2023"
    packages:
      <<: *amzn_packages
      repo_distro: amazonlinux/2023
    test:
      <<: *amzn_test
      skip-local-build: false

  - distro: centos
    version: "7"
    base_image: "netdata/legacy:centos7"
    support_type: Core
    notes: ''
    eol_check: false
    bundle_sentry: *default_sentry
    packages:
      type: rpm
      repo_distro: el/7
      builder_rev: *def_builder_rev
      alt_links:
        - el/7Server
        - el/7Client
      arches:
        - x86_64
    test:
      ebpf-core: false
      skip-local-build: true

  - &centos_stream
    distro: centos-stream
    base_image: 'quay.io/centos/centos:stream9'
    version: '9'
    support_type: 'Community'
    notes: ''
    jsonc_removal: |
      dnf remove -y json-c-devel
    eol_check: true
    bundle_sentry: *default_sentry
    packages: &cs_packages
      type: rpm
      repo_distro: el/c9s
      builder_rev: *def_builder_rev
      arches:
        - x86_64
        - aarch64
    test:
      ebpf-core: true

  - &debian
    distro: debian
    version: "12"
    support_type: Core
    notes: ''
    base_image: debian:bookworm
    eol_check: true
    eol_lts: true
    bundle_sentry:
      <<: *default_sentry
      amd64: true
    env_prep: |
      apt-get update
    jsonc_removal: |
      apt-get purge -y libjson-c-dev
    packages: &debian_packages
      type: deb
      repo_distro: debian/bookworm
      builder_rev: v2
      arches:
        - i386
        - amd64
        - armhf
        - arm64
    test:
      ebpf-core: true
  - <<: *debian
    version: "11"
    base_image: debian:bullseye
    packages:
      <<: *debian_packages
      repo_distro: debian/bullseye
    test:
      ebpf-core: false

  - &fedora
    distro: fedora
    version: "41"
    support_type: Core
    notes: ''
    eol_check: true
    bundle_sentry: *default_sentry
    jsonc_removal: |
      dnf remove -y json-c-devel
    packages: &fedora_packages
      type: rpm
      repo_distro: fedora/41
      builder_rev: *def_builder_rev
      arches:
        - x86_64
        - aarch64
    test:
      ebpf-core: true
  - <<: *fedora
    version: "40"
    packages:
      <<: *fedora_packages
      repo_distro: fedora/40
    test:
      ebpf-core: true

  - &opensuse
    distro: opensuse
    version: "15.6"
    support_type: Core
    notes: ''
    eol_check: true
    bundle_sentry: *default_sentry
    base_image: opensuse/leap:15.6
    jsonc_removal: |
      zypper rm -y libjson-c-devel
    packages: &opensuse_packages
      type: rpm
      repo_distro: opensuse/15.6
      builder_rev: *def_builder_rev
      arches:
        - x86_64
        - aarch64
    test:
      ebpf-core: true

  - &oracle
    distro: oraclelinux
    version: "8"
    support_type: Core
    notes: ''
    eol_check: true
    bundle_sentry: *default_sentry
    jsonc_removal: |
      dnf remove -y json-c-devel
    packages: &oracle_packages
      type: rpm
      repo_distro: ol/8
      builder_rev: *def_builder_rev
      arches:
        - x86_64
        - aarch64
    test:
      ebpf-core: true
  - <<: *oracle
    version: "9"
    packages:
      <<: *oracle_packages
      repo_distro: ol/9

  - &rocky
    distro: rockylinux
    version: "9"
    support_type: Core
    notes: ''
    jsonc_removal: |
      dnf remove -y json-c-devel
    eol_check: true
    bundle_sentry: *default_sentry
    packages: &rocky_packages
      type: rpm
      repo_distro: el/9
      builder_rev: *def_builder_rev
      alt_links:
        - el/9Server
        - el/9Client
        - el/9RedHatVirtualizationHost
      arches:
        - x86_64
        - aarch64
    test:
      ebpf-core: true
  - <<: *rocky
    version: "8"
    packages:
      <<: *rocky_packages
      repo_distro: el/8
      alt_links:
        - el/8Server
        - el/8Client
        - el/8RedHatVirtualizationHost

  - &ubuntu
    distro: ubuntu
    version: "24.04"
    support_type: Core
    notes: ''
    eol_check: true
    bundle_sentry:
      <<: *default_sentry
      amd64: true
    env_prep: |
      rm -f /etc/apt/apt.conf.d/docker && apt-get update
    jsonc_removal: |
      apt-get remove -y libjson-c-dev
    packages: &ubuntu_packages
      type: deb
      repo_distro: ubuntu/noble
      builder_rev: v2
      arches:
        - amd64
        - armhf
        - arm64
    test:
      ebpf-core: true
  - <<: *ubuntu
    version: "24.10"
    packages:
      <<: *ubuntu_packages
      repo_distro: ubuntu/oracular
  - <<: *ubuntu
    version: "22.04"
    packages:
      <<: *ubuntu_packages
      repo_distro: ubuntu/jammy
  - <<: *ubuntu
    version: "20.04"
    packages:
      <<: *ubuntu_packages
      repo_distro: ubuntu/focal
legacy: # Info for platforms we used to support and still need to handle packages for
  - <<: *debian
    version: "10"
    packages:
      <<: *debian_packages
      repo_distro: debian/buster
  - <<: *fedora
    version: "37"
    packages:
      <<: *fedora_packages
      repo_distro: fedora/37
  - <<: *fedora
    version: "38"
    packages:
      <<: *fedora_packages
      repo_distro: fedora/38
  - <<: *fedora
    version: "39"
    packages:
      <<: *fedora_packages
      repo_distro: fedora/39
    test:
      ebpf-core: true
  - <<: *opensuse
    version: "15.4"
    packages:
      <<: *opensuse_packages
      repo_distro: opensuse/15.4
  - <<: *opensuse
    version: "15.5"
    base_image: opensuse/leap:15.5
    packages:
      <<: *opensuse_packages
      repo_distro: opensuse/15.5
  - <<: *centos_stream
    version: '8'
    base_image: 'quay.io/centos/centos:stream8'
    packages:
      <<: *cs_packages
      repo_distro: el/c8s
  - <<: *ubuntu
    version: "23.10"
    packages:
      <<: *ubuntu_packages
      repo_distro: ubuntu/mantic
no_include: # Info for platforms not covered in CI
  - distro: docker
    version: "19.03 or newer"
    support_type: Core
    notes: ''
    packages:
      arches:
        - linux/i386
        - linux/amd64
        - linux/arm/v7
        - linux/arm64
        - linux/ppc64le

  - distro: clearlinux
    version: latest
    support_type: Community
    notes: ''

  - &rhel
    distro: rhel
    version: "9.x"
    support_type: Core
    notes: ''
    packages:
      arches:
        - x86_64
        - aarch64
  - <<: *rhel
    version: "8.x"
  - <<: *rhel
    version: "7.x"
    packages:
      arches:
        - x86_64

  - &freebsd
    distro: freebsd
    version: 13-STABLE
    support_type: Community
    notes: ''

  - &macos
    distro: macos
    version: '13'
    support_type: Community
    notes: ''
  - <<: *macos
    version: '12'
  - <<: *macos
    version: '11'

  - distro: gentoo
    version: latest
    support_type: Community
    notes: ''
