From b0f109a023918d9856543e4ab74771c470b6ad72 Mon Sep 17 00:00:00 2001 From: Doug Date: Mon, 11 Mar 2024 11:45:19 +0000 Subject: [PATCH] Only install imagemagick when needed. Workaround for issues installing python from brew on a runner right now. --- .github/workflows/pr-build.yml | 2 ++ ci_scripts/ci_common.sh | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index fd45a8820..d9271a95e 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -29,6 +29,8 @@ jobs: ${{ runner.os }}-gems- - name: Setup environment + env: + CI_WORKFLOW: PR_BUILD run: source ci_scripts/ci_common.sh && setup_github_actions_environment diff --git a/ci_scripts/ci_common.sh b/ci_scripts/ci_common.sh index 685e52e0b..c6e9c6b68 100755 --- a/ci_scripts/ci_common.sh +++ b/ci_scripts/ci_common.sh @@ -41,7 +41,11 @@ setup_github_actions_environment() { unset HOMEBREW_NO_INSTALL_FROM_API export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 - brew update && brew install xcodegen swiftformat git-lfs imagemagick a7ex/homebrew-formulae/xcresultparser + brew update && brew install xcodegen swiftformat git-lfs a7ex/homebrew-formulae/xcresultparser + + if [ "$CI_WORKFLOW" = "PR_BUILD" ]; then + brew install imagemagick + fi # brew "swiftlint" # Fails on the CI: `Target /usr/local/bin/swiftlint Target /usr/local/bin/swiftlint already exists`. Installed through https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md#linters