Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Enable HEIC support in ImageMagick
- name: Enable HEIC and PostScript support in ImageMagick
run: |
# The HEIC preview tests need ImageMagick to actually decode HEIC files.
# GitHub-hosted runners register the HEIC coder (so the tests are not
# skipped) but decoding fails because the libheif delegate is missing
# The HEIC and PostScript preview tests need ImageMagick to actually decode
# these files. GitHub-hosted runners register the coders (so the tests are
# not skipped) but decoding fails because the libheif delegate is missing
# and/or the coder is blocked by ImageMagick's security policy. Install
# the delegate and allow the HEIC/HEIF/AVIF coders so decoding succeeds.
# the delegate and allow the coders so decoding succeeds.
sudo apt-get update
sudo apt-get install -y --no-install-recommends libheif1 libheif-dev
for policy in /etc/ImageMagick-{6,7}/policy.xml; do
if [ -f "$policy" ]; then
sudo sed -i -E 's/rights="none" pattern="(HEIC|HEIF|AVIF)"/rights="read|write" pattern="\1"/g' "$policy"
sudo sed -i -E 's/rights="none" pattern="(HEIC|HEIF|AVIF|PS|EPS)"/rights="read|write" pattern="\1"/g' "$policy"
fi
done

Expand Down
Loading