name: Set-up Wizard engine
description: Checkout and build the Wizard engine, adding it to PATH

runs:
  using: composite
  steps:
    - name: Checkout Virgil
      uses: actions/checkout@v4
      with:
        repository: titzer/virgil
        path: virgil

    - name: Build Virgil
      working-directory: ./virgil
      shell: bash
      run: |
        export PATH=$PATH:`pwd`/bin
        echo `pwd`/bin >> "$GITHUB_PATH"
        make

    - name: Checkout Wizard engine
      uses: actions/checkout@v4
      with:
        repository: titzer/wizard-engine
        path: wizard-engine

    - name: Build Wizard engine
      working-directory: ./wizard-engine
      shell: bash
      run: |
        make -j 4
        echo `pwd`/bin >> "$GITHUB_PATH"
