name: ci

on:
  pull_request:
    branches:
      - master
  push:
    branches:
      - '**'

jobs:
  linters:
    uses: ./.github/workflows/ci_linters.yml

  fedora:
    uses: ./.github/workflows/ci_rspamd.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:fedora-ci
      name: fedora-ci
      enable_luajit: 'OFF'

  ubuntu_amd64:
    uses: ./.github/workflows/ci_rspamd.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:ubuntu-ci
      name: ubuntu-ci-amd64

  ubuntu_arm64:
    if: ${{ !vars.NO_ARM }}
    uses: ./.github/workflows/ci_rspamd.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:ubuntu-ci
      name: ubuntu-ci-arm64
      runner: ${{ vars.ARM_RUNNER || 'ubuntu-24.04-arm' }}

  ubuntu-focal:
    uses: ./.github/workflows/ci_rspamd_build.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:ubuntu-focal
      name: ubuntu-focal

  centos-8:
    uses: ./.github/workflows/ci_rspamd_build.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:centos-8
      name: centos-8

  centos-9:
    uses: ./.github/workflows/ci_rspamd_build.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:centos-9
      name: centos-9

  webui-e2e-playwright:
    needs: ubuntu_amd64
    uses: ./.github/workflows/ci_webui_e2e_playwright.yml
    with:
      image: ghcr.io/rspamd/rspamd-build-docker:ubuntu-ci
      name: ubuntu-ci-amd64
