# ===---
# Workflow run for regular SPIRV-LLVM-Translator and LLVM compatibility check
# ===---

name: Scheduled verification
run-name: Scheduled verification

permissions:
  contents: read

on:
  schedule:
    # Run Sunday & Wednesday at 00:00
    - cron: 0 0 * * 0,3

jobs:

  verify-default-branches:
    name: Verify `main` branch
    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: main
          ref_translator: main
          ref_opencl-clang: main

  verify-release-branches:
    name: Verify `ocl-open-${{ matrix.llvm_version }}` release branch
    strategy:
      matrix:
        llvm_version: [ 14, 15, 16, 17, 18, 19 ]
    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: release/${{ matrix.llvm_version }}.x
          ref_translator: llvm_release_${{ matrix.llvm_version }}0
          ref_opencl-clang: ocl-open-${{ matrix.llvm_version }}0
