@@ -585,20 +585,29 @@ jobs:
585
585
EXT_DIR=$(php -r "echo ini_get('extension_dir');")
586
586
587
587
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"
589
593
else
590
594
BUILT_LIB=$(find target/release -name "*.so" | head -1)
595
+ sudo cp "$BUILT_LIB" "$EXT_DIR/css_inline.so"
591
596
fi
592
- sudo cp "$BUILT_LIB" "$EXT_DIR/css_inline.so"
593
597
working-directory : ./bindings/php
594
598
shell : bash
595
599
596
600
- name : Enable and verify extension
597
601
run : |
598
602
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
602
611
echo "extension=css_inline" | sudo tee "$PHP_INI_DIR/99-css_inline.ini"
603
612
else
604
613
echo "extension=css_inline" | sudo tee /etc/php/${{ matrix.php-version }}/cli/conf.d/99-css_inline.ini
0 commit comments