cache-extensions 1.13.0 → 1.14.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 +27 -25
- package/package.json +21 -19
- package/src/lists/darwin-extensions +65 -0
- package/src/lists/jammy-libs +4 -3
- package/src/lists/noble-libs +2 -3
- package/src/scripts/cache.sh +9 -2
- package/src/scripts/darwin.sh +40 -8
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
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.
|
|
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.6-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.
|
|
@@ -24,23 +24,24 @@ Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "Gi
|
|
|
24
24
|
|
|
25
25
|
## :tada: PHP Support
|
|
26
26
|
|
|
27
|
-
|PHP Version|Stability|Release Support|
|
|
28
|
-
|
|
29
|
-
|5.3|`Stable`|`End of life`|
|
|
30
|
-
|5.4|`Stable`|`End of life`|
|
|
31
|
-
|5.5|`Stable`|`End of life`|
|
|
32
|
-
|5.6|`Stable`|`End of life`|
|
|
33
|
-
|7.0|`Stable`|`End of life`|
|
|
34
|
-
|7.1|`Stable`|`End of life`|
|
|
35
|
-
|7.2|`Stable`|`End of life`|
|
|
36
|
-
|7.3|`Stable`|`End of life`|
|
|
37
|
-
|7.4|`Stable`|`End of life`|
|
|
38
|
-
|8.0|`Stable`|`End of life`|
|
|
39
|
-
|8.1|`Stable`|`Security fixes only`|
|
|
40
|
-
|8.2|`Stable`|`Security fixes only`|
|
|
41
|
-
|8.3|`Stable`|`Active`|
|
|
42
|
-
|8.4|`Stable`|`Active`|
|
|
43
|
-
|8.5|`
|
|
27
|
+
| PHP Version |Stability|Release Support|
|
|
28
|
+
|-------------|--- |--- |
|
|
29
|
+
| 5.3 |`Stable`|`End of life`|
|
|
30
|
+
| 5.4 |`Stable`|`End of life`|
|
|
31
|
+
| 5.5 |`Stable`|`End of life`|
|
|
32
|
+
| 5.6 |`Stable`|`End of life`|
|
|
33
|
+
| 7.0 |`Stable`|`End of life`|
|
|
34
|
+
| 7.1 |`Stable`|`End of life`|
|
|
35
|
+
| 7.2 |`Stable`|`End of life`|
|
|
36
|
+
| 7.3 |`Stable`|`End of life`|
|
|
37
|
+
| 7.4 |`Stable`|`End of life`|
|
|
38
|
+
| 8.0 |`Stable`|`End of life`|
|
|
39
|
+
| 8.1 |`Stable`|`Security fixes only`|
|
|
40
|
+
| 8.2 |`Stable`|`Security fixes only`|
|
|
41
|
+
| 8.3 |`Stable`|`Active`|
|
|
42
|
+
| 8.4 |`Stable`|`Active`|
|
|
43
|
+
| 8.5 |`Stable`|`Active`|
|
|
44
|
+
| 8.6 |`Nightly`|`In development`|
|
|
44
45
|
|
|
45
46
|
## :cloud: OS/Platform Support
|
|
46
47
|
|
|
@@ -52,10 +53,11 @@ Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "Gi
|
|
|
52
53
|
| Ubuntu 22.04 | aarch64 | `ubuntu-22.04-arm` |
|
|
53
54
|
| Windows Server 2025 | x64 | `windows-2025` |
|
|
54
55
|
| Windows Server 2022 | x64 | `windows-latest` or `windows-2022` |
|
|
55
|
-
|
|
|
56
|
-
| macOS Sequoia 15.x | arm64 | `macos-15`
|
|
57
|
-
| macOS Sonoma 14.x | arm64 | `macos-
|
|
58
|
-
| macOS
|
|
56
|
+
| macOS Tahoe 26.x | arm64 | `macos-26` |
|
|
57
|
+
| macOS Sequoia 15.x | arm64 | `macos-latest` or `macos-15` |
|
|
58
|
+
| macOS Sonoma 14.x | arm64 | `macos-14` |
|
|
59
|
+
| macOS Tahoe 26.x | x86_64 | `macos-26-intel` |
|
|
60
|
+
| macOS Sequoia 15.x | x86_64 | `macos-15-intel` |
|
|
59
61
|
|
|
60
62
|
**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.
|
|
61
63
|
|
|
@@ -68,7 +70,7 @@ Use this GitHub Action when the extensions you are adding in [setup-php](https:/
|
|
|
68
70
|
#### `php-version` (optional)
|
|
69
71
|
|
|
70
72
|
- Specify the PHP version you want to set up.
|
|
71
|
-
- Accepts a `string`. For example `'8.
|
|
73
|
+
- Accepts a `string`. For example `'8.5'`.
|
|
72
74
|
- Accepts `latest` to set up the latest stable PHP version.
|
|
73
75
|
- Accepts `nightly` to set up a nightly build from the master branch of PHP.
|
|
74
76
|
- Accepts the format `d.x`, where `d` is the major version. For example `5.x`, `7.x` and `8.x`.
|
|
@@ -108,14 +110,14 @@ jobs:
|
|
|
108
110
|
strategy:
|
|
109
111
|
matrix:
|
|
110
112
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
111
|
-
php-versions: ['8.
|
|
113
|
+
php-versions: ['8.3', '8.4', '8.5']
|
|
112
114
|
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
|
113
115
|
env:
|
|
114
116
|
extensions: intl, pcov
|
|
115
117
|
key: cache-v1 # can be any string, change to clear the extension cache.
|
|
116
118
|
steps:
|
|
117
119
|
- name: Checkout
|
|
118
|
-
uses: actions/checkout@
|
|
120
|
+
uses: actions/checkout@v5
|
|
119
121
|
|
|
120
122
|
- name: Setup cache environment
|
|
121
123
|
id: extcache
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cache-extensions",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Cache PHP extensions in GitHub Actions",
|
|
6
6
|
"main": "lib/cache.js",
|
|
@@ -35,31 +35,33 @@
|
|
|
35
35
|
"author": "shivammathur",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@actions/cache": "^
|
|
39
|
-
"@actions/core": "^
|
|
40
|
-
"@actions/exec": "^
|
|
41
|
-
"setup-php": "2.
|
|
38
|
+
"@actions/cache": "^5.0.5",
|
|
39
|
+
"@actions/core": "^2.0.3",
|
|
40
|
+
"@actions/exec": "^2.0.0",
|
|
41
|
+
"setup-php": "2.36.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@eslint/compat": "^
|
|
44
|
+
"@eslint/compat": "^2.0.3",
|
|
45
45
|
"@types/jest": "^30.0.0",
|
|
46
|
-
"@types/node": "^
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
48
|
-
"@typescript-eslint/parser": "^8.
|
|
49
|
-
"@vercel/ncc": "^0.38.
|
|
50
|
-
"eslint": "^9.
|
|
46
|
+
"@types/node": "^25.5.0",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
48
|
+
"@typescript-eslint/parser": "^8.57.0",
|
|
49
|
+
"@vercel/ncc": "^0.38.4",
|
|
50
|
+
"eslint": "^9.39.1",
|
|
51
51
|
"eslint-config-prettier": "^10.1.8",
|
|
52
52
|
"eslint-plugin-import": "^2.32.0",
|
|
53
|
-
"eslint-plugin-jest": "^29.0
|
|
54
|
-
"eslint-plugin-prettier": "^5.5.
|
|
55
|
-
"jest": "^30.0
|
|
56
|
-
"jest-circus": "^30.0
|
|
57
|
-
"prettier": "^3.
|
|
58
|
-
"ts-jest": "^29.4.
|
|
59
|
-
"typescript": "^5.9.
|
|
53
|
+
"eslint-plugin-jest": "^29.15.0",
|
|
54
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
55
|
+
"jest": "^30.3.0",
|
|
56
|
+
"jest-circus": "^30.3.0",
|
|
57
|
+
"prettier": "^3.8.1",
|
|
58
|
+
"ts-jest": "^29.4.6",
|
|
59
|
+
"typescript": "^5.9.3"
|
|
60
60
|
},
|
|
61
61
|
"overrides": {
|
|
62
|
-
"test-exclude": "^7.0.1"
|
|
62
|
+
"test-exclude": "^7.0.1",
|
|
63
|
+
"glob": "^13.0.6",
|
|
64
|
+
"undici": "^6.23.0"
|
|
63
65
|
},
|
|
64
66
|
"bugs": {
|
|
65
67
|
"url": "https://github.com/shivammathur/cache-extensions/issues"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
amqp
|
|
2
|
+
apcu
|
|
3
|
+
ast
|
|
4
|
+
brotli
|
|
5
|
+
couchbase
|
|
6
|
+
decimal
|
|
7
|
+
ds
|
|
8
|
+
event
|
|
9
|
+
excimer
|
|
10
|
+
expect
|
|
11
|
+
gearman
|
|
12
|
+
gmagick
|
|
13
|
+
gnupg
|
|
14
|
+
grpc
|
|
15
|
+
igbinary
|
|
16
|
+
imagick
|
|
17
|
+
imap
|
|
18
|
+
interbase
|
|
19
|
+
lua
|
|
20
|
+
mailparse
|
|
21
|
+
maxminddb
|
|
22
|
+
mcrypt
|
|
23
|
+
memcache
|
|
24
|
+
memcached
|
|
25
|
+
mongodb
|
|
26
|
+
mongodb1
|
|
27
|
+
msgpack
|
|
28
|
+
newrelic
|
|
29
|
+
oauth
|
|
30
|
+
opentelemetry
|
|
31
|
+
pcov
|
|
32
|
+
pdo_firebird
|
|
33
|
+
pdo_sqlsrv
|
|
34
|
+
pecl_http
|
|
35
|
+
phalcon3
|
|
36
|
+
phalcon4
|
|
37
|
+
phalcon5
|
|
38
|
+
pinba
|
|
39
|
+
propro
|
|
40
|
+
protobuf
|
|
41
|
+
psr
|
|
42
|
+
raphf
|
|
43
|
+
rdkafka
|
|
44
|
+
redis
|
|
45
|
+
scalar_objects
|
|
46
|
+
seaslog
|
|
47
|
+
snmp
|
|
48
|
+
spx
|
|
49
|
+
sqlsrv
|
|
50
|
+
ssh2
|
|
51
|
+
swoole
|
|
52
|
+
swow
|
|
53
|
+
uopz
|
|
54
|
+
uploadprogress
|
|
55
|
+
uuid
|
|
56
|
+
v8js
|
|
57
|
+
vips
|
|
58
|
+
vld
|
|
59
|
+
xdebug
|
|
60
|
+
xdebug2
|
|
61
|
+
xhprof
|
|
62
|
+
xlswriter
|
|
63
|
+
yaml
|
|
64
|
+
zmq
|
|
65
|
+
zstd
|
package/src/lists/jammy-libs
CHANGED
|
@@ -247,10 +247,8 @@ libinih1
|
|
|
247
247
|
libintl-perl
|
|
248
248
|
libintl-xs-perl
|
|
249
249
|
libio-html-perl
|
|
250
|
-
libio-pty-perl
|
|
251
250
|
libip4tc2
|
|
252
251
|
libip6tc2
|
|
253
|
-
libipc-run-perl
|
|
254
252
|
libisc-export1105
|
|
255
253
|
libisl23
|
|
256
254
|
libisns0
|
|
@@ -303,6 +301,9 @@ liblqr-1-0-dev
|
|
|
303
301
|
liblsan0
|
|
304
302
|
libltdl-dev
|
|
305
303
|
libltdl7
|
|
304
|
+
liblttng-ust-common1
|
|
305
|
+
liblttng-ust-ctl5
|
|
306
|
+
liblttng-ust1
|
|
306
307
|
liblua5.3-0
|
|
307
308
|
liblvm2cmd2.03
|
|
308
309
|
liblwp-mediatypes-perl
|
|
@@ -514,6 +515,7 @@ libnsl2
|
|
|
514
515
|
libnspr4
|
|
515
516
|
libnss-systemd
|
|
516
517
|
libnss3
|
|
518
|
+
libnss3-tools
|
|
517
519
|
libntfs-3g89
|
|
518
520
|
libnuma1
|
|
519
521
|
libobjc-11-dev
|
|
@@ -643,7 +645,6 @@ libssl3
|
|
|
643
645
|
libstdc++-10-dev
|
|
644
646
|
libstdc++-11-dev
|
|
645
647
|
libstdc++-12-dev
|
|
646
|
-
libstdc++-9-dev
|
|
647
648
|
libstdc++6
|
|
648
649
|
libstemmer0d
|
|
649
650
|
libsvn1
|
package/src/lists/noble-libs
CHANGED
|
@@ -209,10 +209,8 @@ libinih1
|
|
|
209
209
|
libintl-perl
|
|
210
210
|
libintl-xs-perl
|
|
211
211
|
libio-html-perl
|
|
212
|
-
libio-pty-perl
|
|
213
212
|
libip4tc2
|
|
214
213
|
libip6tc2
|
|
215
|
-
libipc-run-perl
|
|
216
214
|
libisl23
|
|
217
215
|
libisns0t64
|
|
218
216
|
libitm1
|
|
@@ -248,6 +246,7 @@ libllvm16t64
|
|
|
248
246
|
libllvm17t64
|
|
249
247
|
libllvm18
|
|
250
248
|
libllvm19
|
|
249
|
+
libllvm20
|
|
251
250
|
liblmdb0
|
|
252
251
|
liblocale-gettext-perl
|
|
253
252
|
liblqr-1-0
|
|
@@ -306,6 +305,7 @@ libnpth0t64
|
|
|
306
305
|
libnspr4
|
|
307
306
|
libnss-systemd
|
|
308
307
|
libnss3
|
|
308
|
+
libnss3-tools
|
|
309
309
|
libntfs-3g89t64
|
|
310
310
|
libnuma1
|
|
311
311
|
libnvme1t64
|
|
@@ -470,7 +470,6 @@ libvulkan1
|
|
|
470
470
|
libwayland-client0
|
|
471
471
|
libwayland-cursor0
|
|
472
472
|
libwayland-egl1
|
|
473
|
-
libwayland-server0
|
|
474
473
|
libwbclient0
|
|
475
474
|
libwebp7
|
|
476
475
|
libwebpdemux2
|
package/src/scripts/cache.sh
CHANGED
|
@@ -42,6 +42,8 @@ get_api_version() {
|
|
|
42
42
|
8.1) echo "20210902" ;;
|
|
43
43
|
8.2) echo "20220829" ;;
|
|
44
44
|
8.3) echo "20230831" ;;
|
|
45
|
+
8.4) echo "20240924" ;;
|
|
46
|
+
8.5) echo "20250925" ;;
|
|
45
47
|
*) get_api_version_from_repo ;;
|
|
46
48
|
esac
|
|
47
49
|
}
|
|
@@ -88,7 +90,7 @@ linux_php_semver() {
|
|
|
88
90
|
|
|
89
91
|
data() {
|
|
90
92
|
old_versions="5.[3-5]"
|
|
91
|
-
date='
|
|
93
|
+
date='20260314'
|
|
92
94
|
arch=$(uname -m)
|
|
93
95
|
if [ "$os" = "Linux" ]; then
|
|
94
96
|
. /etc/os-release
|
|
@@ -107,7 +109,12 @@ data() {
|
|
|
107
109
|
os="Windows-$arch"
|
|
108
110
|
dir='C:\\tools\\php\\ext'
|
|
109
111
|
fi
|
|
110
|
-
|
|
112
|
+
[[ ( -z "$ImageOS" && -z "$ImageVersion" ) ||
|
|
113
|
+
( -n "$RUNNER_ENVIRONMENT" && "$RUNNER_ENVIRONMENT" = "self-hosted" ) ||
|
|
114
|
+
-n "$ACT" || -n "$CONTAINER" ]] && _runner=self-hosted || _runner=github
|
|
115
|
+
runner="${runner:-${RUNNER:-$_runner}}"
|
|
116
|
+
job="${GITHUB_REPOSITORY}-${GITHUB_WORKFLOW}"
|
|
117
|
+
[ "$runner" = "github" ] && job="$job-${GITHUB_JOB}"
|
|
111
118
|
if command -v "sha256sum" >/dev/null; then
|
|
112
119
|
key="$(echo -n "$extensions-$key-$job" | sha256sum | cut -d ' ' -f 1)"
|
|
113
120
|
else
|
package/src/scripts/darwin.sh
CHANGED
|
@@ -23,10 +23,40 @@ add_brew_tap() {
|
|
|
23
23
|
fi
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
get_lookup_extension_name() {
|
|
27
|
+
extension=$1
|
|
28
|
+
case "$extension" in
|
|
29
|
+
http) echo "pecl_http" ;;
|
|
30
|
+
*) echo "$extension" ;;
|
|
31
|
+
esac
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get_config_extension_name() {
|
|
35
|
+
extension=$1
|
|
36
|
+
case "$extension" in
|
|
37
|
+
http | pecl_http) echo "http" ;;
|
|
38
|
+
phalcon | phalcon3 | phalcon4 | phalcon5) echo "phalcon" ;;
|
|
39
|
+
redis | phpredis) echo "redis" ;;
|
|
40
|
+
xdebug | xdebug2) echo "xdebug" ;;
|
|
41
|
+
*) echo "$extension" ;;
|
|
42
|
+
esac
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get_formula_name() {
|
|
46
|
+
extension="$(get_lookup_extension_name "$1")"
|
|
47
|
+
case "$extension" in
|
|
48
|
+
redis) echo "phpredis" ;;
|
|
49
|
+
firebird) echo "interbase" ;;
|
|
50
|
+
*) echo "$extension" ;;
|
|
51
|
+
esac
|
|
52
|
+
}
|
|
53
|
+
|
|
26
54
|
get_dependencies() {
|
|
27
55
|
extension=$1
|
|
28
|
-
|
|
29
|
-
|
|
56
|
+
extension_name="$(get_lookup_extension_name "$extension")"
|
|
57
|
+
list_deps="$(grep "^$extension_name=" "${script_dir:?}"/../lists/darwin-deps | cut -d '=' -f 2)"
|
|
58
|
+
formula_name="$(get_formula_name "$extension")"
|
|
59
|
+
formula_file="$tap_dir/$ext_tap/Formula/$formula_name@${version:?}.rb"
|
|
30
60
|
if [ -e "$formula_file" ]; then
|
|
31
61
|
formula_deps="$(grep "depends_on" "$formula_file" | cut -d '"' -f 2 | tr '\n' ' ')"
|
|
32
62
|
formula_deps_from_macos="$(grep "uses_from_macos \"lib" "$formula_file" | cut -d '"' -f 2 | tr '\n' ' ')"
|
|
@@ -42,8 +72,9 @@ filter_extensions() {
|
|
|
42
72
|
extensions_array=("$@")
|
|
43
73
|
filtered_extensions=()
|
|
44
74
|
for ext in "${extensions_array[@]}"; do
|
|
45
|
-
|
|
46
|
-
|
|
75
|
+
extension_name="$(get_lookup_extension_name "$ext")"
|
|
76
|
+
if grep -i -q -w "$extension_name" "${script_dir:?}"/../lists/darwin-extensions ||
|
|
77
|
+
grep -q "^$extension_name=" "${script_dir:?}"/../lists/darwin-deps; then
|
|
47
78
|
filtered_extensions+=("$ext")
|
|
48
79
|
fi
|
|
49
80
|
done
|
|
@@ -67,12 +98,13 @@ setup_extensions_helper() {
|
|
|
67
98
|
}
|
|
68
99
|
|
|
69
100
|
setup_extensions() {
|
|
70
|
-
|
|
101
|
+
requested_extension=$1
|
|
102
|
+
dependent_extension="$(get_config_extension_name "$requested_extension")"
|
|
71
103
|
extension_dir=$2
|
|
72
104
|
shift 2
|
|
73
105
|
dependency_extensions_array=("$@")
|
|
74
|
-
sudo mkdir -p "$cache_directory"/"$
|
|
75
|
-
echo "::group::Logs to set up extensions required for $
|
|
106
|
+
sudo mkdir -p "$cache_directory"/"$dependent_extension"
|
|
107
|
+
echo "::group::Logs to set up extensions required for $requested_extension"
|
|
76
108
|
for dependency_extension in "${dependency_extensions_array[@]}"; do
|
|
77
109
|
setup_extensions_helper "$dependent_extension" "$dependency_extension" "$extension_dir"
|
|
78
110
|
done
|
|
@@ -161,7 +193,7 @@ setup_dependencies() {
|
|
|
161
193
|
extension_dir=$2
|
|
162
194
|
cache_directory=/tmp/extcache
|
|
163
195
|
[[ -z "${extensions// /}" ]] && return
|
|
164
|
-
IFS=' ' read -r -a extensions_array <<<"$(echo "$extensions" | sed -
|
|
196
|
+
IFS=' ' read -r -a extensions_array <<<"$(echo "$extensions" | sed -Ee "s/^|,\s*/ /g")"
|
|
165
197
|
IFS=' ' read -r -a extensions_array <<<"$(filter_extensions "${extensions_array[@]}")"
|
|
166
198
|
if [[ -n "${extensions_array[*]// /}" ]]; then
|
|
167
199
|
add_brew_tap "$php_tap"
|