diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 4705f5d..9ff409f 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -6,11 +6,13 @@ 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: true + required: false type: string + default: "v0.6.43" secrets: TAP_REPO_TOKEN: description: Personal Access Token for Homebrew Tap repo diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab46497..924b5a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,75 +40,6 @@ on: required: false default: false type: boolean - workflow_call: - inputs: - git_ref: - description: Emacs git ref to build - required: true - type: string - git_sha: - description: Override Emacs git commit SHA to build - required: false - default: "" - type: string - builder_ref: - description: "Git ref to checkout of build-emacs-for-macos" - required: true - type: string - builder_args: - description: Custom arguments passed to build script - required: false - default: "" - type: string - os: - description: 'Runner OS ("macos-11", "macos-12", or "macos-latest")' - required: true - type: string - test_build_name: - description: "Test build name" - required: false - default: "" - type: string - test_release_type: - description: "prerelease or draft" - required: false - default: "" - type: string - x86_64: - description: "Build x86_64 version of Emacs" - required: true - default: true - type: boolean - arm64: - description: "Build arm64 version of Emacs" - required: true - default: false - type: boolean - secrets: - APPLE_DEVELOPER_CERTIFICATE_P12_BASE64: - description: Base64 encoded Apple Developer Certificate - required: true - APPLE_DEVELOPER_CERTIFICATE_PASSWORD: - description: Password for Apple Developer Certificate - required: true - KEYCHAIN_PASSWORD: - description: Password to use for temporary local keychain on runner - required: true - AC_USERNAME: - description: Apple Connect Username - required: true - AC_PASSWORD: - description: Apple Connect Password - required: true - AC_PROVIDER: - description: Apple Connect Provider - required: true - AC_SIGN_IDENTITY: - description: Apple Connect Signing Identify - required: true - TAP_REPO_TOKEN: - description: Homebrew Tap Token - required: true jobs: prepare: diff --git a/.github/workflows/monthly-master.yml b/.github/workflows/monthly-master.yml deleted file mode 100644 index 6bc92dc..0000000 --- a/.github/workflows/monthly-master.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -name: Monthly (master) -on: - schedule: - - cron: "0 23 1 * *" - workflow_dispatch: - inputs: - git_sha: - description: Override Emacs git commit SHA to build - required: false - -jobs: - build: - name: Build - uses: ./.github/workflows/build.yml - with: - git_ref: master - git_sha: ${{ github.event.inputs.git_sha }} - builder_ref: "v0.6.43" - os: macos-11 - x86_64: true - arm64: true - secrets: - APPLE_DEVELOPER_CERTIFICATE_P12_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} - APPLE_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - AC_USERNAME: ${{ secrets.AC_USERNAME }} - AC_PASSWORD: ${{ secrets.AC_PASSWORD }} - AC_PROVIDER: ${{ secrets.AC_PROVIDER }} - AC_SIGN_IDENTITY: ${{ secrets.AC_SIGN_IDENTITY }} - TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} diff --git a/.github/workflows/nightly-master.yml b/.github/workflows/nightly-master.yml index ce7a90f..c473a54 100644 --- a/.github/workflows/nightly-master.yml +++ b/.github/workflows/nightly-master.yml @@ -2,24 +2,76 @@ name: Nightly (master) on: schedule: + - cron: "0 23 1 * *" - cron: "0 23 2-31 * *" workflow_dispatch: inputs: git_sha: description: Override Emacs git commit SHA to build required: false + arm64: + description: "Build arm64 version of Emacs?" + required: false + default: false + type: boolean jobs: - build: - name: Build - uses: ./.github/workflows/build.yml + prepare: + name: Prepare + uses: ./.github/workflows/_prepare.yml + secrets: + TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} + + # ---------------------------------------------------------------------------- + # Build x86_64 version of Emacs + # ---------------------------------------------------------------------------- + + build_x86_64: + name: Build (x86_64) + uses: ./.github/workflows/_build.yml + needs: [prepare] + with: + build_os: "macos-11" + artifact_prefix: "x86_64-" + git_ref: "master" + git_sha: ${{ github.event.inputs.git_sha }} + secrets: + APPLE_DEVELOPER_CERTIFICATE_P12_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} + APPLE_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + AC_USERNAME: ${{ secrets.AC_USERNAME }} + AC_PASSWORD: ${{ secrets.AC_PASSWORD }} + AC_PROVIDER: ${{ secrets.AC_PROVIDER }} + AC_SIGN_IDENTITY: ${{ secrets.AC_SIGN_IDENTITY }} + TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} + + release_x86_64: + name: Release (x86_64) + uses: ./.github/workflows/_release.yml + needs: [build_x86_64] + if: ${{ needs.build_x86_64.outputs.package_created }} with: - git_ref: master + os: ${{ github.event.inputs.os }} + plan_artifact: x86_64-build-plan + dmg_artifact: x86_64-dmg + test_build_name: ${{ github.event.inputs.test_build_name }} + secrets: + TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} + + # ---------------------------------------------------------------------------- + # Build arm64 version of Emacs + # ---------------------------------------------------------------------------- + + build_arm64: + name: Build (arm64) + if: github.event.inputs.arm64 || github.event.schedule == '0 23 1 * *' + uses: ./.github/workflows/_build.yml + needs: [prepare] + with: + build_os: "macos-13-xlarge" # Only macos-13-xlarge has arm64 support. + artifact_prefix: "arm64-" + git_ref: "master" git_sha: ${{ github.event.inputs.git_sha }} - builder_ref: "v0.6.43" - os: macos-11 - x86_64: true - arm64: false secrets: APPLE_DEVELOPER_CERTIFICATE_P12_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }} APPLE_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} @@ -29,3 +81,16 @@ jobs: AC_PROVIDER: ${{ secrets.AC_PROVIDER }} AC_SIGN_IDENTITY: ${{ secrets.AC_SIGN_IDENTITY }} TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }} + + release_arm64: + name: Release (arm64) + uses: ./.github/workflows/_release.yml + needs: [build_arm64] + if: ${{ needs.build_arm64.outputs.package_created }} + with: + os: ${{ github.event.inputs.os }} + plan_artifact: arm64-build-plan + dmg_artifact: arm64-dmg + test_build_name: ${{ github.event.inputs.test_build_name }} + secrets: + TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}