# Copyright 2024-2026 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause

name: Rebuild LLVM 19.1

permissions: read-all

on:
  push:
    branches:
      - main
      - '**rebuild_llvm**'
    paths:
      - "llvm_patches/*19_1*"
      - "scripts/alloy.py"
      - "superbuild/*"
      - ".github/workflows/rebuild-llvm19.yml"
      - ".github/workflows/reusable.rebuild.yml"
  workflow_dispatch:

jobs:
  llvm19:
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.lto }}-${{ matrix.asserts }}-${{ matrix.arch }}
      cancel-in-progress: true
    strategy:
      fail-fast: false
      matrix:
        lto: ['ON', 'OFF']
        asserts: ['ON', 'OFF']
        arch: ['x86', 'aarch64']
    uses: ./.github/workflows/reusable.rebuild.yml
    with:
      version: '19.1'
      full_version: '19.1.7'
      lto: ${{ matrix.lto }}
      asserts: ${{ matrix.asserts }}
      arch: ${{ matrix.arch }}
      ubuntu: '22.04'
      win_sdk: '10.0.18362.0'
