mirror of
https://github.com/jimeh/emacs-builds.git
synced 2026-02-19 13:06:40 +00:00
Compare commits
48 Commits
test-build
...
Emacs-30.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
4142f78ed1
|
|||
|
0bdcc26ff7
|
|||
|
f77bef8017
|
|||
|
2304c38620
|
|||
| d8ad016739 | |||
|
b8192fb788
|
|||
|
51fba0905b
|
|||
|
f73c57be55
|
|||
|
d66071efc4
|
|||
|
5f2c9eef19
|
|||
|
b381cba4fa
|
|||
|
d40d900d61
|
|||
|
d81f9a1229
|
|||
|
93ad41d01a
|
|||
|
c5db478e64
|
|||
|
c554cdeb31
|
|||
| 6ef0736067 | |||
|
d52095babb
|
|||
| bc0082e4a8 | |||
|
099c10776a
|
|||
|
e0c0d92424
|
|||
|
692c58ea35
|
|||
|
ec8c83bd4b
|
|||
|
3967c4ecc8
|
|||
|
307f13be0b
|
|||
|
92533f2b50
|
|||
|
17e0cb55ac
|
|||
|
6acaf3f2cb
|
|||
|
c262274a3d
|
|||
|
ca7f04ce6a
|
|||
|
202f62454e
|
|||
|
99341c4f19
|
|||
|
b841bc77b9
|
|||
|
196270a3f4
|
|||
|
2062378299
|
|||
|
cc7bb92357
|
|||
|
1a36bde31e
|
|||
|
04d1bbeb71
|
|||
|
3e4d8b1833
|
|||
|
a292b242c4
|
|||
|
287df6914e
|
|||
|
d2cb4d5905
|
|||
|
6b4bd441a3
|
|||
|
6e1af1b83f
|
|||
|
81b0e4a784
|
|||
|
503023cd53
|
|||
|
a79110c550
|
|||
|
ff1b573f43
|
353
.github/workflows/_build.yml
vendored
353
.github/workflows/_build.yml
vendored
@@ -1,254 +1,151 @@
|
|||||||
---
|
---
|
||||||
# Requires _prepare.yml re-usable workflow to have run.
|
|
||||||
name: _build
|
name: _build
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
artifact_prefix:
|
|
||||||
description: Artifact prefix
|
|
||||||
type: string
|
|
||||||
required: false
|
|
||||||
os:
|
|
||||||
description: GitHub Actions runner OS
|
|
||||||
type: string
|
|
||||||
required: true
|
|
||||||
git_ref:
|
git_ref:
|
||||||
description: Git ref to build
|
description: Emacs git ref to build
|
||||||
type: string
|
|
||||||
required: true
|
required: true
|
||||||
|
type: string
|
||||||
git_sha:
|
git_sha:
|
||||||
description: Override git SHA to build
|
description: Override Emacs git commit SHA to build
|
||||||
type: string
|
|
||||||
required: false
|
required: false
|
||||||
build_args:
|
type: string
|
||||||
|
builder_ref:
|
||||||
|
description: "Git ref to checkout of build-emacs-for-macos"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
builder_args:
|
||||||
description: Custom arguments passed to build script
|
description: Custom arguments passed to build script
|
||||||
type: string
|
|
||||||
required: false
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: string
|
||||||
|
build_variant:
|
||||||
|
description: "Optional build number used as version suffix"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
test_build_name:
|
test_build_name:
|
||||||
description: "Test build name"
|
description: "Test build name"
|
||||||
type: string
|
|
||||||
required: false
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: string
|
||||||
test_release_type:
|
test_release_type:
|
||||||
description: "prerelease or draft"
|
description: "prerelease or draft"
|
||||||
type: string
|
|
||||||
required: false
|
required: false
|
||||||
default: "prerelease"
|
default: ""
|
||||||
secrets:
|
type: string
|
||||||
APPLE_DEVELOPER_CERTIFICATE_P12_BASE64:
|
x86_64:
|
||||||
description: Base64 encoded Apple Developer Certificate
|
description: "Build x86_64 version of Emacs"
|
||||||
required: true
|
required: false
|
||||||
APPLE_DEVELOPER_CERTIFICATE_PASSWORD:
|
default: true
|
||||||
description: Password for Apple Developer Certificate
|
type: boolean
|
||||||
required: true
|
arm64:
|
||||||
KEYCHAIN_PASSWORD:
|
description: "Build arm64 version of Emacs"
|
||||||
description: Password to use for temporary local keychain on runner
|
required: false
|
||||||
required: true
|
default: true
|
||||||
AC_USERNAME:
|
type: boolean
|
||||||
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:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: ${{ inputs.os }}
|
name: Prepare
|
||||||
outputs:
|
uses: ./.github/workflows/_prepare.yml
|
||||||
builder_sha: ${{ steps.builder_sha.outputs.sha }}
|
with:
|
||||||
emacs_sha_override: ${{ steps.emacs_sha.outputs.sha }}
|
builder_ref: ${{ inputs.builder_ref }}
|
||||||
test_plan_args: ${{ steps.test_plan_args.outputs.args }}
|
|
||||||
steps:
|
# ----------------------------------------------------------------------------
|
||||||
- name: Download emacs-builder git SHA artifact
|
# Build x86_64 version of Emacs
|
||||||
uses: actions/download-artifact@v3
|
# ----------------------------------------------------------------------------
|
||||||
with:
|
|
||||||
name: emacs-builder-git-sha
|
build_x86_64:
|
||||||
path: ./
|
name: Build (x86_64)
|
||||||
- name: Store builder Git SHA
|
if: inputs.x86_64
|
||||||
id: builder_sha
|
uses: ./.github/workflows/_build_emacs.yml
|
||||||
run: >-
|
|
||||||
echo "sha=$(cat emacs-builder-git-sha.txt)" >> $GITHUB_OUTPUT
|
|
||||||
- name: Prepare plan test args
|
|
||||||
id: test_plan_args
|
|
||||||
if: ${{ inputs.test_build_name != '' }}
|
|
||||||
run: >-
|
|
||||||
echo "args=--test-build '${{ inputs.test_build_name }}' --test-release-type '${{ inputs.test_release_type }}'" >> $GITHUB_OUTPUT
|
|
||||||
- name: Set git SHA override
|
|
||||||
id: emacs_sha
|
|
||||||
if: ${{ inputs.git_sha != '' }}
|
|
||||||
run: >-
|
|
||||||
echo "sha=--sha '${{ inputs.git_sha }}'" >> $GITHUB_OUTPUT
|
|
||||||
plan:
|
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
runs-on: ${{ inputs.os }}
|
with:
|
||||||
outputs:
|
builder_ref: ${{ needs.prepare.outputs.builder_sha }}
|
||||||
check: ${{ steps.check.outputs.result }}
|
os: "macos-13"
|
||||||
steps:
|
build_os: "macos-13" # Only macos-13 and earlier are x86_64.
|
||||||
- name: Download pre-built emacs-builder artifact
|
artifact_prefix: "x86_64-"
|
||||||
uses: actions/download-artifact@v3
|
git_ref: ${{ inputs.git_ref }}
|
||||||
with:
|
git_sha: ${{ inputs.git_sha }}
|
||||||
name: emacs-builder
|
build_args: ${{ inputs.builder_args }}
|
||||||
path: bin
|
build_variant: ${{ inputs.build_variant }}
|
||||||
- name: Ensure emacs-builder is executable
|
test_build_name: ${{ inputs.test_build_name }}
|
||||||
run: chmod +x bin/emacs-builder
|
test_release_type: ${{ inputs.test_release_type }}
|
||||||
- name: Plan build
|
secrets: inherit
|
||||||
run: >-
|
|
||||||
bin/emacs-builder -l debug plan --output build-plan.yml
|
|
||||||
--output-dir '${{ github.workspace }}/builds'
|
|
||||||
${{ needs.prepare.outputs.test_plan_args }}
|
|
||||||
${{ needs.prepare.outputs.emacs_sha_override }}
|
|
||||||
'${{ inputs.git_ref }}'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Show plan
|
|
||||||
run: cat build-plan.yml
|
|
||||||
- name: Upload build-plan artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.artifact_prefix }}build-plan
|
|
||||||
path: build-plan.yml
|
|
||||||
if-no-files-found: error
|
|
||||||
- name: Check if planned release and asset already exist
|
|
||||||
id: check
|
|
||||||
continue-on-error: true
|
|
||||||
run: |
|
|
||||||
echo "result=$((bin/emacs-builder -l debug release --plan build-plan.yml check && echo 'ok') || echo 'fail')" >> $GITHUB_OUTPUT
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- run: echo 'Planned release already seems to exist.'
|
|
||||||
if: ${{ steps.check.outputs.result == 'fail' }}
|
|
||||||
|
|
||||||
build:
|
release_x86_64:
|
||||||
runs-on: ${{ inputs.os }}
|
name: Release (x86_64)
|
||||||
needs: [prepare, plan]
|
uses: ./.github/workflows/_release.yml
|
||||||
# Only run if check for existing release and asset failed.
|
# Depend on both build_x86_64 and build_arm64, but only run if build_x86_64
|
||||||
if: ${{ needs.plan.outputs.check == 'fail' }}
|
# was successful and a package was created. This ensure wait for all builds
|
||||||
steps:
|
# to complete before running any release jobs.
|
||||||
- name: Checkout build-emacs-for-macos repo
|
needs: [prepare, build_x86_64, build_arm64]
|
||||||
uses: actions/checkout@v4
|
if: |
|
||||||
with:
|
always() &&
|
||||||
repository: jimeh/build-emacs-for-macos
|
needs.build_x86_64.result == 'success' &&
|
||||||
ref: ${{ needs.prepare.outputs.builder_sha }}
|
needs.build_x86_64.outputs.package_created &&
|
||||||
path: builder
|
needs.build_arm64.result != 'failure'
|
||||||
- uses: ruby/setup-ruby@v1
|
with:
|
||||||
with:
|
builder_ref: ${{ needs.prepare.outputs.builder_sha }}
|
||||||
ruby-version: "3.2"
|
os: "macos-13" # Only macos-13 and earlier are x86_64.
|
||||||
- name: Update homebrew
|
plan_artifact: x86_64-build-plan
|
||||||
run: brew update
|
dmg_artifact: x86_64-dmg
|
||||||
- name: Fix system python breaking homebrew
|
|
||||||
run: >-
|
|
||||||
find "$(brew --prefix)/bin" -type l
|
|
||||||
-ilname '*/Library/Frameworks/Python.framework/*'
|
|
||||||
-delete
|
|
||||||
- name: Install dependencies
|
|
||||||
run: make bootstrap-ci
|
|
||||||
working-directory: builder
|
|
||||||
- name: Download build-plan artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.artifact_prefix }}build-plan
|
|
||||||
path: ./
|
|
||||||
- name: Build Emacs
|
|
||||||
run: >-
|
|
||||||
./builder/build-emacs-for-macos
|
|
||||||
--log-level debug
|
|
||||||
--plan build-plan.yml
|
|
||||||
--native-full-aot
|
|
||||||
${{ inputs.build_args }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Upload unsigned app artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.artifact_prefix }}unsigned-app
|
|
||||||
path: builds/*.tbz
|
|
||||||
if-no-files-found: error
|
|
||||||
- name: Upload Emacs source artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.artifact_prefix }}emacs-source
|
|
||||||
path: builder/tarballs/*.tgz
|
|
||||||
|
|
||||||
package:
|
# ----------------------------------------------------------------------------
|
||||||
runs-on: ${{ inputs.os }}
|
# Build arm64 version of Emacs
|
||||||
needs: [prepare, plan, build]
|
# ----------------------------------------------------------------------------
|
||||||
# Only run if check for existing release and asset failed.
|
|
||||||
steps:
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: "3.11"
|
|
||||||
- name: Install dmgbuild
|
|
||||||
run: |
|
|
||||||
$(command -v pip3 || command -v pip) install --upgrade dmgbuild
|
|
||||||
- name: Download pre-built emacs-builder artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: emacs-builder
|
|
||||||
path: bin
|
|
||||||
- name: Ensure emacs-builder is executable
|
|
||||||
run: chmod +x bin/emacs-builder
|
|
||||||
- name: Download build-plan artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.artifact_prefix }}build-plan
|
|
||||||
path: ./
|
|
||||||
- name: Download unsigned app artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ inputs.artifact_prefix }}unsigned-app
|
|
||||||
path: builds
|
|
||||||
- name: Extract unsigned app archive
|
|
||||||
run: |
|
|
||||||
find * -name '*.tbz' -exec tar xvjf "{}" \;
|
|
||||||
working-directory: builds
|
|
||||||
- name: Install the Apple signing certificate
|
|
||||||
run: |
|
|
||||||
# create variables
|
|
||||||
CERTIFICATE_PATH="$RUNNER_TEMP/build_certificate.p12"
|
|
||||||
KEYCHAIN_PATH="$RUNNER_TEMP/app-signing.keychain-db"
|
|
||||||
|
|
||||||
# import certificate and provisioning profile from secrets
|
build_arm64:
|
||||||
echo -n "$CERT_BASE64" | base64 --decode --output "$CERTIFICATE_PATH"
|
name: Build (arm64)
|
||||||
|
if: inputs.arm64
|
||||||
|
uses: ./.github/workflows/_build_emacs.yml
|
||||||
|
needs: [prepare]
|
||||||
|
with:
|
||||||
|
builder_ref: ${{ needs.prepare.outputs.builder_sha }}
|
||||||
|
os: "macos-14"
|
||||||
|
build_os: "macos-14" # Only macos-14 and later are ARM64.
|
||||||
|
artifact_prefix: "arm64-"
|
||||||
|
git_ref: ${{ inputs.git_ref }}
|
||||||
|
git_sha: ${{ inputs.git_sha }}
|
||||||
|
build_args: ${{ inputs.builder_args }}
|
||||||
|
build_variant: ${{ inputs.build_variant }}
|
||||||
|
test_build_name: ${{ inputs.test_build_name }}
|
||||||
|
test_release_type: ${{ inputs.test_release_type }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
# create temporary keychain
|
release_arm64:
|
||||||
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
name: Release (arm64)
|
||||||
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
|
uses: ./.github/workflows/_release.yml
|
||||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
# 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: [prepare, 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:
|
||||||
|
builder_ref: ${{ needs.prepare.outputs.builder_sha }}
|
||||||
|
os: "macos-14" # Only macos-14 and later are ARM64.
|
||||||
|
plan_artifact: arm64-build-plan
|
||||||
|
dmg_artifact: arm64-dmg
|
||||||
|
|
||||||
# import certificate to keychain
|
# ----------------------------------------------------------------------------
|
||||||
security import "$CERTIFICATE_PATH" -P "$CERT_PASSWORD" -A \
|
# Trigger update casks workflow in homebrew tap
|
||||||
-t cert -f pkcs12 -k "$KEYCHAIN_PATH"
|
# ----------------------------------------------------------------------------
|
||||||
security list-keychain -d user -s "$KEYCHAIN_PATH"
|
|
||||||
env:
|
update_casks:
|
||||||
CERT_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
name: Update Casks
|
||||||
CERT_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
|
uses: ./.github/workflows/_update-casks.yml
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
# Depend on both release jobs, but only run if either of them was
|
||||||
- name: Sign, package and notarize build
|
# successful. This ensures we only run this job once all release jobs have
|
||||||
run: >-
|
# been completed.
|
||||||
bin/emacs-builder -l debug package -v --plan build-plan.yml
|
needs: [release_x86_64, release_arm64]
|
||||||
--sign --remove-source-dir
|
if: >-
|
||||||
env:
|
always() &&
|
||||||
AC_USERNAME: ${{ secrets.AC_USERNAME }}
|
inputs.test_build_name == '' &&
|
||||||
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
|
contains(needs.*.result, 'success') &&
|
||||||
AC_PROVIDER: ${{ secrets.AC_PROVIDER }}
|
!contains(needs.*.result, 'failure')
|
||||||
AC_SIGN_IDENTITY: ${{ secrets.AC_SIGN_IDENTITY }}
|
secrets: inherit
|
||||||
- name: Upload disk image artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: dmg
|
|
||||||
path: |
|
|
||||||
builds/*.dmg
|
|
||||||
builds/*.sha*
|
|
||||||
if-no-files-found: error
|
|
||||||
- name: Clean up keychain used for signing certificate
|
|
||||||
if: ${{ always() }}
|
|
||||||
run: |
|
|
||||||
security delete-keychain "$RUNNER_TEMP/app-signing.keychain-db"
|
|
||||||
|
|||||||
250
.github/workflows/_build_emacs.yml
vendored
Normal file
250
.github/workflows/_build_emacs.yml
vendored
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
---
|
||||||
|
# Requires _prepare.yml re-usable workflow to have run.
|
||||||
|
name: _build_emacs
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
builder_ref:
|
||||||
|
description: Git ref of build-emacs-for-macos to use
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
os:
|
||||||
|
description: GitHub Actions runner OS
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: "macos-13"
|
||||||
|
build_os:
|
||||||
|
description: Target OS to build for
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: "macos-13"
|
||||||
|
artifact_prefix:
|
||||||
|
description: Artifact prefix for build_os
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
git_ref:
|
||||||
|
description: Git ref to build
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
git_sha:
|
||||||
|
description: Override git SHA to build
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
build_args:
|
||||||
|
description: Custom arguments passed to build script
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
build_variant:
|
||||||
|
description: "Optional build number used as version suffix"
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
test_build_name:
|
||||||
|
description: "Test build name"
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
test_release_type:
|
||||||
|
description: "prerelease or draft"
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: "prerelease"
|
||||||
|
outputs:
|
||||||
|
package_created:
|
||||||
|
description: "Whether or not a package was created"
|
||||||
|
value: ${{ jobs.package.result == 'success' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
plan:
|
||||||
|
runs-on: ${{ inputs.build_os }}
|
||||||
|
outputs:
|
||||||
|
check: ${{ steps.check.outputs.result }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout build-emacs-for-macos repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: jimeh/build-emacs-for-macos
|
||||||
|
ref: ${{ inputs.builder_ref }}
|
||||||
|
- name: Download pre-built emacs-builder artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: emacs-builder-${{ runner.arch }}
|
||||||
|
path: bin
|
||||||
|
- name: Ensure emacs-builder is executable
|
||||||
|
run: chmod +x bin/emacs-builder
|
||||||
|
- uses: nixbuild/nix-quick-install-action@v32
|
||||||
|
- uses: nix-community/cache-nix-action@v6
|
||||||
|
with:
|
||||||
|
primary-key: nix-${{ runner.arch }}-${{ hashFiles('**/flake.*') }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: nix develop --command nix flake metadata
|
||||||
|
- name: Prepare plan test args
|
||||||
|
id: test_plan_args
|
||||||
|
if: inputs.test_build_name != ''
|
||||||
|
run: >-
|
||||||
|
echo "args=--test-build '${{ inputs.test_build_name }}' --test-release-type '${{ inputs.test_release_type }}'" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Prepare build variant args
|
||||||
|
id: build_variant_args
|
||||||
|
if: inputs.build_variant != ''
|
||||||
|
run: >-
|
||||||
|
echo "args=--build-variant ${{ inputs.build_variant }}" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Set git SHA override
|
||||||
|
id: emacs_sha
|
||||||
|
if: inputs.git_sha != ''
|
||||||
|
run: >-
|
||||||
|
echo "sha=--sha '${{ inputs.git_sha }}'" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Plan build
|
||||||
|
run: >-
|
||||||
|
nix develop --command
|
||||||
|
bin/emacs-builder -l debug plan --output build-plan.yml
|
||||||
|
--output-dir '${{ github.workspace }}/builds'
|
||||||
|
${{ steps.build_variant_args.outputs.args }}
|
||||||
|
${{ steps.test_plan_args.outputs.args }}
|
||||||
|
${{ steps.emacs_sha.outputs.sha }}
|
||||||
|
'${{ inputs.git_ref }}'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Show plan
|
||||||
|
run: cat build-plan.yml
|
||||||
|
- name: Upload build-plan artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}build-plan
|
||||||
|
path: build-plan.yml
|
||||||
|
if-no-files-found: error
|
||||||
|
- name: Check if planned release and asset already exist
|
||||||
|
id: check
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
echo "result=$((bin/emacs-builder -l debug release --plan build-plan.yml check && echo 'ok') || echo 'fail')" >> "$GITHUB_OUTPUT"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- run: echo 'Planned release already seems to exist.'
|
||||||
|
if: steps.check.outputs.result == 'ok'
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ${{ inputs.build_os }}
|
||||||
|
needs: [plan]
|
||||||
|
# Only run if check for existing release and asset failed.
|
||||||
|
if: needs.plan.outputs.check == 'fail'
|
||||||
|
steps:
|
||||||
|
- name: Checkout build-emacs-for-macos repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: jimeh/build-emacs-for-macos
|
||||||
|
ref: ${{ inputs.builder_ref }}
|
||||||
|
path: builder
|
||||||
|
- uses: nixbuild/nix-quick-install-action@v32
|
||||||
|
- uses: nix-community/cache-nix-action@v6
|
||||||
|
with:
|
||||||
|
primary-key: nix-${{ runner.arch }}-${{ hashFiles('**/flake.*') }}
|
||||||
|
- name: Download build-plan artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}build-plan
|
||||||
|
path: ./builder/
|
||||||
|
- name: Install dependencies
|
||||||
|
run: nix develop --command nix flake metadata
|
||||||
|
working-directory: builder
|
||||||
|
- name: Install Ruby dependencies
|
||||||
|
run: >-
|
||||||
|
nix develop --command make bootstrap-ruby
|
||||||
|
working-directory: builder
|
||||||
|
env:
|
||||||
|
BUNDLE_WITHOUT: "development"
|
||||||
|
- name: Build Emacs
|
||||||
|
run: >-
|
||||||
|
nix develop
|
||||||
|
--command ./build-emacs-for-macos
|
||||||
|
--log-level debug
|
||||||
|
--plan build-plan.yml
|
||||||
|
--native-full-aot
|
||||||
|
--no-self-sign
|
||||||
|
${{ inputs.build_args }}
|
||||||
|
working-directory: builder
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Upload unsigned app artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}unsigned-app
|
||||||
|
path: builds/*.tbz
|
||||||
|
if-no-files-found: error
|
||||||
|
- name: Upload Emacs source artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}emacs-source
|
||||||
|
path: builder/tarballs/*.tgz
|
||||||
|
|
||||||
|
package:
|
||||||
|
runs-on: ${{ inputs.os }}
|
||||||
|
needs: [plan, build]
|
||||||
|
steps:
|
||||||
|
- name: Download pre-built emacs-builder artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: emacs-builder-${{ runner.arch }}
|
||||||
|
path: bin
|
||||||
|
- name: Ensure emacs-builder is executable
|
||||||
|
run: chmod +x bin/emacs-builder
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- name: Install dmgbuild
|
||||||
|
run: |
|
||||||
|
$(command -v pip3 || command -v pip) install --upgrade dmgbuild
|
||||||
|
- name: Download build-plan artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}build-plan
|
||||||
|
path: ./
|
||||||
|
- name: Download unsigned app artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}unsigned-app
|
||||||
|
path: builds
|
||||||
|
- name: Extract unsigned app archive
|
||||||
|
run: |
|
||||||
|
find * -name '*.tbz' -exec tar xvjf "{}" \;
|
||||||
|
working-directory: builds
|
||||||
|
- name: Install the Apple signing certificate
|
||||||
|
run: |
|
||||||
|
# create variables
|
||||||
|
CERTIFICATE_PATH="$RUNNER_TEMP/build_certificate.p12"
|
||||||
|
KEYCHAIN_PATH="$RUNNER_TEMP/app-signing.keychain-db"
|
||||||
|
|
||||||
|
# import certificate and provisioning profile from secrets
|
||||||
|
echo -n "$CERT_BASE64" | base64 --decode > "$CERTIFICATE_PATH"
|
||||||
|
|
||||||
|
# create temporary keychain
|
||||||
|
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||||
|
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
|
||||||
|
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
|
||||||
|
|
||||||
|
# import certificate to keychain
|
||||||
|
security import "$CERTIFICATE_PATH" -P "$CERT_PASSWORD" -A \
|
||||||
|
-t cert -f pkcs12 -k "$KEYCHAIN_PATH"
|
||||||
|
security list-keychain -d user -s "$KEYCHAIN_PATH"
|
||||||
|
env:
|
||||||
|
CERT_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
||||||
|
CERT_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
|
||||||
|
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||||
|
- name: Sign, package and notarize build
|
||||||
|
run: >-
|
||||||
|
bin/emacs-builder package -v --plan build-plan.yml
|
||||||
|
--sign --remove-source-dir
|
||||||
|
env:
|
||||||
|
AC_USERNAME: ${{ secrets.AC_USERNAME }}
|
||||||
|
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
|
||||||
|
AC_PROVIDER: ${{ secrets.AC_PROVIDER }}
|
||||||
|
AC_SIGN_IDENTITY: ${{ secrets.AC_SIGN_IDENTITY }}
|
||||||
|
- name: Upload disk image artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_prefix }}dmg
|
||||||
|
path: |
|
||||||
|
builds/*.dmg
|
||||||
|
builds/*.sha*
|
||||||
|
if-no-files-found: error
|
||||||
|
- name: Clean up keychain used for signing certificate
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
security delete-keychain "$RUNNER_TEMP/app-signing.keychain-db"
|
||||||
83
.github/workflows/_prepare.yml
vendored
83
.github/workflows/_prepare.yml
vendored
@@ -3,46 +3,89 @@ name: _prepare
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
os:
|
|
||||||
description: GitHub Actions runner OS
|
|
||||||
type: string
|
|
||||||
required: true
|
|
||||||
builder_ref:
|
builder_ref:
|
||||||
description: Git ref to checkout of build-emacs-for-macos
|
description: Git ref to checkout of build-emacs-for-macos
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: "v0.6.43"
|
default: ""
|
||||||
secrets:
|
outputs:
|
||||||
TAP_REPO_TOKEN:
|
builder_ref:
|
||||||
description: Personal Access Token for Homebrew Tap repo
|
description: Git ref of build-emacs-for-macos at builder_ref
|
||||||
required: true
|
value: ${{ jobs.builder-sha.outputs.ref }}
|
||||||
|
builder_sha:
|
||||||
|
description: Git commit SHA of build-emacs-for-macos at builder_ref
|
||||||
|
value: ${{ jobs.builder-sha.outputs.sha }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
emacs-builder:
|
builder-sha:
|
||||||
runs-on: ${{ inputs.os }}
|
runs-on: "macos-13"
|
||||||
|
outputs:
|
||||||
|
ref: ${{ steps.ref.outputs.ref }}
|
||||||
|
sha: ${{ steps.sha.outputs.sha }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Default git ref check
|
||||||
|
id: ref
|
||||||
|
run: |
|
||||||
|
DEFAULT_BUILDER_REF="v0.6.61"
|
||||||
|
BUILDER_REF="${{ inputs.builder_ref }}"
|
||||||
|
echo "ref=${BUILDER_REF:-$DEFAULT_BUILDER_REF}" >> "$GITHUB_OUTPUT"
|
||||||
- name: Checkout build-emacs-for-macos repo
|
- name: Checkout build-emacs-for-macos repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: jimeh/build-emacs-for-macos
|
repository: jimeh/build-emacs-for-macos
|
||||||
ref: ${{ inputs.builder_ref }}
|
ref: ${{ steps.ref.outputs.ref }}
|
||||||
- name: Store builder Git SHA
|
- name: Store builder Git SHA
|
||||||
|
id: sha
|
||||||
run: |
|
run: |
|
||||||
git rev-parse HEAD > emacs-builder-git-sha.txt
|
BUILDER_SHA="$(git rev-parse HEAD)"
|
||||||
|
echo "$BUILDER_SHA" > build-emacs-for-macos-git-sha.txt
|
||||||
|
echo "sha=$BUILDER_SHA" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Builder ref ${{ inputs.builder_ref }} resolved to" \
|
||||||
|
"commit SHA: $BUILDER_SHA"
|
||||||
- name: Upload builder git SHA artifact
|
- name: Upload builder git SHA artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: emacs-builder-git-sha
|
name: build-emacs-for-macos-git-sha
|
||||||
path: emacs-builder-git-sha.txt
|
path: build-emacs-for-macos-git-sha.txt
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- uses: actions/setup-go@v4
|
|
||||||
|
emacs-builder:
|
||||||
|
needs: [builder-sha]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-13 # Only macos-13 and earlier are x86_64.
|
||||||
|
- macos-14 # Only macos-14 and later are ARM64.
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Cache emacs-builder (${{ runner.arch }})
|
||||||
|
id: cache
|
||||||
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
go-version: "1.21"
|
path: bin/emacs-builder
|
||||||
|
key: emacs-builder-${{ runner.arch }}-${{ needs.builder-sha.outputs.sha }}-bin
|
||||||
|
- name: Checkout build-emacs-for-macos repo
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: jimeh/build-emacs-for-macos
|
||||||
|
ref: ${{ needs.builder-sha.outputs.ref }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup Go
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
- name: Build emacs-builder tool
|
- name: Build emacs-builder tool
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: make build
|
run: make build
|
||||||
|
- name: Ensure emacs-builder is executable
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: chmod +x bin/emacs-builder
|
||||||
|
- run: bin/emacs-builder --version
|
||||||
- name: Upload emacs-builder artifact
|
- name: Upload emacs-builder artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: emacs-builder
|
name: emacs-builder-${{ runner.arch }}
|
||||||
path: bin/emacs-builder
|
path: bin/emacs-builder
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|||||||
36
.github/workflows/_release.yml
vendored
36
.github/workflows/_release.yml
vendored
@@ -1,13 +1,21 @@
|
|||||||
---
|
---
|
||||||
# Requires _prepare.yml and _build.yml re-usable workflows to have run.
|
# Requires _prepare.yml and _build.yml re-usable workflows to have run.
|
||||||
name: _release
|
name: _release
|
||||||
|
concurrency:
|
||||||
|
group: _release
|
||||||
|
cancel-in-progress: false
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
|
builder_ref:
|
||||||
|
description: Git ref of build-emacs-for-macos to use
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
os:
|
os:
|
||||||
description: GitHub Actions runner OS
|
description: GitHub Actions runner OS
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: false
|
||||||
|
default: "macos-13"
|
||||||
plan_artifact:
|
plan_artifact:
|
||||||
description: Name of artifact containing a emacs-builder plan yaml file
|
description: Name of artifact containing a emacs-builder plan yaml file
|
||||||
type: string
|
type: string
|
||||||
@@ -16,50 +24,36 @@ on:
|
|||||||
description: Name of artifact containing a *.dmg files to release
|
description: Name of artifact containing a *.dmg files to release
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
test_build_name:
|
|
||||||
description: "Test build name"
|
|
||||||
type: string
|
|
||||||
required: false
|
|
||||||
secrets:
|
|
||||||
TAP_REPO_TOKEN:
|
|
||||||
description: Personal Access Token for Homebrew Tap repo
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
github:
|
github:
|
||||||
runs-on: ${{ inputs.os }}
|
runs-on: ${{ inputs.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Download pre-built emacs-builder artifact
|
- name: Download pre-built emacs-builder artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: emacs-builder
|
name: emacs-builder-${{ runner.arch }}
|
||||||
path: bin
|
path: bin
|
||||||
- name: Ensure emacs-builder is executable
|
- name: Ensure emacs-builder is executable
|
||||||
run: chmod +x bin/emacs-builder
|
run: chmod +x bin/emacs-builder
|
||||||
- name: Download build-plan.yml artifact
|
- name: Download build-plan.yml artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.plan_artifact }}
|
name: ${{ inputs.plan_artifact }}
|
||||||
path: ./
|
path: ./
|
||||||
- name: Download disk image artifacts
|
- name: Download disk image artifacts
|
||||||
id: dmg
|
id: dmg
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.dmg_artifact }}
|
name: ${{ inputs.dmg_artifact }}
|
||||||
path: builds
|
path: builds
|
||||||
- name: Publish disk images to a GitHub Release
|
- name: Publish disk images to a GitHub Release
|
||||||
if: ${{ steps.dmg.outputs.result != 'fail' }}
|
if: steps.dmg.outcome != 'failure'
|
||||||
run: >-
|
run: >-
|
||||||
bin/emacs-builder -l debug release --plan build-plan.yml publish
|
bin/emacs-builder -l debug release --plan build-plan.yml publish
|
||||||
$(find builds -name '*.dmg' -or -name '*.sha256')
|
$(find builds -name '*.dmg' -or -name '*.sha256')
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Trigger update casks workflow in homebrew tap
|
|
||||||
if: ${{ steps.dmg.outputs.result != 'fail' && inputs.test_build_name == '' }}
|
|
||||||
run: >-
|
|
||||||
gh workflow run --repo jimeh/homebrew-emacs-builds update-casks.yml
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
||||||
- run: echo 'No DMG artifact available, was there a new commit to build?'
|
- run: echo 'No DMG artifact available, was there a new commit to build?'
|
||||||
if: ${{ steps.dmg.outputs.result == 'fail' }}
|
if: steps.dmg.outcome == 'failure'
|
||||||
|
|||||||
23
.github/workflows/_update-casks.yml
vendored
Normal file
23
.github/workflows/_update-casks.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
name: _update-casks
|
||||||
|
concurrency:
|
||||||
|
group: _update-casks
|
||||||
|
cancel-in-progress: false
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
os:
|
||||||
|
description: GitHub Actions runner OS
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: "ubuntu-latest"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
emacs-builds:
|
||||||
|
runs-on: ${{ inputs.os }}
|
||||||
|
steps:
|
||||||
|
- name: Trigger update casks workflow in homebrew tap
|
||||||
|
run: >-
|
||||||
|
gh workflow run --repo jimeh/homebrew-emacs-builds update-casks.yml
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
||||||
71
.github/workflows/build.yml
vendored
71
.github/workflows/build.yml
vendored
@@ -11,17 +11,13 @@ on:
|
|||||||
description: Override Emacs git commit SHA to build
|
description: Override Emacs git commit SHA to build
|
||||||
required: false
|
required: false
|
||||||
builder_ref:
|
builder_ref:
|
||||||
description: "Git ref to checkout of build-emacs-for-macos"
|
description: "Override git ref to checkout of build-emacs-for-macos"
|
||||||
required: true
|
required: false
|
||||||
default: "master"
|
default: ""
|
||||||
builder_args:
|
builder_args:
|
||||||
description: Custom arguments passed to build script
|
description: Custom arguments passed to build script
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
os:
|
|
||||||
description: 'Runner OS ("macos-11", "macos-12", or "macos-latest")'
|
|
||||||
required: true
|
|
||||||
default: "macos-11"
|
|
||||||
test_build_name:
|
test_build_name:
|
||||||
description: "Test build name"
|
description: "Test build name"
|
||||||
required: false
|
required: false
|
||||||
@@ -30,46 +26,33 @@ on:
|
|||||||
description: "prerelease or draft"
|
description: "prerelease or draft"
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
build_variant:
|
||||||
|
description: "Optional build number used as version suffix"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
x86_64:
|
||||||
|
description: "Build x86_64 version of Emacs"
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
arm64:
|
||||||
|
description: "Build arm64 version of Emacs"
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
|
||||||
jobs:
|
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:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
needs: [prepare]
|
|
||||||
uses: ./.github/workflows/_build.yml
|
uses: ./.github/workflows/_build.yml
|
||||||
with:
|
with:
|
||||||
os: ${{ github.event.inputs.os }}
|
git_ref: ${{ inputs.git_ref }}
|
||||||
git_ref: ${{ github.event.inputs.git_ref }}
|
git_sha: ${{ inputs.git_sha }}
|
||||||
git_sha: ${{ github.event.inputs.git_sha }}
|
builder_ref: ${{ inputs.builder_ref }}
|
||||||
build_args: ${{ github.event.inputs.builder_args }}
|
builder_args: ${{ inputs.builder_args }}
|
||||||
test_build_name: ${{ github.event.inputs.test_build_name }}
|
build_variant: ${{ inputs.build_variant }}
|
||||||
test_release_type: ${{ github.event.inputs.test_release_type }}
|
test_build_name: ${{ inputs.test_build_name }}
|
||||||
secrets:
|
test_release_type: ${{ inputs.test_release_type }}
|
||||||
APPLE_DEVELOPER_CERTIFICATE_P12_BASE64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
x86_64: ${{ inputs.x86_64 }}
|
||||||
APPLE_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
|
arm64: ${{ inputs.arm64 }}
|
||||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
secrets: inherit
|
||||||
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:
|
|
||||||
name: Release
|
|
||||||
needs: [build]
|
|
||||||
uses: ./.github/workflows/_release.yml
|
|
||||||
with:
|
|
||||||
os: ${{ github.event.inputs.os }}
|
|
||||||
plan_artifact: build-plan
|
|
||||||
dmg_artifact: dmg
|
|
||||||
test_build_name: ${{ github.event.inputs.test_build_name }}
|
|
||||||
secrets:
|
|
||||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
||||||
|
|||||||
46
.github/workflows/nightly-emacs-29.yml
vendored
46
.github/workflows/nightly-emacs-29.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
---
|
|
||||||
name: Nightly (emacs-29)
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 23 * * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
git_sha:
|
|
||||||
description: Override Emacs git commit SHA to build
|
|
||||||
required: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
prepare:
|
|
||||||
name: Prepare
|
|
||||||
uses: ./.github/workflows/_prepare.yml
|
|
||||||
secrets:
|
|
||||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
||||||
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
needs: [prepare]
|
|
||||||
uses: ./.github/workflows/_build.yml
|
|
||||||
with:
|
|
||||||
os: macos-11
|
|
||||||
git_ref: emacs-29
|
|
||||||
git_sha: ${{ github.event.inputs.git_sha }}
|
|
||||||
build_args: --native-comp
|
|
||||||
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:
|
|
||||||
name: Release
|
|
||||||
needs: [build]
|
|
||||||
uses: ./.github/workflows/_release.yml
|
|
||||||
with:
|
|
||||||
plan_artifact: build-plan
|
|
||||||
dmg_artifact: dmg
|
|
||||||
secrets:
|
|
||||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
||||||
36
.github/workflows/nightly-master.yml
vendored
36
.github/workflows/nightly-master.yml
vendored
@@ -10,40 +10,10 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
|
||||||
name: Prepare
|
|
||||||
uses: ./.github/workflows/_prepare.yml
|
|
||||||
with:
|
|
||||||
os: macos-11
|
|
||||||
secrets:
|
|
||||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
needs: [prepare]
|
|
||||||
uses: ./.github/workflows/_build.yml
|
uses: ./.github/workflows/_build.yml
|
||||||
with:
|
with:
|
||||||
os: macos-11
|
git_ref: "master"
|
||||||
git_ref: master
|
git_sha: ${{ inputs.git_sha }}
|
||||||
git_sha: ${{ github.event.inputs.git_sha }}
|
secrets: inherit
|
||||||
build_args: --native-comp
|
|
||||||
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:
|
|
||||||
name: Release
|
|
||||||
needs: [build]
|
|
||||||
uses: ./.github/workflows/_release.yml
|
|
||||||
with:
|
|
||||||
os: macos-11
|
|
||||||
plan_artifact: build-plan
|
|
||||||
dmg_artifact: dmg
|
|
||||||
secrets:
|
|
||||||
TAP_REPO_TOKEN: ${{ secrets.TAP_REPO_TOKEN }}
|
|
||||||
|
|||||||
14
.github/workflows/update-metadata.yml
vendored
14
.github/workflows/update-metadata.yml
vendored
@@ -3,7 +3,7 @@ name: Update Metadata
|
|||||||
concurrency: jimeh/emacs-builds/update-metadata
|
concurrency: jimeh/emacs-builds/update-metadata
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0,12 * * *"
|
- cron: "0 0 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -11,19 +11,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout meta branch
|
- name: Checkout meta branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: meta
|
ref: meta
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.21"
|
go-version: "1.23"
|
||||||
- name: update total downloads shield JSON
|
- name: update total downloads shield JSON
|
||||||
run: >-
|
run: >-
|
||||||
go run . badges downloads -o total-downloads/shield.json
|
go run . badges downloads
|
||||||
|
--output total-downloads/shield.json
|
||||||
|
--cache total-downloads/.cache.json
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
- name: commit and push changes to meta branch
|
- name: commit and push changes to meta branch
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
with:
|
with:
|
||||||
commit_message: "chore(meta): update metadata files"
|
commit_message: "chore(meta): update metadata files"
|
||||||
commit_user_name: github-actions[bot]
|
commit_user_name: github-actions[bot]
|
||||||
|
|||||||
119
README.md
119
README.md
@@ -10,7 +10,7 @@
|
|||||||
<a href="https://github.com/jimeh/emacs-builds/releases/latest"><img alt="GitHub release (stable)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app%2Fshield.json"></a>
|
<a href="https://github.com/jimeh/emacs-builds/releases/latest"><img alt="GitHub release (stable)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app%2Fshield.json"></a>
|
||||||
<a href="https://github.com/jimeh/emacs-builds/releases?q=pretest&expanded=true"><img alt="GitHub release (pretest)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-pretest%2Fshield.json"></a>
|
<a href="https://github.com/jimeh/emacs-builds/releases?q=pretest&expanded=true"><img alt="GitHub release (pretest)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-pretest%2Fshield.json"></a>
|
||||||
<a href="https://github.com/jimeh/emacs-builds/releases?q=master&expanded=true"><img alt="GitHub release (nightly)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-nightly%2Fshield.json"></a>
|
<a href="https://github.com/jimeh/emacs-builds/releases?q=master&expanded=true"><img alt="GitHub release (nightly)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-nightly%2Fshield.json"></a>
|
||||||
<a href="https://github.com/jimeh/emacs-builds/releases?q=emacs-29&expanded=true"><img alt="GitHub release (nightly@emacs-29)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-nightly-29%2Fshield.json"></a>
|
<a href="https://github.com/jimeh/emacs-builds/releases?q=master&expanded=true"><img alt="GitHub release (monthly)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-monthly%2Fshield.json"></a>
|
||||||
<a href="https://github.com/jimeh/emacs-builds/issues/7"><img alt="GitHub release (known good nightly)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-good%2Fshield.json"></a>
|
<a href="https://github.com/jimeh/emacs-builds/issues/7"><img alt="GitHub release (known good nightly)" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fjimeh%2Fhomebrew-emacs-builds%2Fmeta%2FCasks%2Femacs-app-good%2Fshield.json"></a>
|
||||||
<a href="https://github.com/jimeh/emacs-builds/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/jimeh/emacs-builds?style=flat&logo=github&logoColor=white"></a>
|
<a href="https://github.com/jimeh/emacs-builds/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues-raw/jimeh/emacs-builds?style=flat&logo=github&logoColor=white"></a>
|
||||||
<a href="https://github.com/jimeh/emacs-builds/pulls"><img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr-raw/jimeh/emacs-builds?style=flat&logo=github&logoColor=white"></a>
|
<a href="https://github.com/jimeh/emacs-builds/pulls"><img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr-raw/jimeh/emacs-builds?style=flat&logo=github&logoColor=white"></a>
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Self-contained Emacs.app application bundle, with no external dependencies.
|
- Self-contained Emacs.app application bundle, with no external dependencies.
|
||||||
- Native compilation ([gccemacs][]), only in Emacs 28.x and later builds.
|
- Native compilation ([gccemacs][]).
|
||||||
- Native JSON parsing via libjansson.
|
- Native JSON parsing.
|
||||||
- SVG rendering via librsvg.
|
- SVG rendering via librsvg.
|
||||||
- Various image formats are supported via macOS native image APIs.
|
- Various image formats are supported via macOS native image APIs.
|
||||||
- Xwidget-webkit support is enabled, allowing access to a embedded WebKit-based
|
- Xwidget-webkit support, allowing access to a embedded WebKit-based browser
|
||||||
browser with `M-x xwidget-webkit-browse-url`.
|
with `M-x xwidget-webkit-browse-url`.
|
||||||
- Native XML parsing via libxml2.
|
- Native XML parsing via libxml2.
|
||||||
- Dynamic module loading.
|
- Dynamic module loading.
|
||||||
- Includes the [fix-window-role][], [system-appearance][], and
|
- Includes the [fix-window-role][], [system-appearance][], and
|
||||||
@@ -56,8 +56,13 @@
|
|||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
|
|
||||||
- macOS 11.x (Big Sur) or later (uses Rosetta2 on Apple Silicon machines).
|
- Builds produced after 2024-11-30:
|
||||||
- Xcode Command Line Tools for native compilation (Emacs 28.x and later).
|
- macOS 11 or later.
|
||||||
|
- Builds produced before 2024-11-30:
|
||||||
|
- macOS 13 Ventura or later for Apple Silicon builds.
|
||||||
|
- macOS 12 Monterey or later for Intel builds.
|
||||||
|
- Xcode Command Line Tools to use native compilation in Emacs, available since
|
||||||
|
Emacs 28.x builds.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -77,38 +82,37 @@ for at least a day or two without any obvious issues.
|
|||||||
|
|
||||||
### Homebrew Cask
|
### Homebrew Cask
|
||||||
|
|
||||||
1. Install the
|
The [`jimeh/emacs-builds`](https://github.com/jimeh/homebrew-emacs-builds)
|
||||||
[`jimeh/emacs-builds`](https://github.com/jimeh/homebrew-emacs-builds)
|
Homebrew Tap provides the following casks:
|
||||||
Homebrew tap:
|
|
||||||
```
|
|
||||||
brew tap jimeh/emacs-builds
|
|
||||||
```
|
|
||||||
2. Install one of the available casks:
|
|
||||||
- `emacs-app` for the latest stable release of Emacs (includes native-comp
|
|
||||||
since v28.1):
|
|
||||||
```
|
|
||||||
brew install --cask emacs-app
|
|
||||||
```
|
|
||||||
- `emacs-app-pretest` for the latest pretest build from Emacs:
|
|
||||||
```
|
|
||||||
brew install --cask emacs-app-pretest
|
|
||||||
```
|
|
||||||
- `emacs-app-nightly` for the latest nightly build from Emacs' `master`
|
|
||||||
branch:
|
|
||||||
```
|
|
||||||
brew install --cask emacs-app-nightly
|
|
||||||
```
|
|
||||||
- `emacs-app-good` for the latest known good nightly build listed on [#7][7]:
|
|
||||||
```
|
|
||||||
brew install --cask emacs-app-good
|
|
||||||
```
|
|
||||||
- `emacs-app-nightly-29` for the latest Emacs 29.x nightly build from the
|
|
||||||
`emacs-29` branch:
|
|
||||||
```
|
|
||||||
brew install --cask emacs-app-nightly-29
|
|
||||||
```
|
|
||||||
|
|
||||||
[7]: https://github.com/jimeh/emacs-builds/issues/7
|
- `jimeh/emacs-builds/emacs-app` — Latest stable release of Emacs.
|
||||||
|
```bash
|
||||||
|
brew install --cask jimeh/emacs-builds/emacs-app
|
||||||
|
```
|
||||||
|
- `jimeh/emacs-builds/emacs-app-pretest` — Latest pretest build of Emacs.
|
||||||
|
```bash
|
||||||
|
brew install --cask jimeh/emacs-builds/emacs-app-pretest
|
||||||
|
```
|
||||||
|
- `jimeh/emacs-builds/emacs-app-nightly` — Build of Emacs from the `master`
|
||||||
|
branch, updated every night.
|
||||||
|
```bash
|
||||||
|
brew install --cask jimeh/emacs-builds/emacs-app-nightly
|
||||||
|
```
|
||||||
|
- `jimeh/emacs-builds/emacs-app-monthly` — Build of Emacs from the `master`
|
||||||
|
branch, updated on the 1st of each month.
|
||||||
|
```bash
|
||||||
|
brew install --cask jimeh/emacs-builds/emacs-app-monthly
|
||||||
|
```
|
||||||
|
- `jimeh/emacs-builds/emacs-app-good` for the latest known good nightly build
|
||||||
|
listed on [#7][7]:
|
||||||
|
```bash
|
||||||
|
brew install --cask jimeh/emacs-builds/emacs-app-good
|
||||||
|
```
|
||||||
|
|
||||||
|
## Apple Silicon
|
||||||
|
|
||||||
|
As of 2024-11-30, all builds include both Apple Silicon (arm64) and Intel
|
||||||
|
(x86_64) artifacts.
|
||||||
|
|
||||||
## Use Emacs.app as `emacs` CLI Tool
|
## Use Emacs.app as `emacs` CLI Tool
|
||||||
|
|
||||||
@@ -149,13 +153,11 @@ use the alias from the above example.
|
|||||||
## Build Process
|
## Build Process
|
||||||
|
|
||||||
Building Emacs is done using the [jimeh/build-emacs-for-macos][] build script,
|
Building Emacs is done using the [jimeh/build-emacs-for-macos][] build script,
|
||||||
executed within a GitHub Actions [workflow][]. This is why macOS 11.x (Big Sur)
|
executed within a GitHub Actions [workflow][].
|
||||||
or later is required, as it's the oldest version of macOS available in GitHub
|
|
||||||
Actions.
|
|
||||||
|
|
||||||
[jimeh/build-emacs-for-macos]: https://github.com/jimeh/build-emacs-for-macos
|
[jimeh/build-emacs-for-macos]: https://github.com/jimeh/build-emacs-for-macos
|
||||||
[workflow]:
|
[workflow]:
|
||||||
https://github.com/jimeh/emacs-builds/blob/main/.github/workflows/build.yml
|
https://github.com/jimeh/emacs-builds/blob/main/.github/workflows/nightly-master.yml
|
||||||
|
|
||||||
Full history for all builds is available on GitHub Actions [here][actions].
|
Full history for all builds is available on GitHub Actions [here][actions].
|
||||||
Build logs are only retained by GitHub for 90 days though.
|
Build logs are only retained by GitHub for 90 days though.
|
||||||
@@ -185,10 +187,39 @@ All builds also come with a SHA256 checksum file, which itself can be double
|
|||||||
checked against the SHA256 checksum log output from the packaging step of the
|
checked against the SHA256 checksum log output from the packaging step of the
|
||||||
GitHub Actions workflow run which produced the build.
|
GitHub Actions workflow run which produced the build.
|
||||||
|
|
||||||
[emacs-mirror/emacs]: https://github.com/emacs-mirror/emacs
|
|
||||||
|
|
||||||
## Issues / To-Do
|
## Issues / To-Do
|
||||||
|
|
||||||
Please see [Issues][] for details of things to come, or to report issues.
|
Please see [Issues][] for details of things to come, or to report issues.
|
||||||
|
|
||||||
[issues]: https://github.com/jimeh/emacs-builds/issues
|
[issues]: https://github.com/jimeh/emacs-builds/issues
|
||||||
|
|
||||||
|
## News / Recent Changes
|
||||||
|
|
||||||
|
### 2024-12-01 — Apple Silicon builds all the time, more stability via Nix
|
||||||
|
|
||||||
|
GitHub's standard runner for macOS 14 and later runs on Apple Silicon, and are
|
||||||
|
free to use for public repositories. As such we now use `runs-on: macos-13` for
|
||||||
|
Intel builds, and `runs-on: macos-14` for Apple Silicon builds. And we do so on
|
||||||
|
all builds, nightlies, pretests, and stable.
|
||||||
|
|
||||||
|
Additionally, macOS 11 Big Sur is now the minimum required version again, for
|
||||||
|
both Intel and Apple Silicon builds. This is due to switching from Homebrew to
|
||||||
|
Nix for managing build-time dependencies. And it supports easily switching
|
||||||
|
between different macOS SDK versions, meaning we can target an SDK that is older
|
||||||
|
than the OS we are creating the builds on.
|
||||||
|
|
||||||
|
### 2023-11-22 — Apple Silicon builds, drop macOS 11 support
|
||||||
|
|
||||||
|
Apple Silicon builds are now available, but limited to stable releases, and
|
||||||
|
nightly builds on the 1st of each month due to the cost of using M1-based
|
||||||
|
runners on GitHub Actions. Apple Silicon builds also require macOS 13 Ventura,
|
||||||
|
as that is the oldest macOS version available on M1-based runners.
|
||||||
|
|
||||||
|
Additionally, Intel builds minimum required macOS version has been increased
|
||||||
|
from macOS 11 Big Sur, to macOS 12 Monterey. This was needed as Homebrew no
|
||||||
|
longer supports Big Sur, leading to very lengthy and error prone builds as all
|
||||||
|
Homebrew dependencies had to be installed from source.
|
||||||
|
|
||||||
|
If dropping support for macOS 11 turns out to be a big issue, it may be possible
|
||||||
|
to offer macOS 11 compatible builds on a less frequent schedule similar to what
|
||||||
|
we're doing with Apple Silicon.
|
||||||
|
|||||||
Reference in New Issue
Block a user