@@ -585,20 +585,29 @@ jobs:
585585 EXT_DIR=$(php -r "echo ini_get('extension_dir');")
586586
587587 if [[ "${{ matrix.os }}" == "macos-13" ]]; then
588- BUILT_LIB=$(find target/release -name "*.dylib" | head -1)
588+ BUILT_LIB=$(find target/release -name "libcss_inline_php.dylib" -o -name "css_inline_php.dylib" | head -1)
589+ if [[ -z "$BUILT_LIB" ]]; then
590+ BUILT_LIB=$(find target/release -name "*.dylib" | head -1)
591+ fi
592+ sudo cp "$BUILT_LIB" "$EXT_DIR/css_inline.so"
589593 else
590594 BUILT_LIB=$(find target/release -name "*.so" | head -1)
595+ sudo cp "$BUILT_LIB" "$EXT_DIR/css_inline.so"
591596 fi
592- sudo cp "$BUILT_LIB" "$EXT_DIR/css_inline.so"
593597 working-directory : ./bindings/php
594598 shell : bash
595599
596600 - name : Enable and verify extension
597601 run : |
598602 if [[ "${{ matrix.os }}" == "macos-13" ]]; then
599- PHP_INI=$(php -i | grep "Loaded Configuration File" | cut -d' ' -f9)
600- PHP_INI_DIR=$(dirname "$PHP_INI")/conf.d
601- sudo mkdir -p "$PHP_INI_DIR"
603+ # On macOS, find the additional ini directory
604+ PHP_INI_DIR=$(php -i | grep "Scan this dir for additional .ini files" | cut -d' ' -f9 | tr -d ' ')
605+ if [[ -z "$PHP_INI_DIR" || "$PHP_INI_DIR" == "(none)" ]]; then
606+ # If no scan dir, use the main php.ini location
607+ PHP_INI=$(php -i | grep "Loaded Configuration File" | cut -d' ' -f9)
608+ PHP_INI_DIR=$(dirname "$PHP_INI")/conf.d
609+ sudo mkdir -p "$PHP_INI_DIR"
610+ fi
602611 echo "extension=css_inline" | sudo tee "$PHP_INI_DIR/99-css_inline.ini"
603612 else
604613 echo "extension=css_inline" | sudo tee /etc/php/${{ matrix.php-version }}/cli/conf.d/99-css_inline.ini
0 commit comments