Skip to content

Commit

Permalink
Fix CI/CD fail by installing ImageMagick on runner
Browse files Browse the repository at this point in the history
This commit addresses an issue where CI/CD jobs fail due to the removal of
`imagemagick` from GitHub's preinstalled software list for Ubuntu
runners. As a result, commands relying on `imagemagick` were not found.

To resolve this, the commit installs `imagemagick` across all platforms
(Linux, macOS, and Windows). This safeguards against future changes to
the preinstalled software list on GitHub runners.

This commit also centralizes installing of ImageMagick as its own action
for reusability.
  • Loading branch information
undergroundwires committed Oct 11, 2024
1 parent 74378f7 commit 8da4fee
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .github/actions/install-imagemagick/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
inputs:
project-root:
required: false
default: '.'
runs:
using: composite
steps:
-
name: Install ImageMagick
shell: bash
run: ./.github/actions/install-imagemagick/install-imagemagick.sh
working-directory: ${{ inputs.project-root }}
Empty file.
6 changes: 3 additions & 3 deletions .github/workflows/checks.desktop-runtime-errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
-
name: Install dependencies
uses: ./.github/actions/npm-install-dependencies
-
name: Install ImageMagick # For screenshots
uses: ./.github/actions/install-imagemagick
-
name: Configure Ubuntu
if: contains(matrix.os, 'ubuntu') # macOS runner is missing Docker
Expand Down Expand Up @@ -56,9 +59,6 @@ jobs:
sudo Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo "DISPLAY=:99" >> $GITHUB_ENV
# Install ImageMagick for screenshots
sudo apt install -y imagemagick
# Install xdotool and xprop (from x11-utils) for window title capturing
sudo apt install -y xdotool x11-utils
-
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/checks.scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ on:

jobs:
icons-build:
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os.name }}-latest
strategy:
matrix:
os: [ macos, ubuntu, windows ]
os: [macos, ubuntu, windows]
fail-fast: false # Still interested to see results from other combinations
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Install ImageMagick on macOS
if: matrix.os == 'macos'
run: brew install imagemagick
name: Install ImageMagick
uses: ./.github/actions/install-imagemagick
-
name: Setup node
uses: ./.github/actions/setup-node
Expand Down

0 comments on commit 8da4fee

Please sign in to comment.