name: Build clio
description: Build clio in build directory
inputs:
  target:
    description: Build target name
    default: all
  substract_threads:
    description: An option for the action get_number_of_threads. See get_number_of_threads 
    required: true
    default: '0'
runs:
  using: composite
  steps:
    - name: Get number of threads
      uses: ./.github/actions/get_number_of_threads
      id: number_of_threads
      with:
        substract_threads: ${{ inputs.substract_threads }}

    - name: Build Clio
      shell: bash
      run: |
        cd build
        cmake --build . --parallel ${{ steps.number_of_threads.outputs.threads_number }} --target ${{ inputs.target }}
