name: LLVM

on:
    workflow_dispatch:

jobs:
  build:
    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
    strategy:
      fail-fast: false
      matrix:
        config:
          - { os: ubuntu-20.04, platform: x64, cxx: g++-7, cc: gcc-7 }
          - { os: macos-10.15, platform: x64, cxx: clang++, cc: clang }
          - { os: windows-2019, platform: x86, vs: 2019 }
          - { os: windows-2019, platform: x64, vs: 2019 }

    runs-on: ${{ matrix.config.os }}

    env:
      CC: ${{ matrix.config.cc }}
      CXX: ${{ matrix.config.cxx }}
      VS_VERSION: ${{ matrix.config.vs }}
      PLATFORM: ${{ matrix.config.platform }}

    steps:
      - uses: actions/checkout@v2

      - name: Environment
        if: matrix.config.vs > 0
        shell: bash
        run: echo "/c/Program Files (x86)/Microsoft Visual Studio/$VS_VERSION/Enterprise/MSBuild/Current/Bin" >> $GITHUB_PATH

      - name: Clone LLVM
        shell: bash
        run: build/premake.sh --file=build/scripts/LLVM.lua clone_llvm
          
      - name: Build LLVM
        shell: bash
        run: build/premake.sh --file=build/scripts/LLVM.lua build_llvm

      - name: Package LLVM
        shell: bash
        run: build/premake.sh --file=build/scripts/LLVM.lua package_llvm

Add initial LLVM package workflow.
Add initial LLVM package workflow.
