# ===---
# To be run manually by maintainers
# ===---

name: On demand verification
run-name: 'On demand by ${{ github.actor }}'

permissions:
  contents: read

on:
  workflow_dispatch:
    inputs:
      ref_llvm:
        description: 'LLVM ref to build with'
        required: true
        default: main
      ref_translator:
        description: 'SPIRV-LLVM-Translator ref to build with'
        required: true
        default: main
      ref_opencl-clang:
        description: 'opencl-clang ref to build with'
        required: true
        default: main
      build_type:
        description: 'Build type to pass to CMake'
        required: true
        default: Release
        type: choice
        options: 
        - Release
        - Debug
        - RelWithDebInfo

jobs:

  verify_on_demand:
    runs-on: ubuntu-22.04
    steps:

      - name: Checkout opencl-clang sources for action files availabilty
        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

      - name: Run build-opencl-clang action
        uses: ./.github/actions/build-opencl-clang
        with:
          ref_llvm: ${{ inputs.ref_llvm }}
          ref_translator:  ${{ inputs.ref_translator }}
          ref_opencl-clang:  ${{ inputs.ref_opencl-clang }}
