name: Non-target-specific extended

on:
  workflow_dispatch:
  workflow_call:
    inputs:
      all:
        type: boolean

env:
  # 2020.11
  vcpkgGitRef: 0bf3923f9fab4001c00f0f429682a0853b5749e0

concurrency:
  group: only-non-target-specific-extended-${{ github.ref }}-${{ github.event_path }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:

  # Test the Gradle build.
  building:
    if: ${{ inputs.all || github.event.pull_request.draft }}
    uses: ./.github/workflows/build.yml
    with:
      all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}

  # Run tests for the standalone compiler.
  cli:
    if: ${{ inputs.all || github.event.pull_request.draft }}
    uses: ./.github/workflows/cli-tests.yml
    with:
      all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}

  # Run language server tests.
  lsp:
    if: ${{ inputs.all || github.event.pull_request.draft }}
    uses: ./.github/workflows/lsp-tests.yml
    with:
      all-platforms: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
