cache-extensions 1.12.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 +41 -30
- package/package.json +26 -21
- package/src/lists/darwin-extensions +32 -1
- package/src/lists/focal-libs +0 -3
- package/src/lists/jammy-libs +5 -4
- package/src/lists/noble-libs +5 -7
- 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,35 +24,40 @@ 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`|`
|
|
41
|
-
|8.3|`Stable`|`Active`|
|
|
42
|
-
|8.4|`
|
|
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`|
|
|
43
45
|
|
|
44
46
|
## :cloud: OS/Platform Support
|
|
45
47
|
|
|
46
|
-
| Virtual environment | YAML workflow label |
|
|
47
|
-
|
|
48
|
-
| Ubuntu 24.04 | `ubuntu-24.04`
|
|
49
|
-
| Ubuntu 22.04 |
|
|
50
|
-
| Ubuntu
|
|
51
|
-
|
|
|
52
|
-
| Windows Server
|
|
53
|
-
|
|
|
54
|
-
| macOS
|
|
55
|
-
| macOS
|
|
48
|
+
| Virtual environment | Arch | YAML workflow label |
|
|
49
|
+
|---------------------|---------|------------------------------------|
|
|
50
|
+
| Ubuntu 24.04 | x86_64 | `ubuntu-latest` or `ubuntu-24.04` |
|
|
51
|
+
| Ubuntu 22.04 | x86_64 | `ubuntu-22.04` |
|
|
52
|
+
| Ubuntu 24.04 | aarch64 | `ubuntu-24.04-arm` |
|
|
53
|
+
| Ubuntu 22.04 | aarch64 | `ubuntu-22.04-arm` |
|
|
54
|
+
| Windows Server 2025 | x64 | `windows-2025` |
|
|
55
|
+
| Windows Server 2022 | x64 | `windows-latest` or `windows-2022` |
|
|
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` |
|
|
56
61
|
|
|
57
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.
|
|
58
63
|
|
|
@@ -65,7 +70,7 @@ Use this GitHub Action when the extensions you are adding in [setup-php](https:/
|
|
|
65
70
|
#### `php-version` (optional)
|
|
66
71
|
|
|
67
72
|
- Specify the PHP version you want to set up.
|
|
68
|
-
- Accepts a `string`. For example `'8.
|
|
73
|
+
- Accepts a `string`. For example `'8.5'`.
|
|
69
74
|
- Accepts `latest` to set up the latest stable PHP version.
|
|
70
75
|
- Accepts `nightly` to set up a nightly build from the master branch of PHP.
|
|
71
76
|
- Accepts the format `d.x`, where `d` is the major version. For example `5.x`, `7.x` and `8.x`.
|
|
@@ -105,14 +110,14 @@ jobs:
|
|
|
105
110
|
strategy:
|
|
106
111
|
matrix:
|
|
107
112
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
108
|
-
php-versions: ['8.
|
|
113
|
+
php-versions: ['8.3', '8.4', '8.5']
|
|
109
114
|
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
|
110
115
|
env:
|
|
111
116
|
extensions: intl, pcov
|
|
112
117
|
key: cache-v1 # can be any string, change to clear the extension cache.
|
|
113
118
|
steps:
|
|
114
119
|
- name: Checkout
|
|
115
|
-
uses: actions/checkout@
|
|
120
|
+
uses: actions/checkout@v5
|
|
116
121
|
|
|
117
122
|
- name: Setup cache environment
|
|
118
123
|
id: extcache
|
|
@@ -149,6 +154,12 @@ If you set up both `TS` and `NTS` PHP versions in your workflow, please add `${{
|
|
|
149
154
|
restore-keys: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
|
|
150
155
|
```
|
|
151
156
|
|
|
157
|
+
## :bookmark: Versioning
|
|
158
|
+
|
|
159
|
+
- You can use the `v1` tag as `cache-extensions` version. It is a rolling tag and is synced with the latest minor and patch releases. With `v1` you automatically get the bug fixes, security patches, new features and support for latest PHP releases.
|
|
160
|
+
- Semantic release versions can also be used. They are also rolling tags till there is a new release as we update the lists of packages installed on GitHub runners. It is recommended to [use dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot "Setup Dependabot with GitHub Actions") with semantic versioning to keep the actions in your workflows up to date.
|
|
161
|
+
- Commit SHA can also be used, but it is not recommended to update them manually, please set up tooling like `dependabot` to update them with each release of the action.
|
|
162
|
+
|
|
152
163
|
## :scroll: License
|
|
153
164
|
|
|
154
165
|
The code and documentation in this project are under the [MIT License](LICENSE "License for shivammathur/cache-extensions"). This project has multiple [dependencies](https://github.com/shivammathur/cache-extensions/network/dependencies "Dependencies for this PHP Action"). Their licenses can be found in their respective repositories.
|
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,28 +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": "^
|
|
45
|
-
"@types/jest": "^
|
|
46
|
-
"@types/node": "^
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
48
|
-
"@typescript-eslint/parser": "^8.
|
|
49
|
-
"@vercel/ncc": "^0.38.
|
|
50
|
-
"eslint": "^9.
|
|
51
|
-
"eslint-config-prettier": "^
|
|
52
|
-
"eslint-plugin-import": "^2.
|
|
53
|
-
"eslint-plugin-jest": "^
|
|
54
|
-
"eslint-plugin-prettier": "^5.
|
|
55
|
-
"jest": "^
|
|
56
|
-
"jest-circus": "^
|
|
57
|
-
"prettier": "^3.
|
|
58
|
-
"ts-jest": "^29.
|
|
59
|
-
"typescript": "^5.
|
|
44
|
+
"@eslint/compat": "^2.0.3",
|
|
45
|
+
"@types/jest": "^30.0.0",
|
|
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
|
+
"eslint-config-prettier": "^10.1.8",
|
|
52
|
+
"eslint-plugin-import": "^2.32.0",
|
|
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
|
+
},
|
|
61
|
+
"overrides": {
|
|
62
|
+
"test-exclude": "^7.0.1",
|
|
63
|
+
"glob": "^13.0.6",
|
|
64
|
+
"undici": "^6.23.0"
|
|
60
65
|
},
|
|
61
66
|
"bugs": {
|
|
62
67
|
"url": "https://github.com/shivammathur/cache-extensions/issues"
|
|
@@ -1,34 +1,65 @@
|
|
|
1
1
|
amqp
|
|
2
|
+
apcu
|
|
3
|
+
ast
|
|
4
|
+
brotli
|
|
2
5
|
couchbase
|
|
3
|
-
|
|
6
|
+
decimal
|
|
7
|
+
ds
|
|
4
8
|
event
|
|
9
|
+
excimer
|
|
5
10
|
expect
|
|
6
11
|
gearman
|
|
12
|
+
gmagick
|
|
7
13
|
gnupg
|
|
8
14
|
grpc
|
|
15
|
+
igbinary
|
|
9
16
|
imagick
|
|
10
17
|
imap
|
|
18
|
+
interbase
|
|
11
19
|
lua
|
|
20
|
+
mailparse
|
|
21
|
+
maxminddb
|
|
12
22
|
mcrypt
|
|
13
23
|
memcache
|
|
14
24
|
memcached
|
|
15
25
|
mongodb
|
|
26
|
+
mongodb1
|
|
27
|
+
msgpack
|
|
16
28
|
newrelic
|
|
29
|
+
oauth
|
|
30
|
+
opentelemetry
|
|
31
|
+
pcov
|
|
32
|
+
pdo_firebird
|
|
17
33
|
pdo_sqlsrv
|
|
18
34
|
pecl_http
|
|
19
35
|
phalcon3
|
|
20
36
|
phalcon4
|
|
21
37
|
phalcon5
|
|
38
|
+
pinba
|
|
39
|
+
propro
|
|
40
|
+
protobuf
|
|
22
41
|
psr
|
|
42
|
+
raphf
|
|
23
43
|
rdkafka
|
|
24
44
|
redis
|
|
45
|
+
scalar_objects
|
|
46
|
+
seaslog
|
|
25
47
|
snmp
|
|
48
|
+
spx
|
|
26
49
|
sqlsrv
|
|
27
50
|
ssh2
|
|
28
51
|
swoole
|
|
52
|
+
swow
|
|
53
|
+
uopz
|
|
54
|
+
uploadprogress
|
|
29
55
|
uuid
|
|
30
56
|
v8js
|
|
31
57
|
vips
|
|
58
|
+
vld
|
|
59
|
+
xdebug
|
|
60
|
+
xdebug2
|
|
61
|
+
xhprof
|
|
62
|
+
xlswriter
|
|
32
63
|
yaml
|
|
33
64
|
zmq
|
|
34
65
|
zstd
|
package/src/lists/focal-libs
CHANGED
|
@@ -503,7 +503,6 @@ libnginx-mod-mail
|
|
|
503
503
|
libnginx-mod-stream
|
|
504
504
|
libnl-3-200
|
|
505
505
|
libnorm1
|
|
506
|
-
libnotify4
|
|
507
506
|
libnpth0
|
|
508
507
|
libnspr4
|
|
509
508
|
libnss-systemd
|
|
@@ -703,8 +702,6 @@ libwind0-heimdal
|
|
|
703
702
|
libwmf-dev
|
|
704
703
|
libwmf0.2-7
|
|
705
704
|
libwrap0
|
|
706
|
-
libwxbase3.0-0v5
|
|
707
|
-
libwxgtk3.0-gtk3-0v5
|
|
708
705
|
libx11-6
|
|
709
706
|
libx11-data
|
|
710
707
|
libx11-dev
|
package/src/lists/jammy-libs
CHANGED
|
@@ -80,7 +80,6 @@ libcbor0.8
|
|
|
80
80
|
libcc1-0
|
|
81
81
|
libcgi-fast-perl
|
|
82
82
|
libcgi-pm-perl
|
|
83
|
-
libcgroup1
|
|
84
83
|
libclang-common-13-dev
|
|
85
84
|
libclang-common-14-dev
|
|
86
85
|
libclang-common-15-dev
|
|
@@ -248,10 +247,8 @@ libinih1
|
|
|
248
247
|
libintl-perl
|
|
249
248
|
libintl-xs-perl
|
|
250
249
|
libio-html-perl
|
|
251
|
-
libio-pty-perl
|
|
252
250
|
libip4tc2
|
|
253
251
|
libip6tc2
|
|
254
|
-
libipc-run-perl
|
|
255
252
|
libisc-export1105
|
|
256
253
|
libisl23
|
|
257
254
|
libisns0
|
|
@@ -304,6 +301,9 @@ liblqr-1-0-dev
|
|
|
304
301
|
liblsan0
|
|
305
302
|
libltdl-dev
|
|
306
303
|
libltdl7
|
|
304
|
+
liblttng-ust-common1
|
|
305
|
+
liblttng-ust-ctl5
|
|
306
|
+
liblttng-ust1
|
|
307
307
|
liblua5.3-0
|
|
308
308
|
liblvm2cmd2.03
|
|
309
309
|
liblwp-mediatypes-perl
|
|
@@ -515,6 +515,7 @@ libnsl2
|
|
|
515
515
|
libnspr4
|
|
516
516
|
libnss-systemd
|
|
517
517
|
libnss3
|
|
518
|
+
libnss3-tools
|
|
518
519
|
libntfs-3g89
|
|
519
520
|
libnuma1
|
|
520
521
|
libobjc-11-dev
|
|
@@ -644,7 +645,6 @@ libssl3
|
|
|
644
645
|
libstdc++-10-dev
|
|
645
646
|
libstdc++-11-dev
|
|
646
647
|
libstdc++-12-dev
|
|
647
|
-
libstdc++-9-dev
|
|
648
648
|
libstdc++6
|
|
649
649
|
libstemmer0d
|
|
650
650
|
libsvn1
|
|
@@ -676,6 +676,7 @@ libtirpc3
|
|
|
676
676
|
libtk8.6
|
|
677
677
|
libtommath1
|
|
678
678
|
libtool
|
|
679
|
+
libtraceevent1
|
|
679
680
|
libtsan0
|
|
680
681
|
libtsan2
|
|
681
682
|
libtss2-esys-3.0.2-0
|
package/src/lists/noble-libs
CHANGED
|
@@ -104,8 +104,6 @@ libdpkg-perl
|
|
|
104
104
|
libdrm-amdgpu1
|
|
105
105
|
libdrm-common
|
|
106
106
|
libdrm-intel1
|
|
107
|
-
libdrm-nouveau2
|
|
108
|
-
libdrm-radeon1
|
|
109
107
|
libdrm2
|
|
110
108
|
libduktape207
|
|
111
109
|
libdw1t64
|
|
@@ -164,7 +162,6 @@ libgfortran5
|
|
|
164
162
|
libgirepository-1.0-1
|
|
165
163
|
libgl1
|
|
166
164
|
libgl1-mesa-dri
|
|
167
|
-
libglapi-mesa
|
|
168
165
|
libglib2.0-0t64
|
|
169
166
|
libglib2.0-bin
|
|
170
167
|
libglib2.0-data
|
|
@@ -205,16 +202,15 @@ libhwasan0
|
|
|
205
202
|
libibverbs1
|
|
206
203
|
libice6
|
|
207
204
|
libicu-dev
|
|
205
|
+
libicu70
|
|
208
206
|
libicu74
|
|
209
207
|
libidn2-0
|
|
210
208
|
libinih1
|
|
211
209
|
libintl-perl
|
|
212
210
|
libintl-xs-perl
|
|
213
211
|
libio-html-perl
|
|
214
|
-
libio-pty-perl
|
|
215
212
|
libip4tc2
|
|
216
213
|
libip6tc2
|
|
217
|
-
libipc-run-perl
|
|
218
214
|
libisl23
|
|
219
215
|
libisns0t64
|
|
220
216
|
libitm1
|
|
@@ -249,6 +245,8 @@ liblldb-18
|
|
|
249
245
|
libllvm16t64
|
|
250
246
|
libllvm17t64
|
|
251
247
|
libllvm18
|
|
248
|
+
libllvm19
|
|
249
|
+
libllvm20
|
|
252
250
|
liblmdb0
|
|
253
251
|
liblocale-gettext-perl
|
|
254
252
|
liblqr-1-0
|
|
@@ -307,6 +305,7 @@ libnpth0t64
|
|
|
307
305
|
libnspr4
|
|
308
306
|
libnss-systemd
|
|
309
307
|
libnss3
|
|
308
|
+
libnss3-tools
|
|
310
309
|
libntfs-3g89t64
|
|
311
310
|
libnuma1
|
|
312
311
|
libnvme1t64
|
|
@@ -403,6 +402,7 @@ libsnmp40t64
|
|
|
403
402
|
libsodium23
|
|
404
403
|
libsort-naturally-perl
|
|
405
404
|
libsqlite3-0
|
|
405
|
+
libsqlite3-dev
|
|
406
406
|
libss2
|
|
407
407
|
libssh-4
|
|
408
408
|
libssh2-1t64
|
|
@@ -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
|
|
@@ -481,7 +480,6 @@ libx11-data
|
|
|
481
480
|
libx11-xcb1
|
|
482
481
|
libxau6
|
|
483
482
|
libxaw7
|
|
484
|
-
libxcb-dri2-0
|
|
485
483
|
libxcb-dri3-0
|
|
486
484
|
libxcb-glx0
|
|
487
485
|
libxcb-present0
|
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"
|