Skip to content

Install Ghostscript only for packages that need it - #315

Merged
schlessera merged 1 commit into
mainfrom
ci/ghostscript-on-demand
Nov 2, 2026
Merged

schlessera merged 1 commit into
mainfrom
ci/ghostscript-on-demand

Conversation

@schlessera

Copy link
Copy Markdown
Member

Ghostscript is now installed only when the package has a scenario tagged @require-bin-gs. The check is a grep over features/ right after checkout, and it gates the Linux, macOS and Windows installs.

The ubuntu-22.04 image no longer ships Ghostscript, so the "already installed" shortcut from #274 never fires. Every Linux Behat job runs apt-get update && apt-get install ghostscript. In wp-cli/wp-cli that took 14–31 s per job (median 19 s), about 15 runner-minutes per run, for a package none of its tests use. Only media-command's PDF scenarios need it, for Imagick.

Merge after wp-cli/media-command#273, which adds the tag. Until then media-command would lose Ghostscript, and its seven PDF scenarios would fail.

Testing

  • Without the tags: no Ghostscript was installed, and exactly the seven PDF + Imagick scenarios failed on every leg.
  • With the tags: Ghostscript was installed and all Linux and Windows legs pass. On Windows the binary is gswin64c, so @require-bin-gs skips those scenarios there. The macOS leg fails on main every night with the same seven scenarios even though Ghostscript is installed; this PR doesn't change that.
  • actionlint is clean.

🤖 Generated with Claude Code

Only scenarios tagged @require-bin-gs need Ghostscript, for Imagick to render
PDFs. The runner images no longer ship it, so every Linux Behat leg spent
15-30s on apt-get for nothing in all packages but media-command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera requested a review from a team as a code owner November 2, 2026 09:28
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4dba263b-8585-4aa3-a440-1738cb5fba5b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added enhancement New feature or request scope:testing labels Nov 2, 2026
@schlessera
schlessera merged commit 5c1972b into main Nov 2, 2026
17 checks passed
@schlessera
schlessera deleted the ci/ghostscript-on-demand branch November 2, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request scope:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant