shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.85k stars 334 forks source link

Broken on macos-13-xlarge #819

Closed TimWolla closed 5 months ago

TimWolla commented 5 months ago

Describe the bug

The action fails to set up PHP on macos-13-xlarge runners. These are the M1-based ARM runners. I was hoping that the fix for #818 would also fix these, but unfortunately not.

Version

Runners

Operating systems

macos-13-xlarge (M1 / ARM)

PHP versions

8.2

To Reproduce

name: Test

on: push

jobs:
  test:
    runs-on: macos-13-xlarge
    strategy:
      matrix:
        php:
          - "8.2"
    steps:
    - uses: actions/checkout@v4
    - name: "Install PHP"
      uses: "shivammathur/setup-php@v2"
      with:
        php-version: "${{ matrix.php }}"
    - run: php -i

Also tested with shivammathur/setup-php@verbose.

Expected behavior

A successful installation of PHP.

Screenshots/Logs

From the verbose build:

/bin/bash /Users/runner/work/_actions/shivammathur/setup-php/verbose/src/scripts/run.sh
==> Setup PHP
==> Downloading https://ghcr.io/v2/shivammathur/php/php/8.2/manifests/8.2.15-1
==> Fetching dependencies for shivammathur/php/php@8.2: apr, apr-util, argon2, aspell, m4, autoconf, libtool, unixodbc, freetds, highway, imath, openexr, webp, jpeg-xl, libvmaf, aom, libavif, gd, libpq, libsodium, libzip and tidy-html5
==> Downloading https://ghcr.io/v2/homebrew/core/apr/manifests/1.7.4
==> Fetching apr
==> Downloading https://ghcr.io/v2/homebrew/core/apr/blobs/sha256:55701a760762df4b13e8ea020e3b9f3cbab2bc98c4e454ebc8da6e1e732c6019
==> Downloading https://ghcr.io/v2/homebrew/core/apr-util/manifests/1.6.3_1
==> Fetching apr-util
==> Downloading https://ghcr.io/v2/homebrew/core/apr-util/blobs/sha256:cb73075171b2079d2b8e8028f42766dffa5db08882261c3f5aff59d8eb9638a9
==> Downloading https://ghcr.io/v2/homebrew/core/argon2/manifests/20190702_1
==> Fetching argon2
==> Downloading https://ghcr.io/v2/homebrew/core/argon2/blobs/sha256:016bdb5f9f24c58d77c34daa974103a22a80d7ded572c2cb2d4586c97b43eb62
==> Downloading https://ghcr.io/v2/homebrew/core/aspell/manifests/0.60.8.1_1
==> Fetching aspell
==> Downloading https://ghcr.io/v2/homebrew/core/aspell/blobs/sha256:c36b4d14b5b78a2b61a21878bec4a060376fc72a2bdd975c0a32c0f88fc0865b
==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
==> Fetching m4
==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:11308abe8d607be35da9e88a1d789f191914bf043bca4fdde2b50a6cbf1713cc
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72
==> Fetching autoconf
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:bb39057e87dd9cb940bee15ff5b5172952a0350e59b14a6f55b8006a07813186
==> Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.7-1
==> Fetching libtool
==> Downloading https://ghcr.io/v2/homebrew/core/libtool/blobs/sha256:a7196b340a6b2ee833b9451409a2e83b08ba192bebe4fd019c6e658789c76298
==> Downloading https://ghcr.io/v2/homebrew/core/unixodbc/manifests/2.3.12
==> Fetching unixodbc
==> Downloading https://ghcr.io/v2/homebrew/core/unixodbc/blobs/sha256:b2d0036483c00d1f3e12b90e288d18b1714ee1b6e95de4d443c0b1101657bfba
==> Downloading https://ghcr.io/v2/homebrew/core/freetds/manifests/1.4.10
==> Fetching freetds
==> Downloading https://ghcr.io/v2/homebrew/core/freetds/blobs/sha256:356939e0d9ebaf186aadd07e3415cd169bf792d42a5266876a2c1f476f1173a1
==> Downloading https://ghcr.io/v2/homebrew/core/highway/manifests/1.0.7
==> Fetching highway
==> Downloading https://ghcr.io/v2/homebrew/core/highway/blobs/sha256:11f8cb26c616f19979c723f39d2713248854244e2ee99e7904c6843f3456e11c
==> Downloading https://ghcr.io/v2/homebrew/core/imath/manifests/3.1.10
==> Fetching imath
==> Downloading https://ghcr.io/v2/homebrew/core/imath/blobs/sha256:df05fa1fae871cc631d18f5bdff6c2a1658dbf40be530d5c356841f76e957898
==> Downloading https://ghcr.io/v2/homebrew/core/openexr/manifests/3.2.1
==> Fetching openexr
==> Downloading https://ghcr.io/v2/homebrew/core/openexr/blobs/sha256:29e6b7abc63489d0ebf8540b3e9f9f6f3ae9e1433f3208480c9a7a419f9cd008
==> Downloading https://ghcr.io/v2/homebrew/core/webp/manifests/1.3.2
==> Fetching webp
==> Downloading https://ghcr.io/v2/homebrew/core/webp/blobs/sha256:e36770b86bd3d3a71469dc66bd2fe5070f80d8d1f4dab1c6ff2d9732bd9e0ed3
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/manifests/0.9.1
==> Fetching jpeg-xl
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/blobs/sha256:95fefc2f6ff4380170eb5e5994fa51c3d92e510c85e08c8b4ac2c6812efa7013
==> Downloading https://ghcr.io/v2/homebrew/core/libvmaf/manifests/3.0.0
==> Fetching libvmaf
==> Downloading https://ghcr.io/v2/homebrew/core/libvmaf/blobs/sha256:cc4765c5f45c5f87bcc42dba73fada9659abbf47bb9adb68bd406c26ac23380a
==> Downloading https://ghcr.io/v2/homebrew/core/aom/manifests/3.8.1
==> Fetching aom
==> Downloading https://ghcr.io/v2/homebrew/core/aom/blobs/sha256:c74c13e3945e69a4cb2f6da6155ab9a2ac5922628a87543a6edd34cf7f9c9964
==> Downloading https://ghcr.io/v2/homebrew/core/libavif/manifests/1.0.4
==> Fetching libavif
==> Downloading https://ghcr.io/v2/homebrew/core/libavif/blobs/sha256:977e29672df4024348ace66dd3edde30e9dae814e853495ab71952f7235709b5
==> Downloading https://ghcr.io/v2/homebrew/core/gd/manifests/2.3.3_6
==> Fetching gd
==> Downloading https://ghcr.io/v2/homebrew/core/gd/blobs/sha256:3f868f36cc47f91ea2a896c4b6ea62fab9b3ef94d7765f34234b277ee46788af
==> Downloading https://ghcr.io/v2/homebrew/core/libpq/manifests/16.2
==> Fetching libpq
==> Downloading https://ghcr.io/v2/homebrew/core/libpq/blobs/sha256:f9bebf61ad6968b16251ef392daffcacadd274a4243e191c728abf62b6c673d1
==> Downloading https://ghcr.io/v2/homebrew/core/libsodium/manifests/1.0.19
==> Fetching libsodium
==> Downloading https://ghcr.io/v2/homebrew/core/libsodium/blobs/sha256:182de39b6e91d6966cac1982307baa664cf9d59bf387e77caea7d65bf822456d
==> Downloading https://ghcr.io/v2/homebrew/core/libzip/manifests/1.10.1-1
==> Fetching libzip
==> Downloading https://ghcr.io/v2/homebrew/core/libzip/blobs/sha256:cd7bda731a8b2e5d1a3cdf5be6b515718c56d55d16a5b45faa1a91daf9c0ca2b
==> Downloading https://ghcr.io/v2/homebrew/core/tidy-html5/manifests/5.8.0
==> Fetching tidy-html5
==> Downloading https://ghcr.io/v2/homebrew/core/tidy-html5/blobs/sha256:25de41a82adac06447528f20ebe466530708c86a7440c6d9f3dd122df90e5684
==> Fetching shivammathur/php/php@8.2
==> Downloading https://ghcr.io/v2/shivammathur/php/php/8.2/blobs/sha256:83a654a9df5ffb361cc4d8d36d9b4b31b865b829a68549d22bd433615a51d251
==> Installing php@8.2 from shivammathur/php
==> Installing dependencies for shivammathur/php/php@8.2: apr, apr-util, argon2, aspell, m4, autoconf, libtool, unixodbc, freetds, highway, imath, openexr, webp, jpeg-xl, libvmaf, aom, libavif, gd, libpq, libsodium, libzip and tidy-html5
==> Installing shivammathur/php/php@8.2 dependency: apr
==> Downloading https://ghcr.io/v2/homebrew/core/apr/manifests/1.7.4
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5cea0c08bd37febcd8cd169db1e67b7106cf42ff4165a1aadfbc2748d2a4058c--apr-1.7.4.bottle_manifest.json
==> Pouring apr--1.7.4.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/apr/1.7.4: 59 files, 1.4MB
==> Installing shivammathur/php/php@8.2 dependency: apr-util
==> Downloading https://ghcr.io/v2/homebrew/core/apr-util/manifests/1.6.3_1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/882503b5e82fa34d08932148f6a5a53179ac546c280d03dada41d245809d39e7--apr-util-1.6.3_1.bottle_manifest.json
==> Pouring apr-util--1.6.3_1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/apr-util/1.6.3_1: 54 files, 909.2KB
==> Installing shivammathur/php/php@8.2 dependency: argon2
==> Downloading https://ghcr.io/v2/homebrew/core/argon2/manifests/20190702_1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/1edde14bdb96d4a110df174fb14e59db91750d4b8d4834474e62450ae1ec81a5--argon2-20190702_1.bottle_manifest.json
==> Pouring argon2--20190702_1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/argon2/20190702_1: 12 files, 684.2KB
==> Installing shivammathur/php/php@8.2 dependency: aspell
==> Downloading https://ghcr.io/v2/homebrew/core/aspell/manifests/0.60.8.1_1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/785bcd0f9c3af14b3b10c4d68a827219a3cc7ee0a302b54c2848bb1b416328e8--aspell-0.60.8.1_1.bottle_manifest.json
==> Pouring aspell--0.60.8.1_1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/aspell/0.60.8.1_1: 767 files, 322.9MB
==> Installing shivammathur/php/php@8.2 dependency: m4
==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json
==> Pouring m4--1.4.19.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/m4/1.4.19: 13 files, 742.4KB
==> Installing shivammathur/php/php@8.2 dependency: autoconf
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/b73cdb320c4261bbf8d02d03e50dc755c869c5859c1d4e93616898fc7cd939ff--autoconf-2.72.bottle_manifest.json
==> Pouring autoconf--2.72.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/autoconf/2.72: 71 files, 3.6MB
==> Installing shivammathur/php/php@8.2 dependency: libtool
==> Downloading https://ghcr.io/v2/homebrew/core/libtool/manifests/2.4.7-1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/606e79b61b857bc4e83f71abf7afa8e087c4ad71539989e7066a4055439bf129--libtool-2.4.7-1.bottle_manifest.json
==> Pouring libtool--2.4.7.arm64_ventura.bottle.1.tar.gz
🍺  /opt/homebrew/Cellar/libtool/2.4.7: 75 files, 3.8MB
==> Installing shivammathur/php/php@8.2 dependency: unixodbc
==> Downloading https://ghcr.io/v2/homebrew/core/unixodbc/manifests/2.3.12
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/f0a48ea379f8e4acc3dc9d88ec4ce4e354b4437d2104efee3399b892b79d55ac--unixodbc-2.3.12.bottle_manifest.json
==> Pouring unixodbc--2.3.12.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/unixodbc/2.3.12: 47 files, 2.3MB
==> Installing shivammathur/php/php@8.2 dependency: freetds
==> Downloading https://ghcr.io/v2/homebrew/core/freetds/manifests/1.4.10
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/e3ffed9bf57cddf590b130d4ee815ce234fa0bc7d583c8c39d511251b4de281d--freetds-1.4.10.bottle_manifest.json
==> Pouring freetds--1.4.10.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/freetds/1.4.10: 1,418 files, 16MB
==> Installing shivammathur/php/php@8.2 dependency: highway
==> Downloading https://ghcr.io/v2/homebrew/core/highway/manifests/1.0.7
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/310f2f4bf70e1090998016b5441a741a6cf7f895932c5b664e8fb74f236e5401--highway-1.0.7.bottle_manifest.json
==> Pouring highway--1.0.7.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/highway/1.0.7: 65 files, 3.3MB
==> Installing shivammathur/php/php@8.2 dependency: imath
==> Downloading https://ghcr.io/v2/homebrew/core/imath/manifests/3.1.10
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5779a4560be17477726d46e846e28aef31f460d062b6df76dfe0d03a360d2592--imath-3.1.10.bottle_manifest.json
==> Pouring imath--3.1.10.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/imath/3.1.10: 49 files, 939.7KB
==> Installing shivammathur/php/php@8.2 dependency: openexr
==> Downloading https://ghcr.io/v2/homebrew/core/openexr/manifests/3.2.1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/5b8bbf02d04feb2a6e9c578e606f8aeacce2f261c79900426f7bc1d2b0c1717e--openexr-3.2.1.bottle_manifest.json
==> Pouring openexr--3.2.1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/openexr/3.2.1: 204 files, 7.8MB
==> Installing shivammathur/php/php@8.2 dependency: webp
==> Downloading https://ghcr.io/v2/homebrew/core/webp/manifests/1.3.2
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/952907f186b4d32b3e43b7af1c9e93bd484f9b61db1adb22b5fb4a5361cdd0e9--webp-1.3.2.bottle_manifest.json
==> Pouring webp--1.3.2.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/webp/1.3.2: 63 files, 2.3MB
==> Installing shivammathur/php/php@8.2 dependency: jpeg-xl
==> Downloading https://ghcr.io/v2/homebrew/core/jpeg-xl/manifests/0.9.1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/0f5e4b24fe774102590ae76c337997de3e38fc965c5694441167cac407924cdd--jpeg-xl-0.9.1.bottle_manifest.json
==> Pouring jpeg-xl--0.9.1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/jpeg-xl/0.9.1: 45 files, 5MB
==> Installing shivammathur/php/php@8.2 dependency: libvmaf
==> Downloading https://ghcr.io/v2/homebrew/core/libvmaf/manifests/3.0.0
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/6bf89f1d683f34ff5b4c58275236e1f038d5d8189e538795d9af83e07d4c8404--libvmaf-3.0.0.bottle_manifest.json
==> Pouring libvmaf--3.0.0.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/libvmaf/3.0.0: 234 files, 7.2MB
==> Installing shivammathur/php/php@8.2 dependency: aom
==> Downloading https://ghcr.io/v2/homebrew/core/aom/manifests/3.8.1
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/9d2e330fff77ef4153e29bebdce7d34c89161d929b3203af1ef7e343ad75082c--aom-3.8.1.bottle_manifest.json
==> Pouring aom--3.8.1.arm64_ventura.bottle.tar.gz
🍺  /opt/homebrew/Cellar/aom/3.8.1: 23 files, 9.9MB
==> Installing shivammathur/php/php@8.2 dependency: libavif
==> Downloading https://ghcr.io/v2/homebrew/core/libavif/manifests/1.0.4
Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/be5adfc796abe915819451a1488fc3b9f68d320a8bb92c451c21f450b4e4e672--libavif-1.0.4.bottle_manifest.json
==> Pouring libavif--1.0.4.arm64_ventura.bottle.tar.gz
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /opt/homebrew
Directory not empty @ dir_s_rmdir - /opt/homebrew/opt/libavif
Error: Directory not empty @ dir_s_rmdir - /opt/homebrew/opt/libavif
Error: No such keg: /opt/homebrew/Cellar/shivammathur/php/php@8.2
grep: : No such file or directory
grep: : No such file or directory
/Users/runner/work/_actions/shivammathur/setup-php/verbose/src/scripts/../scripts/unix.sh: line 189: php: command not found
mkdir: : No such file or directory
chmod: /php.ini: No such file or directory
/Users/runner/work/_actions/shivammathur/setup-php/verbose/src/scripts/../scripts/unix.sh: line 184: php_config: parameter null or not set
cp: /php.ini: No such file or directory
cp: /php.ini-production: No such file or directory
tee: /php.ini: Read-only file system
date.timezone=UTC
memory_limit=-1
xdebug.mode=coverage
tee: /php.ini: Read-only file system
opcache.enable=1
opcache.jit_buffer_size=256M
opcache.jit=1235
php-version=
✗ PHP Could not setup PHP 8.2
Error: The process '/bin/bash' failed with exit code 1

Additional context

The issue cannot be reproduced with the flyci-macos-large-latest-m1 runner from FlyCI. I was only able to reproduce the issue with GitHub's own macos-13-xlarge runner.

Successful build with the FlyCI runner is here:

https://github.com/TimWolla/setup-php-macos-arm/actions/runs/7903204973/job/21570576772

I'm not able to provide a link to the broken build, as it's in a private organization repository and my personal account is not set up for billing (which unfortunately is required for GitHub's ARM runners).

Are you willing to submit a PR?

I don't have any macOS knowledge, thus unfortunately not.

TimWolla commented 5 months ago

The issue appears to be resolved.