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

name: Rebuild LLVM 20.1

permissions: read-all

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

jobs:
  llvm20:
    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: '20.1'
      full_version: '20.1.8'
      lto: ${{ matrix.lto }}
      asserts: ${{ matrix.asserts }}
      arch: ${{ matrix.arch }}
      ubuntu: '22.04'
      win_sdk: '10.0.18362.0'
