mirror of
https://github.com/jimeh/emacs-builds.git
synced 2026-02-19 13:06:40 +00:00
feat(builds): improve build speeds and use free arm64 runners
Improves a few things: - Use the free macos-14 runners for arm64 builds. They are not as fast the macos-13-xlarge runners used before, but they are free for public repositories, meaning we can start doing nightly arm64 builds. - Use different nix install and cache actions which are faster, and uses a single action cache key, which avoids cache rate limit errors which was slowing down cache create/restore times. - Generally refactor and tidy up various bits and pieces in workflows.
This commit is contained in:
138
.github/workflows/build.yml
vendored
138
.github/workflows/build.yml
vendored
@@ -13,15 +13,11 @@ on:
|
||||
builder_ref:
|
||||
description: "Git ref to checkout of build-emacs-for-macos"
|
||||
required: true
|
||||
default: "v0.6.50"
|
||||
default: "v0.6.52"
|
||||
builder_args:
|
||||
description: Custom arguments passed to build script
|
||||
required: false
|
||||
default: ""
|
||||
os:
|
||||
description: 'Runner OS ("macos-13", "macos-14", or "macos-latest")'
|
||||
required: true
|
||||
default: "macos-13"
|
||||
test_build_name:
|
||||
description: "Test build name"
|
||||
required: false
|
||||
@@ -38,128 +34,20 @@ on:
|
||||
arm64:
|
||||
description: "Build arm64 version of Emacs"
|
||||
required: false
|
||||
default: false
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare
|
||||
uses: ./.github/workflows/_prepare.yml
|
||||
with:
|
||||
os: ${{ github.event.inputs.os }}
|
||||
builder_ref: ${{ github.event.inputs.builder_ref }}
|
||||
secrets:
|
||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Build x86_64 version of Emacs
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
build_x86_64:
|
||||
name: Build (x86_64)
|
||||
if: ${{ github.event.inputs.x86_64 == 'true' }}
|
||||
build:
|
||||
name: Build
|
||||
uses: ./.github/workflows/_build.yml
|
||||
needs: [prepare]
|
||||
with:
|
||||
os: ${{ github.event.inputs.os }}
|
||||
build_os: "macos-13"
|
||||
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)
|
||||
uses: ./.github/workflows/_release.yml
|
||||
# Depend on both build_x86_64 and build_arm64, but only run if build_x86_64
|
||||
# was successful and a package was created. This ensure wait for all builds
|
||||
# to complete before running any release jobs.
|
||||
needs: [build_x86_64, build_arm64]
|
||||
if: |
|
||||
always() &&
|
||||
needs.build_x86_64.result == 'success' &&
|
||||
needs.build_x86_64.outputs.package_created &&
|
||||
needs.build_arm64.result != 'failure'
|
||||
with:
|
||||
os: ${{ github.event.inputs.os }}
|
||||
plan_artifact: x86_64-build-plan
|
||||
dmg_artifact: x86_64-dmg
|
||||
secrets:
|
||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Build arm64 version of Emacs
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
build_arm64:
|
||||
name: Build (arm64)
|
||||
if: ${{ github.event.inputs.arm64 == 'true' }}
|
||||
uses: ./.github/workflows/_build.yml
|
||||
needs: [prepare]
|
||||
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 }}
|
||||
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_arm64:
|
||||
name: Release (arm64)
|
||||
uses: ./.github/workflows/_release.yml
|
||||
# Depend on both build_arm64 and build_x86_64, but only run if build_arm64
|
||||
# was successful and a package was created. This ensure wait for all builds
|
||||
# to complete before running any release jobs.
|
||||
needs: [build_arm64, build_x86_64]
|
||||
if: |
|
||||
always() &&
|
||||
needs.build_arm64.result == 'success' &&
|
||||
needs.build_arm64.outputs.package_created &&
|
||||
needs.build_x86_64.result != 'failure'
|
||||
with:
|
||||
os: ${{ github.event.inputs.os }}
|
||||
plan_artifact: arm64-build-plan
|
||||
dmg_artifact: arm64-dmg
|
||||
secrets:
|
||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Trigger update casks workflow in homebrew tap
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
update_casks:
|
||||
name: Update Casks
|
||||
uses: ./.github/workflows/_update-casks.yml
|
||||
# Depend on both release jobs, but only run if either of them was
|
||||
# successful. This ensures we only run this job once all release jobs have
|
||||
# been completed.
|
||||
needs: [release_x86_64, release_arm64]
|
||||
if: >-
|
||||
always() &&
|
||||
github.event.inputs.test_build_name == '' &&
|
||||
contains(needs.*.result, 'success') &&
|
||||
!contains(needs.*.result, 'failure')
|
||||
secrets:
|
||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
||||
git_ref: ${{ inputs.git_ref }}
|
||||
git_sha: ${{ inputs.git_sha }}
|
||||
builder_ref: ${{ inputs.builder_ref }}
|
||||
builder_args: ${{ inputs.builder_args }}
|
||||
test_build_name: ${{ inputs.test_build_name }}
|
||||
test_release_type: ${{ inputs.test_release_type }}
|
||||
x86_64: ${{ inputs.x86_64 }}
|
||||
arm64: ${{ inputs.arm64 }}
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user