Skip to content

Update MuPDF library for linux #49

Update MuPDF library for linux

Update MuPDF library for linux #49

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- '**'
- '!main'
paths:
- misc/mupdf/version
- .github/workflows/mupdf.yml
name: MuPDF
jobs:
version:
name: Version
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
version: ${{ steps.mupdf-version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Export MuPDF Version
id: mupdf-version
run: cat misc/mupdf/version | awk '{$1=$1};1' | { read version; echo "::set-output name=version::${version}"; }
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
include:
- alias: linux
os: ubuntu-latest
runs-on: ${{ matrix.os }}
needs: version
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout MuPDF code
uses: actions/checkout@v4
with:
repository: ArtifexSoftware/mupdf
ref: ${{needs.version.outputs.version}}
submodules: true
path: tmp
- name: Build MuPDF
working-directory: tmp
run: make -j libs
- name: Update lib
run: |
mkdir -p misc/mupdf/lib/x86-64-${{ matrix.alias }}
cp tmp/build/release/libmupdf.a misc/mupdf/lib/x86-64-${{ matrix.alias }}/
cp tmp/build/release/libmupdf-third.a misc/mupdf/lib/x86-64-${{ matrix.alias }}/
- name: Remove MuPDF temporary folder
run: rm -Rf tmp
- name: Commit updated library
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.email "no-reply@github.com"
git config user.name "GitHub Actions"
git add .
git commit -am 'Update MuPDF library for ${{ matrix.alias }}'
git pull --rebase
git push
fi
header:
name: Header
runs-on: ubuntu-latest
needs: version
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout MuPDF code
uses: actions/checkout@v4
with:
repository: ArtifexSoftware/mupdf
ref: ${{needs.version.outputs.version}}
path: tmp
- name: Update headers
run: |
rm -Rf misc/mupdf/include/mupdf
cp -R tmp/include/mupdf misc/mupdf/include/
- name: Remove MuPDF temporary folder
run: rm -Rf tmp
- name: Commit updated headers
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.email "no-reply@github.com"
git config user.name "GitHub Actions"
git add .
git commit -am 'Update MuPDF headers'
git pull --rebase
git push
fi