workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "api"
    - if: $CI_PIPELINE_SOURCE == "web"
command:
  timeout: 24 hours
  image: paritytech/ci-unified:bullseye-1.81.0-2024-11-19-v202411281558
  tags:
    - weights-vm
  variables:
    PIPELINE_SCRIPTS_REF: main
    GH_OWNER: paritytech
    GH_OWNER_REPO: polkadot-sdk
    GH_OWNER_BRANCH: master
    GH_CONTRIBUTOR: serban300
    GH_CONTRIBUTOR_REPO: polkadot-sdk
    GH_CONTRIBUTOR_BRANCH: beefy-equivocation-runtime
    GH_HEAD_SHA: 9420dac5fa91eb80f732b967657e9d5c9ab3275e
    COMMIT_MESSAGE: '"$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh"
      --subcommand=pallet --runtime=westend --target_dir=polkadot
      --pallet=pallet_beefy_mmr'
    PIPELINE_SCRIPTS_REPOSITORY: https://github.com/paritytech/command-bot-scripts/
    PIPELINE_SCRIPTS_DIR: .git/.scripts
  script:
    - ""
    - '        echo "This job is related to task
      6-ee38b68a-0826-4093-81e1-df539846b049. The task was generated from a
      comment in
      https://github.com/paritytech/polkadot-sdk/pull/6732#issuecomment-2511957314."'
    - ""
    - "        # The scripts repository might be left over from a previous run
      in the"
    - "        # same Gitlab shell executor"
    - '        rm -rf "$PIPELINE_SCRIPTS_DIR"'
    - ""
    - '        if [ "${PIPELINE_SCRIPTS_REPOSITORY:-}" ]; then'
    - '          if [ "${PIPELINE_SCRIPTS_REF:-}" ]; then'
    - '            git clone --progress --verbose --depth 1 --branch
      "$PIPELINE_SCRIPTS_REF" "$PIPELINE_SCRIPTS_REPOSITORY"
      "$PIPELINE_SCRIPTS_DIR"'
    - "          else"
    - '            git clone --progress --verbose --depth 1
      "$PIPELINE_SCRIPTS_REPOSITORY" "$PIPELINE_SCRIPTS_DIR"'
    - "          fi"
    - "        fi"
    - '        export ARTIFACTS_DIR="$PWD/.git/.artifacts"'
    - "        # The artifacts directory might be left over from a previous run
      in"
    - "        # the same Gitlab shell executor"
    - '        rm -rf "$ARTIFACTS_DIR"'
    - '        mkdir -p "$ARTIFACTS_DIR"'
    - "        "
    - '"$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" --subcommand=pallet
      --runtime=westend --target_dir=polkadot --pallet=pallet_beefy_mmr'
  artifacts:
    name: ${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}
    expire_in: 7 days
    when: always
    paths:
      - .git/.artifacts
