Skip to content

Emacs (default)

Emacs (default) #2356

Workflow file for this run

name: Emacs (default)
on:
push:
branches:
- master
paths:
- "Aliases/emacs-plus"
- ".github/workflows/emacs.yml"
- "Library/**"
pull_request:
paths:
- "Aliases/emacs-plus"
- ".github/workflows/emacs.yml"
- "Library/**"
schedule:
- cron: "30 0 * * *"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-13
- ubuntu-latest
build_opts:
- ""
- "--build-from-source"
- "--with-spacemacs-icon"
include:
- os: macos-13
logs: "~/Library/Logs/Homebrew"
- os: ubuntu-latest
logs: "~/.cache/Homebrew/Logs"
extra_opts: "--without-cocoa"
env:
HOMEBREW_GITHUB_REF: ${{ github.head_ref || github.ref }}
HOMEBREW_GITHUB_REPOSITORY: ${{ github.repository }}
HOMEBREW_GITHUB_ACTOR: ${{ github.actor }}
steps:
- uses: actions/checkout@v4
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master
if: matrix.os == 'ubuntu-latest'
- name: Build emacs-plus ${{ matrix.build_opts }}
run: brew install Aliases/$(readlink Aliases/emacs-plus) ${{ matrix.build_opts }} ${{ matrix.extra_opts }} --verbose
- name: Test installation
run: $(brew --prefix)/bin/emacs --batch --eval='(print (+ 2 2))'
- name: Pack up build logs
if: ${{ always() }}
run: |
BUILD_OPTS=$(echo "${{ matrix.build_opts }}" | sed 's/ //')
echo "build_opts=$BUILD_OPTS" >> "$GITHUB_ENV"
RUNNER_OS=$(echo "${{ matrix.os }}" | sed 's/ //')
echo "runner_os=$RUNNER_OS" >> "$GITHUB_ENV"
tar -C ${{ matrix.logs}}/emacs-plus@29/ -czvf emacs-plus@29-$RUNNER_OS$BUILD_OPTS.tar.gz .
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: emacs-plus-${{ env.runner_os }}${{ env.build_opts }}.tar.gz
path: |
~/Library/Logs/Homebrew/emacs-plus-${{ env.runner_os }}${{ env.build_opts }}.tar.gz