Skip to content

Commit bc64ed9

Browse files
Upgrade setup-php to speed up PHP tests (#24405)
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 <mkruskal@google.com>
1 parent a532f52 commit bc64ed9

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/test_php.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ jobs:
181181
fail-fast: false # Don't cancel all jobs if one fails.
182182
matrix:
183183
include:
184-
- version: '8.2'
185-
continuous-only: true
186-
- version: '8.3'
184+
- version: 'pre-installed'
187185

188186
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} MacOS PHP ${{ matrix.version }}
189187
# noop
@@ -195,24 +193,16 @@ jobs:
195193
with:
196194
ref: ${{ inputs.safe-checkout }}
197195

198-
- name: Uninstall problematic libgd
199-
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
200-
run: brew uninstall --ignore-dependencies gd
201-
202196
- name: Install dependencies
203197
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
204198
run: brew install coreutils gd
205199

206200
- name: Pin PHP version
207201
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
208-
uses: shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # 2.30.2
202+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # 2.35.5
209203
with:
210204
php-version: ${{ matrix.version }}
211205

212-
- name: Check PHP version
213-
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
214-
run: php --version | grep ${{ matrix.version }} || (echo "Invalid PHP version - $(php --version)" && exit 1)
215-
216206
- name: Setup composer
217207
if: ${{ !matrix.continuous-only || inputs.continuous-run }}
218208
uses: protocolbuffers/protobuf-ci/composer-setup@v4

0 commit comments

Comments
 (0)