cache-extensions 1.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <h1 align="center">Cache PHP extensions in GitHub Actions</h1>
2
2
 
3
3
  <p align="center">
4
- <a href="https://github.com/shivammathur/cache-extensions" title="Cache PHP extensions in GitHub Actions"><img alt="GitHub Actions status" src="https://github.com/shivammathur/cache-extensions/workflows/Main%20workflow/badge.svg"></a>
4
+ <a href="https://github.com/shivammathur/cache-extensions" title="Cache PHP extensions in GitHub Actions"><img alt="GitHub Actions status" src="https://github.com/shivammathur/cache-extensions/workflows/Node%20test%20workflow/badge.svg"></a>
5
5
  <a href="https://codecov.io/gh/shivammathur/cache-extensions" title="Code coverage"><img alt="Codecov Code Coverage" src="https://codecov.io/gh/shivammathur/cache-extensions/branch/master/graph/badge.svg"></a>
6
6
  <a href="https://github.com/shivammathur/cache-extensions/blob/master/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555"></a>
7
- <a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.3-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
7
+ <a href="#tada-php-support" title="PHP Versions Supported"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3%20to%208.4-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
8
8
  </p>
9
9
 
10
10
  Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "GitHub Actions"). This action has to be used along with [shivammathur/setup-php](https://github.com/shivammathur/setup-php "Setup PHP") and [actions/cache](https://github.com/actions/cache "Cache in GitHub Actions") GitHub Actions. It configures the environment required to cache PHP extensions. Refer to [Usage](#memo-usage "How to use this") section for details and example workflow.
@@ -45,13 +45,17 @@ Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "Gi
45
45
 
46
46
  | Virtual environment | YAML workflow label |
47
47
  |---------------------|------------------------------------|
48
+ | Ubuntu 24.04 | `ubuntu-24.04` |
48
49
  | Ubuntu 22.04 | `ubuntu-latest` or `ubuntu-22.04` |
49
50
  | Ubuntu 20.04 | `ubuntu-20.04` |
50
51
  | Windows Server 2022 | `windows-latest` or `windows-2022` |
51
52
  | Windows Server 2019 | `windows-2019` |
53
+ | macOS Sonoma 14.x | `macos-14` |
52
54
  | macOS Ventura 13.x | `macos-13` |
53
55
  | macOS Monterey 12.x | `macos-latest` or `macos-12` |
54
56
 
57
+ **Note**: Support for self-hosted runners for the above operating systems is in beta. If you use this action on a self-hosted runner, please report any issues you find.
58
+
55
59
  ## :memo: Usage
56
60
 
57
61
  Use this GitHub Action when the extensions you are adding in [setup-php](https://github.com/shivammathur/setup-php "setup-php GitHub Action") are installed and take a long time to set up. If you are using extensions which have the result `Installed and enabled` in the logs like `pecl` extensions on `Ubuntu` or extensions which have custom support, it is recommended to use this action to cache your extensions.
@@ -108,7 +112,7 @@ jobs:
108
112
  key: cache-v1 # can be any string, change to clear the extension cache.
109
113
  steps:
110
114
  - name: Checkout
111
- uses: actions/checkout@v3
115
+ uses: actions/checkout@v4
112
116
 
113
117
  - name: Setup cache environment
114
118
  id: extcache
@@ -119,7 +123,7 @@ jobs:
119
123
  key: ${{ env.key }}
120
124
 
121
125
  - name: Cache extensions
122
- uses: actions/cache@v3
126
+ uses: actions/cache@v4
123
127
  with:
124
128
  path: ${{ steps.extcache.outputs.dir }}
125
129
  key: ${{ steps.extcache.outputs.key }}
@@ -138,7 +142,7 @@ If you set up both `TS` and `NTS` PHP versions in your workflow, please add `${{
138
142
 
139
143
  ```yaml
140
144
  - name: Cache extensions
141
- uses: actions/cache@v3
145
+ uses: actions/cache@v4
142
146
  with:
143
147
  path: ${{ steps.extcache.outputs.dir }}
144
148
  key: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
@@ -155,10 +159,9 @@ Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "sh
155
159
 
156
160
  ## :sparkling_heart: Support This Project
157
161
 
158
- If this action helped you.
162
+ This project is generously supported by many users and organisations via [GitHub Sponsors](https://github.com/sponsors/shivammathur).
159
163
 
160
- - Please star the project and share it. If you blog, please share your experience of using this action.
161
- - Please support our work by sponsoring using [GitHub sponsors](https://github.com/sponsors/shivammathur).
164
+ <a href="https://github.com/sponsors/shivammathur"><img src="https://setup-php.com/sponsors.svg?" alt="Sponsor shivammathur"></a>
162
165
 
163
166
  ## :package: Dependencies
164
167
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cache-extensions",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "private": false,
5
5
  "description": "Cache PHP extensions in GitHub Actions",
6
6
  "main": "lib/cache.js",
@@ -38,24 +38,24 @@
38
38
  "@actions/cache": "^3.2.4",
39
39
  "@actions/core": "^1.10.1",
40
40
  "@actions/exec": "^1.1.1",
41
- "setup-php": "2.30.5"
41
+ "setup-php": "2.31.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@types/jest": "^29.5.12",
45
- "@types/node": "^20.14.8",
46
- "@typescript-eslint/eslint-plugin": "^7.13.1",
47
- "@typescript-eslint/parser": "^7.13.1",
44
+ "@types/jest": "^29.5.13",
45
+ "@types/node": "^22.5.5",
46
+ "@typescript-eslint/eslint-plugin": "^8.6.0",
47
+ "@typescript-eslint/parser": "^8.6.0",
48
48
  "@vercel/ncc": "^0.38.1",
49
- "eslint": "^8.57.0",
49
+ "eslint": "^8.57.1",
50
50
  "eslint-config-prettier": "^9.1.0",
51
- "eslint-plugin-import": "^2.29.1",
52
- "eslint-plugin-jest": "^28.6.0",
53
- "eslint-plugin-prettier": "^5.1.3",
51
+ "eslint-plugin-import": "^2.30.0",
52
+ "eslint-plugin-jest": "^28.8.3",
53
+ "eslint-plugin-prettier": "^5.2.1",
54
54
  "jest": "^29.7.0",
55
55
  "jest-circus": "^29.7.0",
56
- "prettier": "^3.3.2",
57
- "ts-jest": "^29.1.5",
58
- "typescript": "^5.5.2"
56
+ "prettier": "^3.3.3",
57
+ "ts-jest": "^29.2.5",
58
+ "typescript": "^5.6.2"
59
59
  },
60
60
  "bugs": {
61
61
  "url": "https://github.com/shivammathur/cache-extensions/issues"
@@ -141,6 +141,8 @@ sqlsrv
141
141
  ssh2
142
142
  swoole
143
143
  t
144
+ t
145
+ t
144
146
  u
145
147
  u
146
148
  u
@@ -110,6 +110,8 @@ libdbusmenu-glib4
110
110
  libdbusmenu-gtk3-4
111
111
  libdconf1
112
112
  libdebconfclient0
113
+ libdeflate-dev
114
+ libdeflate0
113
115
  libdevmapper-event1.02.1
114
116
  libdevmapper1.02.1
115
117
  libdjvulibre-dev
@@ -241,6 +243,7 @@ libidn11
241
243
  libidn2-0
242
244
  libilmbase-dev
243
245
  libilmbase24
246
+ libimagequant0
244
247
  libio-html-perl
245
248
  libip4tc2
246
249
  libip6tc2
@@ -549,6 +552,7 @@ libpgm-5.2-0
549
552
  libpipeline1
550
553
  libpixman-1-0
551
554
  libpixman-1-dev
555
+ libpkgconf3
552
556
  libplymouth5
553
557
  libpng-dev
554
558
  libpng16-16
@@ -577,6 +581,7 @@ libqmi-glib5
577
581
  libqmi-proxy
578
582
  libquadmath0
579
583
  librabbitmq4
584
+ libraqm0
580
585
  libre2-5
581
586
  libreadline-dev
582
587
  libreadline5
@@ -666,7 +671,6 @@ libtool
666
671
  libtsan0
667
672
  libtss2-esys0
668
673
  libtypes-serialiser-perl
669
- libu2f-udev
670
674
  libubsan1
671
675
  libuchardet0
672
676
  libucl1
@@ -562,6 +562,7 @@ libpgm-5.3-0
562
562
  libpipeline1
563
563
  libpixman-1-0
564
564
  libpixman-1-dev
565
+ libpkgconf3
565
566
  libplymouth5
566
567
  libpng-dev
567
568
  libpng16-16
@@ -684,7 +685,6 @@ libtss2-tcti-device0
684
685
  libtss2-tcti-mssim0
685
686
  libtss2-tcti-swtpm0
686
687
  libtypes-serialiser-perl
687
- libu2f-udev
688
688
  libubsan1
689
689
  libuchardet0
690
690
  libucl1
@@ -27,7 +27,6 @@ libatspi2.0-0t64
27
27
  libattr1
28
28
  libaudit-common
29
29
  libaudit1
30
- libauthen-sasl-perl
31
30
  libavahi-client3
32
31
  libavahi-common-data
33
32
  libavahi-common3
@@ -52,12 +51,12 @@ libbz2-1.0
52
51
  libc-bin
53
52
  libc-client2007e
54
53
  libc-dev-bin
55
- libc-devtools
56
54
  libc6
57
55
  libc6-dev
58
56
  libc6-i386
59
57
  libcairo-gobject2
60
58
  libcairo2
59
+ libcanberra0t64
61
60
  libcap-ng0
62
61
  libcap2
63
62
  libcap2-bin
@@ -90,10 +89,11 @@ libctf0
90
89
  libcups2t64
91
90
  libcurl3t64-gnutls
92
91
  libcurl4t64
93
- libdata-dump-perl
94
92
  libdatrie1
95
93
  libdb5.3t64
96
94
  libdbus-1-3
95
+ libdbusmenu-glib4
96
+ libdbusmenu-gtk3-4
97
97
  libdconf1
98
98
  libde265-0
99
99
  libdebconfclient0
@@ -113,8 +113,6 @@ libeatmydata1
113
113
  libedit2
114
114
  libefiboot1t64
115
115
  libefivar1t64
116
- libegl-mesa0
117
- libegl1
118
116
  libelf1t64
119
117
  libenchant-2-2
120
118
  libencode-locale-perl
@@ -138,12 +136,7 @@ libffi-dev
138
136
  libffi8
139
137
  libfftw3-double3
140
138
  libfido2-1
141
- libfile-basedir-perl
142
- libfile-desktopentry-perl
143
- libfile-listing-perl
144
- libfile-mimeinfo-perl
145
139
  libflashrom1
146
- libfont-afm-perl
147
140
  libfontconfig1
148
141
  libfontenc1
149
142
  libfreetype6
@@ -163,7 +156,6 @@ libgd3
163
156
  libgdbm-compat4t64
164
157
  libgdbm6t64
165
158
  libgdk-pixbuf-2.0-0
166
- libgdk-pixbuf2.0-bin
167
159
  libgdk-pixbuf2.0-common
168
160
  libgfortran-12-dev
169
161
  libgfortran-13-dev
@@ -173,7 +165,6 @@ libgirepository-1.0-1
173
165
  libgl1
174
166
  libgl1-mesa-dri
175
167
  libglapi-mesa
176
- libgles2
177
168
  libglib2.0-0t64
178
169
  libglib2.0-bin
179
170
  libglib2.0-data
@@ -194,7 +185,6 @@ libgraphite2-3
194
185
  libgssapi-krb5-2
195
186
  libgstreamer1.0-0
196
187
  libgtk-3-0t64
197
- libgtk-3-bin
198
188
  libgtk-3-common
199
189
  libgudev-1.0-0
200
190
  libgusb2
@@ -202,21 +192,14 @@ libharfbuzz0b
202
192
  libhashkit2t64
203
193
  libhavege2
204
194
  libheif-plugin-aomdec
205
- libheif-plugin-aomenc
206
195
  libheif-plugin-libde265
207
196
  libheif1
208
197
  libhogweed6t64
209
- libhtml-form-perl
210
- libhtml-format-perl
211
198
  libhtml-parser-perl
212
199
  libhtml-tagset-perl
213
200
  libhtml-template-perl
214
- libhtml-tree-perl
215
- libhttp-cookies-perl
216
- libhttp-daemon-perl
217
201
  libhttp-date-perl
218
202
  libhttp-message-perl
219
- libhttp-negotiate-perl
220
203
  libhunspell-1.7-0
221
204
  libhwasan0
222
205
  libibverbs1
@@ -229,11 +212,8 @@ libinih1
229
212
  libintl-perl
230
213
  libintl-xs-perl
231
214
  libio-html-perl
232
- libio-socket-ssl-perl
233
- libio-stringy-perl
234
215
  libip4tc2
235
216
  libip6tc2
236
- libipc-system-simple-perl
237
217
  libisl23
238
218
  libisns0t64
239
219
  libitm1
@@ -280,7 +260,6 @@ liblua5.3-0
280
260
  liblua5.4-0
281
261
  liblvm2cmd2.03
282
262
  liblwp-mediatypes-perl
283
- liblwp-protocol-https-perl
284
263
  liblz4-1
285
264
  liblz4-dev
286
265
  liblzma5
@@ -289,7 +268,6 @@ libmagic-mgc
289
268
  libmagic1t64
290
269
  libmagickcore-6.q16-7t64
291
270
  libmagickwand-6.q16-7t64
292
- libmailtools-perl
293
271
  libmaxminddb0
294
272
  libmbim-glib4
295
273
  libmbim-proxy
@@ -312,10 +290,6 @@ libmysqlclient21
312
290
  libncurses-dev
313
291
  libncurses6
314
292
  libncursesw6
315
- libnet-dbus-perl
316
- libnet-http-perl
317
- libnet-smtp-ssl-perl
318
- libnet-ssleay-perl
319
293
  libnetfilter-conntrack3
320
294
  libnetplan1
321
295
  libnettle8t64
@@ -338,6 +312,7 @@ libnvme1t64
338
312
  libobjc-13-dev
339
313
  libobjc4
340
314
  libodbc2
315
+ libogg0
341
316
  libonig5
342
317
  libopeniscsiusr
343
318
  libopenjp2-7
@@ -400,8 +375,6 @@ librpm9t64
400
375
  librpmbuild9t64
401
376
  librpmio9t64
402
377
  librpmsign9t64
403
- librsvg2-2
404
- librsvg2-common
405
378
  librtmp1
406
379
  libruby
407
380
  libruby3.2
@@ -446,6 +419,7 @@ libsystemd0
446
419
  libtalloc2
447
420
  libtasn1-6
448
421
  libtcl8.6
422
+ libtdb1
449
423
  libterm-readkey-perl
450
424
  libtext-charwidth-perl
451
425
  libtext-iconv-perl
@@ -454,7 +428,6 @@ libtext-wrapi18n-perl
454
428
  libthai-data
455
429
  libthai0
456
430
  libtidy5deb1
457
- libtie-ixhash-perl
458
431
  libtiff6
459
432
  libtimedate-perl
460
433
  libtinfo6
@@ -467,7 +440,6 @@ libtool
467
440
  libtraceevent1
468
441
  libtraceevent1-plugin
469
442
  libtracefs1
470
- libtry-tiny-perl
471
443
  libtsan2
472
444
  libtss2-esys-3.0.2-0t64
473
445
  libtss2-mu-4.0.1-0t64
@@ -478,7 +450,6 @@ libtss2-tcti-device0t64
478
450
  libtss2-tcti-mssim0t64
479
451
  libtss2-tcti-swtpm0t64
480
452
  libtypes-serialiser-perl
481
- libu2f-udev
482
453
  libubsan1
483
454
  libuchardet0
484
455
  libudev1
@@ -492,6 +463,8 @@ libutempter0
492
463
  libuuid1
493
464
  libuv1t64
494
465
  libvolume-key1
466
+ libvorbis0a
467
+ libvorbisfile3
495
468
  libvulkan1
496
469
  libwayland-client0
497
470
  libwayland-cursor0
@@ -502,11 +475,8 @@ libwebp7
502
475
  libwebpdemux2
503
476
  libwebpmux3
504
477
  libwrap0
505
- libwww-perl
506
- libwww-robotrules-perl
507
478
  libx11-6
508
479
  libx11-data
509
- libx11-protocol-perl
510
480
  libx11-xcb1
511
481
  libxau6
512
482
  libxaw7
@@ -516,7 +486,6 @@ libxcb-glx0
516
486
  libxcb-present0
517
487
  libxcb-randr0
518
488
  libxcb-render0
519
- libxcb-shape0
520
489
  libxcb-shm0
521
490
  libxcb-sync1
522
491
  libxcb-xfixes0
@@ -535,11 +504,8 @@ libxkbcommon0
535
504
  libxkbfile1
536
505
  libxml-libxml-perl
537
506
  libxml-namespacesupport-perl
538
- libxml-parser-perl
539
507
  libxml-sax-base-perl
540
508
  libxml-sax-perl
541
- libxml-twig-perl
542
- libxml-xpathengine-perl
543
509
  libxml2
544
510
  libxml2-dev
545
511
  libxmlb2
@@ -556,8 +522,6 @@ libxss1
556
522
  libxt6t64
557
523
  libxtables12
558
524
  libxtst6
559
- libxv1
560
- libxxf86dga1
561
525
  libxxf86vm1
562
526
  libxxhash0
563
527
  libyajl2
@@ -79,6 +79,13 @@ extension_dir_linux() {
79
79
  fi
80
80
  }
81
81
 
82
+ linux_php_semver() {
83
+ local php_config=/usr/bin/php-config"${version:?}"
84
+ if [ -e "$php_config" ]; then
85
+ grep -Eo 'version="[0-9]+(\.[0-9]+){2}((-?[a-zA-Z]+([0-9]+)?)?){2}' "$php_config" | cut -d '"' -f 2
86
+ fi
87
+ }
88
+
82
89
  data() {
83
90
  old_versions="5.[3-5]"
84
91
  date='20240716'
@@ -87,6 +94,7 @@ data() {
87
94
  . /etc/os-release
88
95
  os=$os-$VERSION_CODENAME-$arch
89
96
  api_version=$(get_api_version)
97
+ key="$key$(linux_php_semver)"
90
98
  dir=$(extension_dir_linux "$api_version")
91
99
  sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
92
100
  elif [ "$os" = "Darwin" ]; then
@@ -111,6 +111,8 @@ setup_libraries() {
111
111
  if [[ "$libraries" = *libgd* ]]; then
112
112
  check_package 'libavif[0-9]*$' && libraries="$libraries libavif[0-9]*$"
113
113
  check_package 'libheif[0-9]*$' && libraries="$libraries libheif[0-9]*$"
114
+ check_package 'libraqm[0-9]*$' && libraries="$libraries libraqm[0-9]*$"
115
+ check_package 'libraqm[0-9]*$' && libraries="$libraries libimagequant[0-9]*$"
114
116
  fi
115
117
  if [[ -n "${libraries// /}" ]]; then
116
118
  step_log "Setup libraries"