# Copyright 2022 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Sets up a github workflow.
# It is designed to be called from a parent workflow.
# The concurrency of this workflow is controlled by the caller's job.

name: Setup

on:
  workflow_call:
    outputs:
      enabled-jobs:
        description: |
          Which jobs should run.
        value: ${{ jobs.setup.outputs.enabled-jobs }}
      is-pr:
        description: |
          Whether the workflow has been triggered by a pull request.
        value: ${{ jobs.setup.outputs.is-pr }}
      runner-env:
        description: |
          The runner environment to use.
        value: ${{ jobs.setup.outputs.runner-env }}
      runner-group:
        description: |
          The runner group to use.
        value: ${{ jobs.setup.outputs.runner-group }}
      write-caches:
        description: |
          Whether to write to caches.
        value: ${{ jobs.setup.outputs.write-caches }}

permissions:
  contents: read

jobs:
  setup:
    runs-on: ubuntu-24.04
    env:
      # The commit being checked out is the merge commit for the PR. Its first
      # parent will be the tip of main.
      BASE_REF: HEAD^
    outputs:
      enabled-jobs: ${{ steps.configure.outputs.enabled-jobs }}
      is-pr: ${{ steps.configure.outputs.is-pr }}
      runner-env: ${{ steps.configure.outputs.runner-env }}
      runner-group: ${{ steps.configure.outputs.runner-group }}
      write-caches: ${{ steps.configure.outputs.write-caches }}
    steps:
      - name: "Checking out repository"
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          # We need the parent commit to do a diff
          fetch-depth: 2
      - name: "Fetching PR description"
        # We fetch the latest pull request data (description, labels, ...) from
        # API instead of using stale one from pull_request event. This makes it
        # possible to update the trailers, labels on the pull request and re-run
        # the workflow to make them take effect.
        # This is majorly for triggering benchmarks without pushing new commits.
        # See https://github.com/iree-org/iree/issues/10042#issuecomment-1449250094
        # for more details.
        id: fetch-pr
        if: github.event_name == 'pull_request'
        env:
          PR_NUMBER: ${{ github.event.number }}
          PR_JSON: pull_request.json
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gh api "/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}" > "${PR_JSON}"
          # It requires delimiter to pass multiline strings through
          # GITHUB_OUTPUT. Since these are already escaped JSON strings, pass
          # the JSON strings and later use fromJSON to decode them.
          echo "pr-title=$(jq '.title' ${PR_JSON})" >> "${GITHUB_OUTPUT}"
          echo "pr-body=$(jq '.body' ${PR_JSON})" >> "${GITHUB_OUTPUT}"
          echo "pr-branch=$(jq '.head.ref' ${PR_JSON})" >> "${GITHUB_OUTPUT}"
          # Use --compact-output to avoid multiline JSON.
          echo "pr-labels=$(jq --compact-output '.labels | map(.name)' \
            ${PR_JSON})" >> "${GITHUB_OUTPUT}"
      - name: "Configuring CI options"
        id: configure
        env:
          PR_TITLE: ${{ fromJSON(steps.fetch-pr.outputs.pr-title || '""') }}
          PR_BODY: ${{ fromJSON(steps.fetch-pr.outputs.pr-body || '""') }}
          PR_BRANCH: ${{ fromJSON(steps.fetch-pr.outputs.pr-branch || '""') }}
          PR_LABELS: ${{ steps.fetch-pr.outputs.pr-labels || '[]' }}
          ORIGINAL_PR_TITLE: ${{ github.event.pull_request.title }}
          ORIGINAL_PR_BODY: ${{ github.event.pull_request.body }}
          ORIGINAL_PR_LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}
        run: |
          # Just informative logging. There should only be two commits in the
          # history here, but limiting the depth helps when copying from a local
          # repo instead of using checkout, e.g. with
          # https://github.com/nektos/act where there will be more.
          git log --oneline --graph --max-count=3

          ./build_tools/github_actions/configure_ci.py

      - name: "Show enabled options"
        env:
          ENABLED_JOBS: ${{ join(fromJson(steps.configure.outputs.enabled-jobs)) || 'None' }}
        run: |
          echo ":green_circle: Enabled jobs: \`${ENABLED_JOBS}\`" \
              >> "${GITHUB_STEP_SUMMARY}"
