Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8177cca56 | ||
|
|
15d69f21b8 | ||
|
|
e13a77655f | ||
|
|
680ac6a4c1 | ||
|
|
b433d435c1 | ||
|
|
d6a8ec7cfb | ||
|
|
41dbe75153 | ||
|
|
dafd61109e | ||
|
|
581f023de0 | ||
|
|
56ea88f536 | ||
|
|
1970264699 | ||
|
|
e119b54661 | ||
|
|
efbaf97d0a | ||
|
|
a8ecef19ac | ||
|
|
bb222c3f18 | ||
|
|
aedfae77ea | ||
|
|
ad807e7d2c | ||
|
|
38fa3d98ee | ||
|
|
861c58f080 | ||
|
|
2ac4a0798e | ||
|
|
021b07a2b2 | ||
|
|
dc54f0353a | ||
|
|
fd65aac1a3 | ||
|
|
1dd1fede85 | ||
|
|
f453437052 | ||
|
|
813b6608e7 | ||
|
|
10843c9071 | ||
|
|
db6bf65bd9 | ||
|
|
d33ccd80be | ||
|
|
46aa274405 | ||
|
|
9e9ad0fe5f | ||
|
|
f23390933a | ||
|
|
c64a1a91b0 | ||
|
|
7e3a83aacd | ||
|
|
c157badb12 | ||
|
|
b47f0a89fb | ||
|
|
58311d5340 | ||
|
|
55034917ed | ||
|
|
114c7bf40c | ||
|
|
567dc865bb |
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -13,13 +13,13 @@ jobs:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
config-file: ./.github/codeql/codeql-configuration.yml
|
||||
languages: javascript
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
8
.github/workflows/git-release.yml
vendored
8
.github/workflows/git-release.yml
vendored
@@ -10,14 +10,14 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04, ubuntu-20.04, ubuntu-18.04]
|
||||
os: [ubuntu-22.04, ubuntu-20.04]
|
||||
steps:
|
||||
- name: Update lists
|
||||
run: |
|
||||
. /etc/os-release
|
||||
dpkg -l | awk '($1 == "ii") && ($2 ~ /^lib|lib$/) { print $2 }' | sed 's/:amd64//' > /tmp/"$VERSION_CODENAME"-libs
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: lists
|
||||
path: |
|
||||
@@ -34,10 +34,12 @@ jobs:
|
||||
ref: develop
|
||||
fetch-depth: 0
|
||||
- name: Download lists
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: lists
|
||||
path: src/lists
|
||||
- name: Add brew to PATH
|
||||
run: echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
|
||||
- name: Update darwin extensions list
|
||||
run: |
|
||||
brew tap shivammathur/extensions
|
||||
|
||||
12
.github/workflows/node-release.yml
vendored
12
.github/workflows/node-release.yml
vendored
@@ -17,14 +17,6 @@ jobs:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@v1
|
||||
with:
|
||||
allowed-endpoints:
|
||||
github.com:443
|
||||
npm.pkg.github.com:443
|
||||
registry.npmjs.org:443
|
||||
|
||||
- name: Checkout release
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
uses: actions/checkout@v3
|
||||
@@ -36,7 +28,7 @@ jobs:
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
registry-url: https://registry.npmjs.org
|
||||
@@ -54,7 +46,7 @@ jobs:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Change to GitHub Packages registry
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: https://npm.pkg.github.com
|
||||
scope: '@shivammathur'
|
||||
|
||||
4
.github/workflows/node-test.yml
vendored
4
.github/workflows/node-test.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Setup Node.js 16.x
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
run: npm audit
|
||||
|
||||
- name: Send Coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
files: coverage/lcov.info
|
||||
|
||||
4
LICENSE
4
LICENSE
@@ -1,7 +1,7 @@
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020-2022 shivammathur and contributors
|
||||
Copyright (c) 2020-2023 shivammathur and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -19,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE.
|
||||
|
||||
17
README.md
17
README.md
@@ -4,7 +4,7 @@
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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.2-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
|
||||
<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>
|
||||
</p>
|
||||
|
||||
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.
|
||||
@@ -37,7 +37,8 @@ Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "Gi
|
||||
|7.4|`Stable`|`Security fixes only`|
|
||||
|8.0|`Stable`|`Active`|
|
||||
|8.1|`Stable`|`Active`|
|
||||
|8.2|`Nightly`|`In development`|
|
||||
|8.2|`Stable`|`Active`|
|
||||
|8.3|`Nightly`|`In development`|
|
||||
|
||||
## :cloud: OS/Platform Support
|
||||
|
||||
@@ -45,12 +46,10 @@ Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "Gi
|
||||
|----------------------|------------------------------------|
|
||||
| Ubuntu 22.04 | `ubuntu-22.04` |
|
||||
| Ubuntu 20.04 | `ubuntu-latest` or `ubuntu-20.04` |
|
||||
| Ubuntu 18.04 | `ubuntu-18.04` |
|
||||
| Windows Server 2022 | `windows-2022` |
|
||||
| Windows Server 2019 | `windows-latest` or `windows-2019` |
|
||||
| macOS Big Sur 12.x | `macOS-12` |
|
||||
| macOS Big Sur 11.x | `macos-latest` or `macOS-11` |
|
||||
| macOS Catalina 10.15 | `macOS-10.15` |
|
||||
|
||||
## :memo: Usage
|
||||
|
||||
@@ -61,7 +60,7 @@ Use this GitHub Action when the extensions you are adding in [setup-php](https:/
|
||||
#### `php-version` (required)
|
||||
|
||||
- Specify the PHP version you want to set up.
|
||||
- Accepts a `string`. For example `'8.1'`.
|
||||
- Accepts a `string`. For example `'8.2'`.
|
||||
- Accepts `latest` to set up the latest stable PHP version.
|
||||
- Accepts `nightly` to set up a nightly build from the master branch of PHP.
|
||||
- Accepts the format `d.x`, where `d` is the major version. For example `5.x`, `7.x` and `8.x`.
|
||||
@@ -92,7 +91,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||
php-versions: ['7.4', '8.0', '8.1']
|
||||
php-versions: ['7.4', '8.0', '8.1', '8.2']
|
||||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
||||
env:
|
||||
extensions: intl, pcov
|
||||
@@ -110,7 +109,7 @@ jobs:
|
||||
key: ${{ env.key }}
|
||||
|
||||
- name: Cache extensions
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.extcache.outputs.dir }}
|
||||
key: ${{ steps.extcache.outputs.key }}
|
||||
@@ -125,11 +124,11 @@ jobs:
|
||||
|
||||
### Thread Safe Setup
|
||||
|
||||
If you set up both `TS` and `NTS` PHP versions on `Windows` in your workflow, please add `${{ env.phpts }}` to `key` and `restore-keys` inputs in `actions/cache` step in the above workflow to avoid a conflicting cache.
|
||||
If you set up both `TS` and `NTS` PHP versions on `Ubuntu` or `Windows` in your workflow, please add `${{ env.phpts }}` to `key` and `restore-keys` inputs in `actions/cache` step in the above workflow to avoid a conflicting cache.
|
||||
|
||||
```yaml
|
||||
- name: Cache extensions
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.extcache.outputs.dir }}
|
||||
key: ${{ steps.extcache.outputs.key }}-${{ env.phpts }}
|
||||
|
||||
57
dist/index.js
vendored
57
dist/index.js
vendored
@@ -1570,7 +1570,6 @@ const file_command_1 = __nccwpck_require__(717);
|
||||
const utils_1 = __nccwpck_require__(5278);
|
||||
const os = __importStar(__nccwpck_require__(2037));
|
||||
const path = __importStar(__nccwpck_require__(1017));
|
||||
const uuid_1 = __nccwpck_require__(8974);
|
||||
const oidc_utils_1 = __nccwpck_require__(8041);
|
||||
/**
|
||||
* The code to exit an action
|
||||
@@ -1600,20 +1599,9 @@ function exportVariable(name, val) {
|
||||
process.env[name] = convertedVal;
|
||||
const filePath = process.env['GITHUB_ENV'] || '';
|
||||
if (filePath) {
|
||||
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
|
||||
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
|
||||
if (name.includes(delimiter)) {
|
||||
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
|
||||
}
|
||||
if (convertedVal.includes(delimiter)) {
|
||||
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
||||
}
|
||||
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
|
||||
file_command_1.issueCommand('ENV', commandValue);
|
||||
}
|
||||
else {
|
||||
command_1.issueCommand('set-env', { name }, convertedVal);
|
||||
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
|
||||
}
|
||||
command_1.issueCommand('set-env', { name }, convertedVal);
|
||||
}
|
||||
exports.exportVariable = exportVariable;
|
||||
/**
|
||||
@@ -1631,7 +1619,7 @@ exports.setSecret = setSecret;
|
||||
function addPath(inputPath) {
|
||||
const filePath = process.env['GITHUB_PATH'] || '';
|
||||
if (filePath) {
|
||||
file_command_1.issueCommand('PATH', inputPath);
|
||||
file_command_1.issueFileCommand('PATH', inputPath);
|
||||
}
|
||||
else {
|
||||
command_1.issueCommand('add-path', {}, inputPath);
|
||||
@@ -1671,7 +1659,10 @@ function getMultilineInput(name, options) {
|
||||
const inputs = getInput(name, options)
|
||||
.split('\n')
|
||||
.filter(x => x !== '');
|
||||
return inputs;
|
||||
if (options && options.trimWhitespace === false) {
|
||||
return inputs;
|
||||
}
|
||||
return inputs.map(input => input.trim());
|
||||
}
|
||||
exports.getMultilineInput = getMultilineInput;
|
||||
/**
|
||||
@@ -1704,8 +1695,12 @@ exports.getBooleanInput = getBooleanInput;
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
function setOutput(name, value) {
|
||||
const filePath = process.env['GITHUB_OUTPUT'] || '';
|
||||
if (filePath) {
|
||||
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
|
||||
}
|
||||
process.stdout.write(os.EOL);
|
||||
command_1.issueCommand('set-output', { name }, value);
|
||||
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
|
||||
}
|
||||
exports.setOutput = setOutput;
|
||||
/**
|
||||
@@ -1834,7 +1829,11 @@ exports.group = group;
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
function saveState(name, value) {
|
||||
command_1.issueCommand('save-state', { name }, value);
|
||||
const filePath = process.env['GITHUB_STATE'] || '';
|
||||
if (filePath) {
|
||||
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
|
||||
}
|
||||
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
|
||||
}
|
||||
exports.saveState = saveState;
|
||||
/**
|
||||
@@ -1900,13 +1899,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.issueCommand = void 0;
|
||||
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
|
||||
// We use any as a valid input type
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
const fs = __importStar(__nccwpck_require__(7147));
|
||||
const os = __importStar(__nccwpck_require__(2037));
|
||||
const uuid_1 = __nccwpck_require__(8974);
|
||||
const utils_1 = __nccwpck_require__(5278);
|
||||
function issueCommand(command, message) {
|
||||
function issueFileCommand(command, message) {
|
||||
const filePath = process.env[`GITHUB_${command}`];
|
||||
if (!filePath) {
|
||||
throw new Error(`Unable to find environment variable for file command ${command}`);
|
||||
@@ -1918,7 +1918,22 @@ function issueCommand(command, message) {
|
||||
encoding: 'utf8'
|
||||
});
|
||||
}
|
||||
exports.issueCommand = issueCommand;
|
||||
exports.issueFileCommand = issueFileCommand;
|
||||
function prepareKeyValueMessage(key, value) {
|
||||
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
|
||||
const convertedValue = utils_1.toCommandValue(value);
|
||||
// These should realistically never happen, but just in case someone finds a
|
||||
// way to exploit uuid generation let's not allow keys or values that contain
|
||||
// the delimiter.
|
||||
if (key.includes(delimiter)) {
|
||||
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
|
||||
}
|
||||
if (convertedValue.includes(delimiter)) {
|
||||
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
||||
}
|
||||
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
|
||||
}
|
||||
exports.prepareKeyValueMessage = prepareKeyValueMessage;
|
||||
//# sourceMappingURL=file-command.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
2684
package-lock.json
generated
2684
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cache-extensions",
|
||||
"version": "1.8.1",
|
||||
"version": "1.9.0",
|
||||
"private": false,
|
||||
"description": "Cache PHP extensions in GitHub Actions",
|
||||
"main": "lib/cache.js",
|
||||
@@ -36,26 +36,26 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.0.4",
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"setup-php": "2.21.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^28.1.7",
|
||||
"@types/node": "^18.7.6",
|
||||
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
||||
"@typescript-eslint/parser": "^5.33.1",
|
||||
"@types/jest": "^29.1.2",
|
||||
"@types/node": "^18.8.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||
"@typescript-eslint/parser": "^5.40.0",
|
||||
"@vercel/ncc": "^0.34.0",
|
||||
"eslint": "^8.22.0",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jest": "^26.8.3",
|
||||
"eslint-plugin-jest": "^27.1.1",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"jest": "^28.1.3",
|
||||
"jest-circus": "^28.1.3",
|
||||
"jest": "^29.1.2",
|
||||
"jest-circus": "^29.1.2",
|
||||
"prettier": "^2.7.1",
|
||||
"ts-jest": "^28.0.8",
|
||||
"typescript": "^4.7.4"
|
||||
"ts-jest": "^29.0.3",
|
||||
"typescript": "^4.8.4"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/shivammathur/cache-extensions/issues"
|
||||
|
||||
@@ -292,6 +292,7 @@ liblwres160
|
||||
liblxc-common
|
||||
liblxc1
|
||||
liblz4-1
|
||||
liblz4-dev
|
||||
liblzma-dev
|
||||
liblzma5
|
||||
liblzo2-2
|
||||
@@ -730,6 +731,7 @@ libxtst6
|
||||
libxxf86vm1
|
||||
libyajl2
|
||||
libyaml-0-2
|
||||
libyaml-dev
|
||||
libzen0v5
|
||||
libzip4
|
||||
libzmq5
|
||||
|
||||
@@ -2,13 +2,17 @@ amqp
|
||||
couchbase
|
||||
event
|
||||
expect
|
||||
gearman
|
||||
gnupg
|
||||
grpc
|
||||
imagick
|
||||
imap
|
||||
lua
|
||||
mcrypt
|
||||
memcached
|
||||
mongodb
|
||||
newrelic
|
||||
pdo_sqlsrv
|
||||
pecl_http
|
||||
phalcon3
|
||||
phalcon4
|
||||
@@ -16,8 +20,15 @@ phalcon5
|
||||
psr
|
||||
rdkafka
|
||||
redis
|
||||
snmp
|
||||
sqlsrv
|
||||
ssh2
|
||||
swoole
|
||||
uuid
|
||||
v8js
|
||||
vips
|
||||
xdebug
|
||||
xdebug2
|
||||
xlswriter
|
||||
yaml
|
||||
zmq
|
||||
|
||||
@@ -299,6 +299,7 @@ liblua5.2-0
|
||||
liblvm2cmd2.03
|
||||
liblwp-mediatypes-perl
|
||||
liblz4-1
|
||||
liblz4-dev
|
||||
liblzma-dev
|
||||
liblzma5
|
||||
liblzo2-2
|
||||
@@ -735,6 +736,7 @@ libxml-sax-perl
|
||||
libxml2
|
||||
libxml2-dev
|
||||
libxmlb1
|
||||
libxmlb2
|
||||
libxmlrpc-epi0
|
||||
libxmlsec1
|
||||
libxmlsec1-openssl
|
||||
@@ -754,6 +756,7 @@ libxtst6
|
||||
libxxf86vm1
|
||||
libyajl2
|
||||
libyaml-0-2
|
||||
libyaml-dev
|
||||
libz3-4
|
||||
libz3-dev
|
||||
libzen0v5
|
||||
|
||||
@@ -16,6 +16,7 @@ libargon2-1
|
||||
libaria2-0
|
||||
libasan5
|
||||
libasan6
|
||||
libasan8
|
||||
libasound2
|
||||
libasound2-data
|
||||
libaspell15
|
||||
@@ -71,6 +72,7 @@ libcairo-gobject2
|
||||
libcairo-script-interpreter2
|
||||
libcairo2
|
||||
libcairo2-dev
|
||||
libcanberra0
|
||||
libcap-ng0
|
||||
libcap2
|
||||
libcap2-bin
|
||||
@@ -105,6 +107,8 @@ libdav1d5
|
||||
libdb5.3
|
||||
libdbus-1-3
|
||||
libdbus-glib-1-2
|
||||
libdbusmenu-glib4
|
||||
libdbusmenu-gtk3-4
|
||||
libdconf1
|
||||
libde265-0
|
||||
libdebconfclient0
|
||||
@@ -171,6 +175,7 @@ libgc1
|
||||
libgcab-1.0-0
|
||||
libgcc-10-dev
|
||||
libgcc-11-dev
|
||||
libgcc-12-dev
|
||||
libgcc-9-dev
|
||||
libgcc-s1
|
||||
libgconf-2-4
|
||||
@@ -186,6 +191,7 @@ libgdk-pixbuf2.0-bin
|
||||
libgdk-pixbuf2.0-common
|
||||
libgfortran-10-dev
|
||||
libgfortran-11-dev
|
||||
libgfortran-12-dev
|
||||
libgfortran-9-dev
|
||||
libgfortran5
|
||||
libgif7
|
||||
@@ -288,6 +294,7 @@ liblldb-14
|
||||
libllvm12
|
||||
libllvm13
|
||||
libllvm14
|
||||
libllvm15
|
||||
liblmdb0
|
||||
liblocale-gettext-perl
|
||||
liblqr-1-0
|
||||
@@ -299,6 +306,7 @@ liblua5.3-0
|
||||
liblvm2cmd2.03
|
||||
liblwp-mediatypes-perl
|
||||
liblz4-1
|
||||
liblz4-dev
|
||||
liblzma-dev
|
||||
liblzma5
|
||||
liblzo2-2
|
||||
@@ -510,6 +518,9 @@ libnuma1
|
||||
libobjc-11-dev
|
||||
libobjc4
|
||||
libodbc2
|
||||
libodbccr2
|
||||
libodbcinst2
|
||||
libogg0
|
||||
libonig5
|
||||
libopenexr-dev
|
||||
libopenexr25
|
||||
@@ -628,6 +639,7 @@ libssl1.1
|
||||
libssl3
|
||||
libstdc++-10-dev
|
||||
libstdc++-11-dev
|
||||
libstdc++-12-dev
|
||||
libstdc++-9-dev
|
||||
libstdc++6
|
||||
libstemmer0d
|
||||
@@ -637,6 +649,7 @@ libsystemd0
|
||||
libtalloc2
|
||||
libtasn1-6
|
||||
libtcl8.6
|
||||
libtdb1
|
||||
libterm-readkey-perl
|
||||
libtevent0
|
||||
libtext-charwidth-perl
|
||||
@@ -660,8 +673,10 @@ libtk8.6
|
||||
libtommath1
|
||||
libtool
|
||||
libtsan0
|
||||
libtsan2
|
||||
libtss2-esys-3.0.2-0
|
||||
libtss2-mu0
|
||||
libtss2-rc0
|
||||
libtss2-sys1
|
||||
libtss2-tcti-cmd0
|
||||
libtss2-tcti-device0
|
||||
@@ -686,6 +701,8 @@ libutf8proc2
|
||||
libuuid1
|
||||
libuv1
|
||||
libvolume-key1
|
||||
libvorbis0a
|
||||
libvorbisfile3
|
||||
libvulkan1
|
||||
libwayland-client0
|
||||
libwayland-cursor0
|
||||
@@ -760,6 +777,7 @@ libxxf86vm1
|
||||
libxxhash0
|
||||
libyajl2
|
||||
libyaml-0-2
|
||||
libyaml-dev
|
||||
libz3-4
|
||||
libz3-dev
|
||||
libzen0v5
|
||||
|
||||
@@ -78,7 +78,7 @@ extension_dir_linux() {
|
||||
|
||||
data() {
|
||||
old_versions="5.[3-5]"
|
||||
date='20211217'
|
||||
date='20220831'
|
||||
if [ "$os" = "Linux" ]; then
|
||||
. /etc/lsb-release
|
||||
os=$os-$DISTRIB_CODENAME
|
||||
@@ -86,8 +86,6 @@ data() {
|
||||
dir=$(extension_dir_linux "$api_version")
|
||||
sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
|
||||
elif [ "$os" = "Darwin" ]; then
|
||||
[[ "$extensions" == *"vips"* ]] && date='20220224'
|
||||
[[ "$extensions" =~ .*((pecl_)?http|mongodb).* ]] && date='20220304'
|
||||
api_version=$(get_api_version)
|
||||
dir=$(extension_dir_darwin "$api_version")
|
||||
sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
|
||||
@@ -100,8 +98,8 @@ data() {
|
||||
key="$os"-"$version"-"$key"-"$date"
|
||||
echo "$dir" > "${RUNNER_TEMP:?}"/dir
|
||||
echo "$key" > "${RUNNER_TEMP:?}"/key
|
||||
echo "::set-output name=dir::$dir"
|
||||
echo "::set-output name=key::$key"
|
||||
echo "dir=$dir" >> ${GITHUB_OUTPUT:?}
|
||||
echo "key=$key" >> ${GITHUB_OUTPUT:?}
|
||||
}
|
||||
|
||||
dependencies() {
|
||||
|
||||
@@ -29,10 +29,12 @@ get_dependencies() {
|
||||
formula_file="$tap_dir/$ext_tap/Formula/$extension@${version:?}.rb"
|
||||
if [ -e "$formula_file" ]; then
|
||||
formula_deps="$(grep "depends_on" "$formula_file" | cut -d '"' -f 2 | tr '\n' ' ')"
|
||||
formula_deps_from_macos="$(grep "uses_from_macos \"lib" "$formula_file" | cut -d '"' -f 2 | tr '\n' ' ')"
|
||||
fi
|
||||
deps=()
|
||||
[[ -n "${list_deps[*]}" ]] && deps+=("${list_deps[@]}")
|
||||
[[ -n "${formula_deps[*]}" ]] && deps+=("${formula_deps[@]}")
|
||||
[[ -n "${formula_deps_from_macos[*]}" ]] && deps+=("${formula_deps_from_macos[@]}")
|
||||
echo "${deps[@]}"
|
||||
}
|
||||
|
||||
@@ -117,6 +119,9 @@ restore_library_helper() {
|
||||
if ! [ -d "$brew_prefix/opt/$dep_name" ]; then
|
||||
brew link --force --overwrite "$dep_name" 2>/dev/null || true
|
||||
fi
|
||||
if ! [ -d "$brew_prefix/opt/$dep_name" ]; then
|
||||
sudo ln -sf "$brew_cellar"/"$dep_name"/* "$brew_prefix"/opt/"$dep_name"
|
||||
fi
|
||||
}
|
||||
|
||||
restore_library() {
|
||||
@@ -157,9 +162,7 @@ setup_dependencies() {
|
||||
IFS=' ' read -r -a extensions_array <<<"$(filter_extensions "${extensions_array[@]}")"
|
||||
if [[ -n "${extensions_array[*]// /}" ]]; then
|
||||
add_brew_tap "$php_tap"
|
||||
add_brew_tap "$ext_tap"
|
||||
# Remove once updated on the images
|
||||
curl -o "$tap_dir"/"$core_tap"/Formula/ca-certificates.rb -sL https://raw.githubusercontent.com/"$core_tap"/master/Formula/ca-certificates.rb
|
||||
add_brew_tap "$ext_tap"
|
||||
for extension in "${extensions_array[@]}"; do
|
||||
IFS=' ' read -r -a dependency_array <<<"$(get_dependencies "$extension")"
|
||||
IFS=' ' read -r -a extension_array <<<"$(echo "${dependency_array[@]}" | grep -Eo "[a-z]*@" | sed 's/@//' | tr '\n' ' ')"
|
||||
|
||||
@@ -7,8 +7,8 @@ link_apt_fast() {
|
||||
fetch_package() {
|
||||
if ! [ -e /tmp/Packages ]; then
|
||||
. /etc/os-release
|
||||
deb_build_arch=$(dpkg-architecture -q DEB_BUILD_ARCH)
|
||||
curl -o /tmp/Packages.gz -sL "http://ppa.launchpad.net/ondrej/php/ubuntu/dists/$VERSION_CODENAME/main/binary-$deb_build_arch/Packages.gz"
|
||||
arch=$(dpkg --print-architecture)
|
||||
curl -o /tmp/Packages.gz -sL "http://ppa.launchpad.net/ondrej/php/ubuntu/dists/$VERSION_CODENAME/main/binary-$arch/Packages.gz"
|
||||
gzip -df /tmp/Packages.gz
|
||||
fi
|
||||
}
|
||||
@@ -98,6 +98,7 @@ setup_dependencies() {
|
||||
libraries=""
|
||||
extension_packages=""
|
||||
for extension_package in "${extensions_array[@]}"; do
|
||||
[[ ! "$extension_package" =~ php[0-9]+\.[0-9]+-[a-zA-Z0-9]+$ ]] && continue
|
||||
fetch_package
|
||||
libraries="$libraries $(get_dependencies "$extension_package" "lib")"
|
||||
IFS=' ' read -r -a dependency_extension_packages_array <<<"$(get_dependencies "$extension_package" "php$version-")"
|
||||
|
||||
Reference in New Issue
Block a user