- name: Guardian
  run:
    when: "${CHANGE_IN(guardian)}"
  execution_time_limit:
    minutes: 30
  dependencies:
    - Prerequisites
  task:
    env_vars:
      - name: BUILD_CACHE_GROUP
        value: "guardian"
    prologue:
      commands:
        - cd guardian
    jobs:
      - name: "Guardian: CI"
        commands:
          - ../.semaphore/run-and-monitor make-ci.log make ci
        env_vars:
          - name: STORE_BUILD_CACHE
            value: "true"
      - name: "Guardian: build multi-arch"
        matrix:
          - env_var: ARCH
            values:
              - arm64
              - ppc64le
              - s390x
        commands:
          - ../.semaphore/run-and-monitor image-$ARCH.log make build ARCH=$ARCH
