diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index c15d291..c79c8b8 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -11,7 +11,13 @@ on: os: description: GitHub Actions runner OS type: string - required: true + required: false + default: "macos-11" + build_os: + description: Target OS to build for + type: string + required: false + default: "macos-11" git_ref: description: Git ref to build type: string @@ -88,16 +94,31 @@ jobs: echo "sha=--sha '${{ inputs.git_sha }}'" >> $GITHUB_OUTPUT plan: needs: [prepare] - runs-on: ${{ inputs.os }} + runs-on: ${{ inputs.build_os }} outputs: check: ${{ steps.check.outputs.result }} steps: + - name: Checkout build-emacs-for-macos repo + if: ${{ inputs.os != inputs.build_os }} + uses: actions/checkout@v4 + with: + repository: jimeh/build-emacs-for-macos + ref: ${{ needs.prepare.outputs.builder_sha }} + - uses: actions/setup-go@v4 + if: ${{ inputs.os != inputs.build_os }} + with: + go-version: "1.21" + - name: Build emacs-builder tool + if: ${{ inputs.os != inputs.build_os }} + run: make build - name: Download pre-built emacs-builder artifact + if: ${{ inputs.os == inputs.build_os }} uses: actions/download-artifact@v3 with: name: emacs-builder path: bin - name: Ensure emacs-builder is executable + if: ${{ inputs.os == inputs.build_os }} run: chmod +x bin/emacs-builder - name: Plan build run: >- @@ -127,7 +148,7 @@ jobs: if: ${{ steps.check.outputs.result == 'fail' }} build: - runs-on: ${{ inputs.os }} + runs-on: ${{ inputs.build_os }} needs: [prepare, plan] # Only run if check for existing release and asset failed. if: ${{ needs.plan.outputs.check == 'fail' }} @@ -162,6 +183,7 @@ jobs: --log-level debug --plan build-plan.yml --native-full-aot + --no-self-sign ${{ inputs.build_args }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 7f844ab..9ff409f 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -6,7 +6,8 @@ on: os: description: GitHub Actions runner OS type: string - required: true + required: false + default: "macos-11" builder_ref: description: Git ref to checkout of build-emacs-for-macos required: false diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 385b63c..da2e0e9 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -7,7 +7,8 @@ on: os: description: GitHub Actions runner OS type: string - required: true + required: false + default: "macos-11" plan_artifact: description: Name of artifact containing a emacs-builder plan yaml file type: string diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c99d5af..7472117 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,10 @@ on: description: 'Runner OS ("macos-11", "macos-12", or "macos-latest")' required: true default: "macos-11" + build_os: + description: "Build OS used to build Emacs" + required: false + default: "macos-11" test_build_name: description: "Test build name" required: false @@ -47,6 +51,7 @@ jobs: uses: ./.github/workflows/_build.yml with: os: ${{ github.event.inputs.os }} + build_os: ${{ github.event.inputs.build_os }} git_ref: ${{ github.event.inputs.git_ref }} git_sha: ${{ github.event.inputs.git_sha }} build_args: ${{ github.event.inputs.builder_args }}