ci(deps): upgrade runners to macos-14 and add caching to emacs-builder building

This commit is contained in:
2024-12-01 01:46:25 +00:00
parent 3ad358b554
commit 3626ff4164

View File

@@ -17,28 +17,46 @@ on:
jobs:
emacs-builder:
runs-on: macos-12
runs-on: "macos-14"
steps:
- id: builder_ref
run: |
BUILDER_REF=v0.6.52
echo "ref=$BUILDER_REF=v0" >> "$GITHUB_OUTPUT"
- name: Cache emacs-builder (${{ runner.arch }})
id: cache
uses: actions/cache@v4
with:
path: bin/emacs-builder
key: emacs-builder-${{ runner.arch }}-${{ steps.builder_ref.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: "v0.6.45"
- name: Install Go
ref: ${{ steps.builder_ref.outputs.sha }}
fetch-depth: 0
- name: Setup Go
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Build emacs-builder tool
if: steps.cache.outputs.cache-hit != 'true'
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
uses: actions/upload-artifact@v4
with:
name: emacs-builder
name: emacs-builder-${{ runner.arch }}
path: bin/emacs-builder
if-no-files-found: error
live-check:
runs-on: macos-12
runs-on: "macos-14"
outputs:
tap_sha: ${{ steps.tap_sha.outputs.sha }}
steps:
@@ -75,7 +93,7 @@ jobs:
if-no-files-found: error
update-casks:
runs-on: macos-12
runs-on: "macos-14"
needs: [emacs-builder, live-check]
steps:
- name: Checkout tap repository
@@ -86,7 +104,7 @@ jobs:
- name: Download pre-built emacs-builder artifact
uses: actions/download-artifact@v4
with:
name: emacs-builder
name: emacs-builder-${{ runner.arch }}
path: bin
- name: Ensure emacs-builder is executable
run: chmod +x bin/emacs-builder
@@ -106,7 +124,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-meta:
runs-on: macos-12
runs-on: "macos-14"
needs: [update-casks]
permissions:
contents: write