diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ea91e0..7da3d0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,15 +4,27 @@ on: workflow_call: inputs: nightly: - required: false type: boolean + description: Whether this is a nightly build + required: false default: false upload-artifacts: type: boolean + description: Whether to upload build artifacts required: false default: true + epoch-ref: + type: string + description: Ref of the epoch repository to check out + required: false + default: main lingua-franca-ref: type: string + description: Ref of the lingua-franca submodule to check out + required: false + lingua-franca-repo: + type: string + description: Full repository name of the form / required: false secrets: gpg-passphrase: @@ -36,6 +48,7 @@ jobs: uses: actions/checkout@v3 with: repository: lf-lang/epoch + ref: ${{ inputs.epoch-ref }} submodules: recursive fetch-depth: 0 - uses: actions/setup-java@v3 @@ -45,13 +58,19 @@ jobs: - name: Check Maven/Java configuration run: mvn -version shell: bash + - name: Point submodule to given repo + run: | + git submodule set-url -- org.lflang/lingua-franca https://github.com/${{ inputs.lingua-franca-repo }} + git submodule update --init --recursive + shell: bash + if: ${{ inputs.lingua-franca-repo != '' }} - name: Update `lingua-franca` submodule run: | cd org.lflang/lingua-franca git fetch --all git checkout ${{ inputs.lingua-franca-ref }} git pull - git submodule update + git submodule update --recursive shell: bash if: ${{ inputs.lingua-franca-ref != '' }} - name: Configure Git for francabot