Skip to content

Commit

Permalink
feat(build): support multi-arch builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jimeh committed Nov 19, 2023
1 parent 3e6fd19 commit b21d3c5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:
- name: Upload disk image artifacts
uses: actions/upload-artifact@v3
with:
name: dmg
name: ${{ inputs.artifact_prefix }}dmg
path: |
builds/*.dmg
builds/*.sha*
Expand Down
68 changes: 61 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ on:
description: "prerelease or draft"
required: false
default: ""
x86_64:
description: "Build x86_64 version of Emacs"
required: false
default: "true"
arm64:
description: "Build arm64 version of Emacs"
required: false
default: "false"

jobs:
prepare:
Expand All @@ -45,13 +53,59 @@ jobs:
secrets:
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}

build:
name: Build
# ----------------------------------------------------------------------------
# Build x86_64 version of Emacs
# ----------------------------------------------------------------------------

build_x86_64:
name: Build (x86_64)
if: ${{ github.event.inputs.x86_64 == 'true' }}
needs: [prepare]
uses: ./.github/workflows/_build.yml
with:
os: ${{ github.event.inputs.os }}
build_os: ${{ github.event.inputs.build_os }}
artifact_prefix: "x86_64-"
git_ref: ${{ github.event.inputs.git_ref }}
git_sha: ${{ github.event.inputs.git_sha }}
build_args: ${{ github.event.inputs.builder_args }}
test_build_name: ${{ github.event.inputs.test_build_name }}
test_release_type: ${{ github.event.inputs.test_release_type }}
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)
needs: [build_x86_64]
uses: ./.github/workflows/_release.yml
with:
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 == 'true' }}
needs: [prepare]
uses: ./.github/workflows/_build.yml
with:
os: ${{ github.event.inputs.os }}
build_os: "macos-13-xlarge" # Only macos-13-xlarge has arm64 support.
artifact_prefix: "arm64-"
git_ref: ${{ github.event.inputs.git_ref }}
git_sha: ${{ github.event.inputs.git_sha }}
build_args: ${{ github.event.inputs.builder_args }}
Expand All @@ -67,14 +121,14 @@ jobs:
AC_SIGN_IDENTITY: ${{ secrets.AC_SIGN_IDENTITY }}
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}

release:
name: Release
needs: [build]
release_arm64:
name: Release (arm64)
needs: [build_arm64]
uses: ./.github/workflows/_release.yml
with:
os: ${{ github.event.inputs.os }}
plan_artifact: build-plan
dmg_artifact: dmg
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 }}

0 comments on commit b21d3c5

Please sign in to comment.