Skip to content

Commit 0f2128f

Browse files
Upgrade setup-php to speed up PHP tests (#24408)
This build has become a severe bottleneck in our CI. To avoid this in the future, always use whatever pre-install version is on the mac runners. The linux tests will cover specific versions of PHP still. PiperOrigin-RevId: 818864695 Co-authored-by: Mike Kruskal <[email protected]>
1 parent 9822fb5 commit 0f2128f

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/test_php.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,27 @@ jobs:
150150
strategy:
151151
fail-fast: false # Don't cancel all jobs if one fails.
152152
matrix:
153-
version: ['8.2']
154-
name: MacOS PHP ${{ matrix.version }}
153+
include:
154+
- version: 'pre-installed'
155+
156+
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} MacOS PHP ${{ matrix.version }}
157+
# noop
155158
runs-on: macos-13
156159
steps:
157160
- name: Checkout pending changes
158161
uses: protocolbuffers/protobuf-ci/checkout@v2
159162
with:
160163
ref: ${{ inputs.safe-checkout }}
161164

162-
- name: Uninstall problematic libgd
163-
run: brew uninstall --ignore-dependencies gd
164-
165165
- name: Install dependencies
166166
run: brew install coreutils gd
167167

168168
- name: Pin PHP version
169-
uses: shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # 2.30.2
169+
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
170+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
170171
with:
171172
php-version: ${{ matrix.version }}
172173

173-
- name: Check PHP version
174-
run: php --version | grep ${{ matrix.version }} || (echo "Invalid PHP version - $(php --version)" && exit 1)
175-
176174
- name: Setup composer
177175
uses: protocolbuffers/protobuf-ci/composer-setup@v2
178176
with:

0 commit comments

Comments
 (0)