ElyDoc, ElyTable, ElyShow (LibreOfficeKit), ElyPDF (MuPDF), ElyTree (Git), ElyMark (Milkdown and CodeMirror in CEF). ElyMail and ElyAgent follow.
78 lines
2.8 KiB
YAML
78 lines
2.8 KiB
YAML
# Builds the patched engines once; release.yml downloads them.
|
|
name: engines
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
macos:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: macos-15
|
|
arch: arm64
|
|
- runner: macos-15-intel
|
|
arch: x86_64
|
|
runs-on: ${{ matrix.runner }}
|
|
timeout-minutes: 355
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
CCACHE_MAXSIZE: 6G
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Key
|
|
id: key
|
|
run: echo "key=$(scripts/engines-key.sh)" >> "$GITHUB_OUTPUT"
|
|
- name: Already built?
|
|
id: done
|
|
run: |
|
|
if gh release view "engines-${{ steps.key.outputs.key }}" --json assets \
|
|
--jq '.assets[].name' 2>/dev/null | grep -qx "engines-macos-${{ matrix.arch }}.tar.zst"; then
|
|
echo "built=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
- name: Tools
|
|
if: steps.done.outputs.built != 'true'
|
|
run: brew install make gnu-sed bison flex gettext autoconf automake libtool ccache nasm zstd
|
|
- name: Compiler cache
|
|
if: steps.done.outputs.built != 'true'
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: .ccache
|
|
key: ccache-macos-${{ matrix.arch }}-${{ steps.key.outputs.key }}-${{ github.run_id }}
|
|
restore-keys: ccache-macos-${{ matrix.arch }}-
|
|
- name: Upstream sources
|
|
if: steps.done.outputs.built != 'true'
|
|
run: scripts/fetch-references.sh
|
|
- name: LibreOffice (patched)
|
|
if: steps.done.outputs.built != 'true'
|
|
run: scripts/build-libreoffice.sh
|
|
- name: MuPDF (patched), Git, git-lfs, OCR data, CEF
|
|
if: steps.done.outputs.built != 'true'
|
|
run: |
|
|
scripts/build-mupdf.sh
|
|
scripts/build-git.sh
|
|
scripts/fetch-git-lfs.sh
|
|
scripts/fetch-tessdata.sh
|
|
scripts/fetch-cef.sh
|
|
- name: Keep the compiler cache, even after a timeout
|
|
if: always() && steps.done.outputs.built != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: .ccache
|
|
key: ccache-macos-${{ matrix.arch }}-${{ steps.key.outputs.key }}-${{ github.run_id }}
|
|
- name: Publish
|
|
if: steps.done.outputs.built != 'true'
|
|
run: |
|
|
archive=engines-macos-${{ matrix.arch }}.tar.zst
|
|
tar -C engines -cf - lo-src/instdir mupdf-build mupdf-src git git-src/COPYING git-src/LGPL-2.1 cef tessdata |
|
|
zstd -19 -T0 -o "$archive"
|
|
tag=engines-${{ steps.key.outputs.key }}
|
|
gh release view "$tag" >/dev/null 2>&1 ||
|
|
gh release create "$tag" --prerelease --title "$tag" --notes "Pinned, patched engines; built by engines.yml."
|
|
gh release upload "$tag" "$archive" --clobber
|