@@ -6,6 +6,12 @@ permissions:
66on :
77 push : {}
88 pull_request : {}
9+ workflow_dispatch :
10+ inputs :
11+ full-matrix :
12+ description : " Run the full engine, host, and language version matrix"
13+ type : boolean
14+ default : false
915
1016jobs :
1117 get-matrices :
2531 # Run full test matrix if job started by cron or it was explicitly specified by a person who triggered the workflow
2632 run-full-matrix : ${{ github.event.inputs.full-matrix == 'true' || github.event_name == 'schedule' }}
2733
28- test-php :
34+ test-pie-install :
2935 name : PHP Tests - ${{ matrix.php }}, EngineVersion - ${{ matrix.engine.version }}, Target - ${{ matrix.host.TARGET }}
3036 needs : get-matrices
3137 timeout-minutes : 35
@@ -47,27 +53,10 @@ jobs:
4753 echo "Job running with the following matrix configuration:"
4854 echo "${{ toJson(matrix) }}"
4955
50- test-pie-install :
51- name : PHP Tests - ${{ matrix.php }}, EngineVersion - ${{ matrix.engine.version }}, Target - ${{ matrix.host.TARGET }}
52- needs : get-matrices
53- timeout-minutes : 35
54- strategy :
55- fail-fast : false
56- matrix :
57- php : ${{ fromJson(needs.get-matrices.outputs.version-matrix-output) }}
58- engine : ${{ fromJson(needs.get-matrices.outputs.engine-matrix-output) }}
59- host : ${{ fromJson(needs.get-matrices.outputs.host-matrix-output) }}
60- runs-on : ${{ matrix.host.RUNNER }}
61-
62- steps :
63- - uses : actions/checkout@v4
64- with :
65- submodules : recursive
66-
6756 - name : Setup PHP Extension Build Environment
6857 uses : ./.github/workflows/setup-php-extension
6958 with :
70- php-version : ${{ env.BASE_PHP_VERSION }}
59+ php-version : ${{ matrix.php }}
7160 install-composer-deps : " true"
7261
7362 - name : Create manual Composer repository
@@ -122,7 +111,11 @@ jobs:
122111
123112 # Make sure root can read the user's composer config
124113 sudo chmod -R 755 "$HOME/.config/composer"
125- sudo chown -R root:root "$HOME/.config/composer" || true
114+ if [[ "${{ matrix.host.OS }}" == "macos" ]]; then
115+ sudo chown -R root:wheel "$HOME/.config/composer" || true
116+ else
117+ sudo chown -R root:root "$HOME/.config/composer" || true
118+ fi
126119
127120 # Add local repository
128121 pie repository:add composer http://localhost:8000
@@ -160,7 +153,7 @@ jobs:
160153 if [ -n "$SO_FILE" ]; then
161154 echo "SUCCESS: Shared object built at: $SO_FILE"
162155 ls -la "$SO_FILE"
163- echo "File size: $(stat -c%s "$SO_FILE" 2>/dev/null || echo "unknown") bytes"
156+ echo "File size: $(if [[ "${{ matrix.host.OS }}" == "macos" ]]; then stat -f%z "$SO_FILE" 2>/dev/null; else stat - c%s "$SO_FILE" 2>/dev/null; fi || echo "unknown") bytes"
164157 else
165158 echo "WARNING: PIE reported success but valkey_glide.so not found"
166159 find "$PIE_WORK_DIR" -name "*.so" -type f 2>/dev/null || echo "No .so files found at all"
@@ -237,8 +230,13 @@ jobs:
237230 php --ini
238231
239232 echo "=== Looking for PIE-generated ini files ==="
240- find /etc/php* -name "*valkey*" 2>/dev/null || echo "No valkey ini files found"
241- find /usr/local/etc/php* -name "*valkey*" 2>/dev/null || echo "No valkey ini files in /usr/local"
233+ if [[ "${{ matrix.host.OS }}" == "macos" ]]; then
234+ find /opt/homebrew/etc/php* /usr/local/etc/php* -name "*valkey*" 2>/dev/null || echo "No valkey ini files found"
235+ find /opt/homebrew/etc/php* /usr/local/etc/php* -name "*valkey*" 2>/dev/null || echo "No valkey ini files in /usr/local"
236+ else
237+ find /etc/php* -name "*valkey*" 2>/dev/null || echo "No valkey ini files found"
238+ find /usr/local/etc/php* -name "*valkey*" 2>/dev/null || echo "No valkey ini files in /usr/local"
239+ fi
242240
243241 echo "=== Manually enabling extension ==="
244242 php -d extension=valkey_glide -m | grep -i valkey && echo "Extension works when manually enabled!" || echo "Extension still not working"
@@ -250,7 +248,7 @@ jobs:
250248 uses : ./.github/workflows/run-php-tests
251249 with :
252250 extension-path : valkey_glide
253- php-version : ${{ env.BASE_PHP_VERSION }}
251+ php-version : ${{ matrix.php }}
254252
255253 - name : Cleanup
256254 if : always()
0 commit comments