Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
959ba21b72 | ||
|
|
5f06df1e0f | ||
|
|
0d8f2cf62b | ||
|
|
03f7f56b30 | ||
|
|
79c4acf033 | ||
|
|
a173299cf0 | ||
|
|
b0f769600b | ||
|
|
fd96c6ef49 | ||
|
|
506c0905f4 | ||
|
|
f509c0eeeb | ||
|
|
354b2b75c4 | ||
|
|
75fdf09203 | ||
|
|
2f58e22e3c | ||
|
|
2e789925e4 | ||
|
|
5b215c413b | ||
|
|
20eb4f1c8b | ||
|
|
21e27c8c67 | ||
|
|
da8a00bfab | ||
|
|
59bc1e6fcf | ||
|
|
9b4ef64d32 | ||
|
|
e51a646160 | ||
|
|
da71add69c | ||
|
|
b52930e590 | ||
|
|
3572ca5db9 | ||
|
|
b8a361a25a | ||
|
|
eb0ccb73d5 | ||
|
|
2a56d34ea0 | ||
|
|
075da4be87 | ||
|
|
b660f29789 | ||
|
|
f73bbb0929 | ||
|
|
caa5d3f915 | ||
|
|
6c67ee1261 | ||
|
|
502885cc75 | ||
|
|
d3929ece8e | ||
|
|
9355729f4a | ||
|
|
7f4f2f921c | ||
|
|
bcdf57190d | ||
|
|
fa913560e6 | ||
|
|
90fc296fbc | ||
|
|
f851596ef0 | ||
|
|
319d6f9a6d | ||
|
|
882ea8f750 | ||
|
|
7e3d12a4c4 |
7
.github/FUNDING.yml
vendored
7
.github/FUNDING.yml
vendored
@@ -1,7 +0,0 @@
|
|||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
open_collective: setup-php
|
|
||||||
tidelift: "npm/setup-php"
|
|
||||||
community_bridge: setup-php
|
|
||||||
patreon: shivammathur
|
|
||||||
custom: https://www.paypal.me/shivammathur
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Libs workflow
|
name: Git release workflow
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -10,12 +10,12 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
|
os: [ubuntu-20.04, ubuntu-18.04]
|
||||||
steps:
|
steps:
|
||||||
- name: Update lists
|
- name: Update lists
|
||||||
run: |
|
run: |
|
||||||
. /etc/lsb-release
|
. /etc/os-release
|
||||||
dpkg -l | awk '($1 == "ii") && ($2 ~ /^lib|lib$/) { print $2 }' | sed 's/:amd64//' > /tmp/"$DISTRIB_CODENAME"-libs
|
dpkg -l | awk '($1 == "ii") && ($2 ~ /^lib|lib$/) { print $2 }' | sed 's/:amd64//' > /tmp/"$VERSION_CODENAME"-libs
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
@@ -38,6 +38,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: lists
|
name: lists
|
||||||
path: src/lists
|
path: src/lists
|
||||||
|
- name: Update darwin extensions list
|
||||||
|
run: |
|
||||||
|
brew tap shivammathur/extensions
|
||||||
|
find "$(brew --repository shivammathur/extensions)"/.github/deps -mindepth 1 -type d -name "*" -exec basename {} \; | sort > src/lists/darwin-extensions
|
||||||
- name: Update tags and branches
|
- name: Update tags and branches
|
||||||
run: |
|
run: |
|
||||||
push_ref() {
|
push_ref() {
|
||||||
69
.github/workflows/node-release.yml
vendored
Normal file
69
.github/workflows/node-release.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
name: Node release workflow
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
skip:
|
||||||
|
description: Skip release to repository
|
||||||
|
required: false
|
||||||
|
tag:
|
||||||
|
description: Tag name
|
||||||
|
required: true
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
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@v2
|
||||||
|
|
||||||
|
- name: Checkout tag
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: github.event_name == 'workflow_dispatch'
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.inputs.tag }}
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16.x'
|
||||||
|
registry-url: https://registry.npmjs.org
|
||||||
|
|
||||||
|
- name: Install dependencies and add lib
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
sed -i -e '/lib\//d' .gitignore
|
||||||
|
|
||||||
|
- name: Publish to NPM
|
||||||
|
if: "!contains(github.event.inputs.skip, 'skip-npm')"
|
||||||
|
run: npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
- name: Change to GitHub Packages registry
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
registry-url: https://npm.pkg.github.com
|
||||||
|
scope: '@shivammathur'
|
||||||
|
|
||||||
|
- name: Patch package.json
|
||||||
|
run: |
|
||||||
|
sed -i 's#"name": "#"name": "@shivammathur/#' package.json
|
||||||
|
- name: Publish to GitHub Packages
|
||||||
|
if: "!contains(github.event.inputs.skip, 'skip-github-packages')"
|
||||||
|
run: npm publish
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Main workflow
|
name: Node test workflow
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
@@ -8,10 +8,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js 12.x
|
- name: Setup Node.js 16.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 16.x
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
2
LICENSE
2
LICENSE
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2020 shivammathur and contributors
|
Copyright (c) 2020-2022 shivammathur and contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
35
README.md
35
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://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://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="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.1-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.2-777bb3.svg?logo=php&logoColor=white&labelColor=555555"></a>
|
||||||
</p>
|
</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.
|
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.
|
||||||
@@ -33,21 +33,22 @@ Cache PHP extensions in [GitHub Actions](https://github.com/features/actions "Gi
|
|||||||
|7.0|`Stable`|`End of life`|
|
|7.0|`Stable`|`End of life`|
|
||||||
|7.1|`Stable`|`End of life`|
|
|7.1|`Stable`|`End of life`|
|
||||||
|7.2|`Stable`|`End of life`|
|
|7.2|`Stable`|`End of life`|
|
||||||
|7.3|`Stable`|`Security fixes only`|
|
|7.3|`Stable`|`End of life`|
|
||||||
|7.4|`Stable`|`Active`|
|
|7.4|`Stable`|`Security fixes only`|
|
||||||
|8.0|`Stable`|`Active`|
|
|8.0|`Stable`|`Active`|
|
||||||
|8.1|`Nightly`|`In development`|
|
|8.1|`Stable`|`Active`|
|
||||||
|
|8.2|`Nightly`|`In development`|
|
||||||
|
|
||||||
## :cloud: OS/Platform Support
|
## :cloud: OS/Platform Support
|
||||||
|
|
||||||
|Virtual environment|YAML workflow label|
|
|Virtual environment|YAML workflow label|
|
||||||
|--- |--- |
|
|--- |--- |
|
||||||
|Windows Server 2019|`windows-latest` or `windows-2019`|
|
|
||||||
|Ubuntu 20.04|`ubuntu-latest` or `ubuntu-20.04`|
|
|Ubuntu 20.04|`ubuntu-latest` or `ubuntu-20.04`|
|
||||||
|Ubuntu 18.04|`ubuntu-18.04`|
|
|Ubuntu 18.04|`ubuntu-18.04`|
|
||||||
|Ubuntu 16.04|`ubuntu-16.04`|
|
|Windows Server 2022|`windows-2022`|
|
||||||
|
|Windows Server 2019|`windows-latest` or `windows-2019`|
|
||||||
|macOS Catalina 10.15|`macos-latest` or `macOS-10.15`|
|
|macOS Catalina 10.15|`macos-latest` or `macOS-10.15`|
|
||||||
|macOS Big Sur 11.x|`macOS-11.0`|
|
|macOS Big Sur 11.x|`macOS-11`|
|
||||||
|
|
||||||
## :memo: Usage
|
## :memo: Usage
|
||||||
|
|
||||||
@@ -57,15 +58,18 @@ Use this GitHub Action when the extensions you are adding in [setup-php](https:/
|
|||||||
|
|
||||||
#### `php-version` (required)
|
#### `php-version` (required)
|
||||||
|
|
||||||
- Specify the PHP version you want to set-up.
|
- Specify the PHP version you want to set up.
|
||||||
- Accepts a `string`. For example `'7.4'`.
|
- Accepts a `string`. For example `'8.1'`.
|
||||||
|
- 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`.
|
||||||
- See [PHP support](#tada-php-support) for supported PHP versions.
|
- See [PHP support](#tada-php-support) for supported PHP versions.
|
||||||
|
|
||||||
#### `extensions` (required)
|
#### `extensions` (required)
|
||||||
|
|
||||||
- Specify the extensions you want to setup.
|
- Specify the extensions you want to set up.
|
||||||
- Accepts a `string` in csv-format. For example `mbstring, xdebug, :opcache`.
|
- Accepts a `string` in csv-format. For example `mbstring, xdebug, :opcache`.
|
||||||
- Extensions prefixed with `:` are ignored.
|
- Extensions prefixed with `:` are ignored in output cache key.
|
||||||
|
|
||||||
#### `key` (required)
|
#### `key` (required)
|
||||||
|
|
||||||
@@ -86,7 +90,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
||||||
env:
|
env:
|
||||||
extensions: intl, pcov
|
extensions: intl, pcov
|
||||||
@@ -132,7 +136,7 @@ If you set up both `TS` and `NTS` PHP versions on `Windows` in your workflow, pl
|
|||||||
|
|
||||||
## :scroll: License
|
## :scroll: License
|
||||||
|
|
||||||
The scripts 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.
|
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.
|
||||||
|
|
||||||
## :+1: Contributions
|
## :+1: Contributions
|
||||||
|
|
||||||
@@ -143,9 +147,8 @@ Contributions are welcome! See [Contributor's Guide](.github/CONTRIBUTING.md "sh
|
|||||||
If this action helped you.
|
If this action helped you.
|
||||||
|
|
||||||
- Please star the project and share it. If you blog, please share your experience of using this action.
|
- Please star the project and share it. If you blog, please share your experience of using this action.
|
||||||
- Please consider supporting our work by sponsoring using [Open Collective](https://opencollective.com/setup-php), [Paypal](https://www.paypal.me/shivammathur "Shivam Mathur PayPal") or [Patreon](https://www.patreon.com/shivammathur "Shivam Mathur Patreon").
|
- Please support our work by sponsoring using [GitHub sponsors](https://github.com/sponsors/shivammathur).
|
||||||
- If you use this action at your company, please [reach out](mailto:contact@setup-php.com) to sponsor the project.
|
|
||||||
|
|
||||||
## :package: Dependencies
|
## :package: Dependencies
|
||||||
|
|
||||||
- [Node.js dependencies](https://github.com/shivammathur/setup-php/network/dependencies "Node.js dependencies")
|
- [Node.js dependencies](https://github.com/shivammathur/cache-extensions/network/dependencies "Node.js dependencies")
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import * as spu from 'setup-php/lib/utils';
|
||||||
import * as cache from '../src/cache';
|
import * as cache from '../src/cache';
|
||||||
import * as utils from '../src/utils';
|
import * as utils from '../src/utils';
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ import * as utils from '../src/utils';
|
|||||||
*/
|
*/
|
||||||
jest.mock('../src/cache', () => ({
|
jest.mock('../src/cache', () => ({
|
||||||
run: jest.fn().mockImplementation(async (): Promise<string> => {
|
run: jest.fn().mockImplementation(async (): Promise<string> => {
|
||||||
const version: string = await utils.parseVersion(
|
const version: string = await spu.parseVersion(
|
||||||
process.env['php-version'] || ''
|
process.env['php-version'] || ''
|
||||||
);
|
);
|
||||||
const extensions = await utils.filterExtensions(
|
const extensions = await utils.filterExtensions(
|
||||||
|
|||||||
@@ -2,12 +2,6 @@ import * as fs from 'fs';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as utils from '../src/utils';
|
import * as utils from '../src/utils';
|
||||||
|
|
||||||
jest.mock('@actions/core', () => ({
|
|
||||||
getInput: jest.fn().mockImplementation(key => {
|
|
||||||
return ['cache-extensions'].indexOf(key) !== -1 ? key : '';
|
|
||||||
})
|
|
||||||
}));
|
|
||||||
|
|
||||||
async function cleanup(path: string): Promise<void> {
|
async function cleanup(path: string): Promise<void> {
|
||||||
fs.unlink(path, error => {
|
fs.unlink(path, error => {
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -17,24 +11,6 @@ async function cleanup(path: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('Utils tests', () => {
|
describe('Utils tests', () => {
|
||||||
it('checking readEnv', async () => {
|
|
||||||
process.env['test'] = 'setup-php';
|
|
||||||
expect(await utils.readEnv('test')).toBe('setup-php');
|
|
||||||
expect(await utils.readEnv('undefined')).toBe('');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('checking getInput', async () => {
|
|
||||||
process.env['test'] = 'setup-php';
|
|
||||||
expect(await utils.getInput('test', false)).toBe('setup-php');
|
|
||||||
expect(await utils.getInput('cache-extensions', false)).toBe(
|
|
||||||
'cache-extensions'
|
|
||||||
);
|
|
||||||
expect(await utils.getInput('DoesNotExist', false)).toBe('');
|
|
||||||
await expect(async () => {
|
|
||||||
await utils.getInput('DoesNotExist', true);
|
|
||||||
}).rejects.toThrow('Input required and not supplied: DoesNotExist');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('checking getOutput', async () => {
|
it('checking getOutput', async () => {
|
||||||
const temp_dir: string = process.env['RUNNER_TEMP'] || '';
|
const temp_dir: string = process.env['RUNNER_TEMP'] || '';
|
||||||
const file_path: string = path.join(temp_dir, 'test');
|
const file_path: string = path.join(temp_dir, 'test');
|
||||||
@@ -43,14 +19,15 @@ describe('Utils tests', () => {
|
|||||||
await cleanup(file_path);
|
await cleanup(file_path);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('checking parseVersion', async () => {
|
|
||||||
expect(await utils.parseVersion('7')).toBe('7.0');
|
|
||||||
expect(await utils.parseVersion('7.4')).toBe('7.4');
|
|
||||||
expect(await utils.parseVersion('latest')).toBe('7.4');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('checking filterExtensions', async () => {
|
it('checking filterExtensions', async () => {
|
||||||
expect(await utils.filterExtensions('a,:b,c')).toBe('"a,c"');
|
expect(await utils.filterExtensions('a,:b,c')).toBe('"a,c"');
|
||||||
expect(await utils.filterExtensions('a, :b, c')).toBe('"a, c"');
|
expect(await utils.filterExtensions('a, :b, c')).toBe('"a, c"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('checking scriptCall', async () => {
|
||||||
|
const script: string = path.join(__dirname, '../src/scripts/cache.sh');
|
||||||
|
expect(await utils.scriptCall('test a b')).toBe(
|
||||||
|
['bash', script, 'test', 'a', 'b'].join(' ')
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ inputs:
|
|||||||
description: 'Key to version the cache hash.'
|
description: 'Key to version the cache hash.'
|
||||||
required: true
|
required: true
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
25264
dist/index.js
vendored
25264
dist/index.js
vendored
File diff suppressed because one or more lines are too long
5924
package-lock.json
generated
5924
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
64
package.json
64
package.json
@@ -1,14 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "cache-extensions",
|
"name": "cache-extensions",
|
||||||
"version": "1.6.0",
|
"version": "1.7.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Cache PHP extensions in GitHub Actions",
|
"description": "Cache PHP extensions in GitHub Actions",
|
||||||
"main": "lib/cache.js",
|
"main": "lib/cache.js",
|
||||||
|
"types": "lib/cache.d.ts",
|
||||||
|
"directories": {
|
||||||
|
"lib": "lib",
|
||||||
|
"test": "__tests__",
|
||||||
|
"src": "src"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"lib",
|
||||||
|
"src"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"lint": "eslint **/*.ts --cache",
|
"lint": "eslint **/src/*.ts --cache --fix",
|
||||||
"format": "prettier --write **/*.ts && git add .",
|
"format": "prettier --write **/src/*.ts && git add .",
|
||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --check **/src/*.ts",
|
||||||
"release": "ncc build -o dist && git add -f dist/",
|
"release": "ncc build -o dist && git add -f dist/",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
@@ -25,32 +35,32 @@
|
|||||||
"author": "shivammathur",
|
"author": "shivammathur",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^1.0.7",
|
"@actions/cache": "^1.0.8",
|
||||||
"@actions/core": "^1.4.0",
|
"@actions/core": "^1.6.0",
|
||||||
"@actions/exec": "^1.1.0"
|
"@actions/exec": "^1.1.0",
|
||||||
|
"setup-php": "2.15.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.23",
|
"@types/jest": "^27.0.3",
|
||||||
"@types/node": "^15.14.0",
|
"@types/node": "^17.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.28.1",
|
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
||||||
"@typescript-eslint/parser": "^4.28.1",
|
"@typescript-eslint/parser": "^5.7.0",
|
||||||
"@vercel/ncc": "^0.28.6",
|
"@vercel/ncc": "^0.33.0",
|
||||||
"eslint": "^7.29.0",
|
"eslint": "^8.4.1",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.23.4",
|
"eslint-plugin-import": "^2.25.3",
|
||||||
"eslint-plugin-jest": "^24.3.6",
|
"eslint-plugin-jest": "^25.3.0",
|
||||||
"eslint-plugin-prettier": "^3.4.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"husky": "^4.3.8",
|
"jest": "^27.4.5",
|
||||||
"jest": "^27.0.6",
|
"jest-circus": "^27.4.5",
|
||||||
"jest-circus": "^27.0.6",
|
"prettier": "^2.5.1",
|
||||||
"prettier": "^2.3.2",
|
"ts-jest": "^27.1.2",
|
||||||
"ts-jest": "^27.0.3",
|
"typescript": "^4.5.4"
|
||||||
"typescript": "^4.3.5"
|
|
||||||
},
|
},
|
||||||
"husky": {
|
"bugs": {
|
||||||
"skipCI": true,
|
"url": "https://github.com/shivammathur/cache-extensions/issues"
|
||||||
"hooks": {
|
},
|
||||||
"pre-commit": "npm run format && npm run lint && npm run test && npm run build && npm run release"
|
"simple-git-hooks": {
|
||||||
}
|
"pre-commit": "npm run format && npm run lint && npm run test && npm run build && npm run release"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/cache.ts
13
src/cache.ts
@@ -1,6 +1,7 @@
|
|||||||
import {exec} from '@actions/exec';
|
import {exec} from '@actions/exec';
|
||||||
import * as cache from '@actions/cache';
|
import * as cache from '@actions/cache';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import * as spu from 'setup-php/lib/utils';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as utils from './utils';
|
import * as utils from './utils';
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ export async function handleDependencies(
|
|||||||
if (!/^5.[3-5]$/.test(version) && /linux|darwin/.test(process.platform)) {
|
if (!/^5.[3-5]$/.test(version) && /linux|darwin/.test(process.platform)) {
|
||||||
const cache_key: string = (await utils.getOutput('key')) + '-deps';
|
const cache_key: string = (await utils.getOutput('key')) + '-deps';
|
||||||
const cache_dir: string = path.join(
|
const cache_dir: string = path.join(
|
||||||
await utils.readEnv('RUNNER_TOOL_CACHE'),
|
await spu.readEnv('RUNNER_TOOL_CACHE'),
|
||||||
'deps'
|
'deps'
|
||||||
);
|
);
|
||||||
const cache_hit: string | undefined = await cache.restoreCache(
|
const cache_hit: string | undefined = await cache.restoreCache(
|
||||||
@@ -37,17 +38,17 @@ export async function handleDependencies(
|
|||||||
*/
|
*/
|
||||||
export async function run(): Promise<void> {
|
export async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const version: string = await utils.parseVersion(
|
const version: string = await spu.parseVersion(
|
||||||
await utils.getInput('php-version', true)
|
await spu.getInput('php-version', true)
|
||||||
);
|
);
|
||||||
const extensions: string = await utils.filterExtensions(
|
const extensions: string = await utils.filterExtensions(
|
||||||
await utils.getInput('extensions', true)
|
await spu.getInput('extensions', true)
|
||||||
);
|
);
|
||||||
const key: string = await utils.getInput('key', true);
|
const key: string = await spu.getInput('key', true);
|
||||||
await exec(await utils.scriptCall('data', extensions, version, key));
|
await exec(await utils.scriptCall('data', extensions, version, key));
|
||||||
await handleDependencies(extensions, version);
|
await handleDependencies(extensions, version);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -298,8 +298,6 @@ liblqr-1-0-dev
|
|||||||
liblsan0
|
liblsan0
|
||||||
libltdl-dev
|
libltdl-dev
|
||||||
libltdl7
|
libltdl7
|
||||||
liblttng-ust-ctl4
|
|
||||||
liblttng-ust0
|
|
||||||
liblua5.2-0
|
liblua5.2-0
|
||||||
liblvm2app2.2
|
liblvm2app2.2
|
||||||
liblvm2cmd2.02
|
liblvm2cmd2.02
|
||||||
@@ -619,6 +617,7 @@ libslang2
|
|||||||
libsm-dev
|
libsm-dev
|
||||||
libsm6
|
libsm6
|
||||||
libsmartcols1
|
libsmartcols1
|
||||||
|
libsnappy1v5
|
||||||
libsnmp-base
|
libsnmp-base
|
||||||
libsnmp30
|
libsnmp30
|
||||||
libsodium23
|
libsodium23
|
||||||
@@ -673,7 +672,6 @@ libucl1
|
|||||||
libudev1
|
libudev1
|
||||||
libunistring2
|
libunistring2
|
||||||
libunwind8
|
libunwind8
|
||||||
liburcu6
|
|
||||||
liburi-perl
|
liburi-perl
|
||||||
libusb-1.0-0
|
libusb-1.0-0
|
||||||
libutempter0
|
libutempter0
|
||||||
|
|||||||
1
src/lists/darwin-deps
Normal file
1
src/lists/darwin-deps
Normal file
@@ -0,0 +1 @@
|
|||||||
|
geos=geos
|
||||||
@@ -1,12 +1,19 @@
|
|||||||
amqp
|
amqp
|
||||||
|
expect
|
||||||
|
gnupg
|
||||||
grpc
|
grpc
|
||||||
imagick
|
imagick
|
||||||
imap
|
imap
|
||||||
memcached
|
memcached
|
||||||
|
mongodb
|
||||||
pecl_http
|
pecl_http
|
||||||
phalcon3
|
phalcon3
|
||||||
phalcon4
|
phalcon4
|
||||||
psr
|
psr
|
||||||
rdkafka
|
rdkafka
|
||||||
redis
|
redis
|
||||||
zmq
|
ssh2
|
||||||
|
swoole
|
||||||
|
vips
|
||||||
|
yaml
|
||||||
|
zmq
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ libasound2
|
|||||||
libasound2-data
|
libasound2-data
|
||||||
libaspell15
|
libaspell15
|
||||||
libassuan0
|
libassuan0
|
||||||
|
libatasmart4
|
||||||
libatk-bridge2.0-0
|
libatk-bridge2.0-0
|
||||||
libatk1.0-0
|
libatk1.0-0
|
||||||
libatk1.0-data
|
libatk1.0-data
|
||||||
@@ -39,6 +40,14 @@ libblas-dev
|
|||||||
libblas3
|
libblas3
|
||||||
libblkid-dev
|
libblkid-dev
|
||||||
libblkid1
|
libblkid1
|
||||||
|
libblockdev-crypto2
|
||||||
|
libblockdev-fs2
|
||||||
|
libblockdev-loop2
|
||||||
|
libblockdev-part-err2
|
||||||
|
libblockdev-part2
|
||||||
|
libblockdev-swap2
|
||||||
|
libblockdev-utils2
|
||||||
|
libblockdev2
|
||||||
libboost-context1.71.0
|
libboost-context1.71.0
|
||||||
libboost-filesystem1.71.0
|
libboost-filesystem1.71.0
|
||||||
libboost-program-options1.71.0
|
libboost-program-options1.71.0
|
||||||
@@ -71,8 +80,6 @@ libcap2
|
|||||||
libcap2-bin
|
libcap2-bin
|
||||||
libcbor0.6
|
libcbor0.6
|
||||||
libcc1-0
|
libcc1-0
|
||||||
libcgi-fast-perl
|
|
||||||
libcgi-pm-perl
|
|
||||||
libcgroup1
|
libcgroup1
|
||||||
libclang-common-10-dev
|
libclang-common-10-dev
|
||||||
libclang-common-11-dev
|
libclang-common-11-dev
|
||||||
@@ -139,7 +146,6 @@ libext2fs2
|
|||||||
libfakeroot
|
libfakeroot
|
||||||
libfastjson4
|
libfastjson4
|
||||||
libfbclient2
|
libfbclient2
|
||||||
libfcgi-perl
|
|
||||||
libfdisk1
|
libfdisk1
|
||||||
libffi-dev
|
libffi-dev
|
||||||
libffi7
|
libffi7
|
||||||
@@ -226,7 +232,6 @@ libhtml-form-perl
|
|||||||
libhtml-format-perl
|
libhtml-format-perl
|
||||||
libhtml-parser-perl
|
libhtml-parser-perl
|
||||||
libhtml-tagset-perl
|
libhtml-tagset-perl
|
||||||
libhtml-template-perl
|
|
||||||
libhtml-tree-perl
|
libhtml-tree-perl
|
||||||
libhttp-cookies-perl
|
libhttp-cookies-perl
|
||||||
libhttp-daemon-perl
|
libhttp-daemon-perl
|
||||||
@@ -258,6 +263,7 @@ libitm1
|
|||||||
libjansson4
|
libjansson4
|
||||||
libjbig-dev
|
libjbig-dev
|
||||||
libjbig0
|
libjbig0
|
||||||
|
libjcat1
|
||||||
libjemalloc2
|
libjemalloc2
|
||||||
libjpeg-dev
|
libjpeg-dev
|
||||||
libjpeg-turbo8
|
libjpeg-turbo8
|
||||||
@@ -301,8 +307,6 @@ liblqr-1-0-dev
|
|||||||
liblsan0
|
liblsan0
|
||||||
libltdl-dev
|
libltdl-dev
|
||||||
libltdl7
|
libltdl7
|
||||||
liblttng-ust-ctl4
|
|
||||||
liblttng-ust0
|
|
||||||
liblua5.2-0
|
liblua5.2-0
|
||||||
liblvm2cmd2.03
|
liblvm2cmd2.03
|
||||||
liblwp-mediatypes-perl
|
liblwp-mediatypes-perl
|
||||||
@@ -487,7 +491,6 @@ libmysqlclient21
|
|||||||
libncurses-dev
|
libncurses-dev
|
||||||
libncurses5
|
libncurses5
|
||||||
libncurses6
|
libncurses6
|
||||||
libncursesw5
|
|
||||||
libncursesw6
|
libncursesw6
|
||||||
libnet-dbus-perl
|
libnet-dbus-perl
|
||||||
libnet-http-perl
|
libnet-http-perl
|
||||||
@@ -536,6 +539,7 @@ libpangocairo-1.0-0
|
|||||||
libpangoft2-1.0-0
|
libpangoft2-1.0-0
|
||||||
libpaper-utils
|
libpaper-utils
|
||||||
libpaper1
|
libpaper1
|
||||||
|
libparted-fs-resize0
|
||||||
libparted2
|
libparted2
|
||||||
libpcap0.8
|
libpcap0.8
|
||||||
libpci3
|
libpci3
|
||||||
@@ -621,6 +625,7 @@ libsm-dev
|
|||||||
libsm6
|
libsm6
|
||||||
libsmartcols1
|
libsmartcols1
|
||||||
libsmbios-c2
|
libsmbios-c2
|
||||||
|
libsnappy1v5
|
||||||
libsnmp-base
|
libsnmp-base
|
||||||
libsnmp35
|
libsnmp35
|
||||||
libsodium23
|
libsodium23
|
||||||
@@ -674,6 +679,7 @@ libubsan1
|
|||||||
libuchardet0
|
libuchardet0
|
||||||
libucl1
|
libucl1
|
||||||
libudev1
|
libudev1
|
||||||
|
libudisks2-0
|
||||||
libunistring2
|
libunistring2
|
||||||
libunwind8
|
libunwind8
|
||||||
liburcu6
|
liburcu6
|
||||||
@@ -683,6 +689,7 @@ libutempter0
|
|||||||
libutf8proc2
|
libutf8proc2
|
||||||
libuuid1
|
libuuid1
|
||||||
libuv1
|
libuv1
|
||||||
|
libvolume-key1
|
||||||
libvorbis0a
|
libvorbis0a
|
||||||
libvorbisfile3
|
libvorbisfile3
|
||||||
libvpx6
|
libvpx6
|
||||||
|
|||||||
4
src/lists/linux-deps
Normal file
4
src/lists/linux-deps
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
geos=libgeos-dev
|
||||||
|
pdo_firebird=firebird-dev
|
||||||
|
oci8=libaio-dev
|
||||||
|
pdo_oci=libaio-dev
|
||||||
@@ -1,743 +0,0 @@
|
|||||||
lib32gcc1
|
|
||||||
lib32stdc++6
|
|
||||||
lib32z1
|
|
||||||
libaccountsservice0
|
|
||||||
libacl1
|
|
||||||
libaio1
|
|
||||||
libapparmor-perl
|
|
||||||
libapparmor1
|
|
||||||
libapr1
|
|
||||||
libaprutil1
|
|
||||||
libaprutil1-dbd-sqlite3
|
|
||||||
libaprutil1-ldap
|
|
||||||
libapt-inst2.0
|
|
||||||
libapt-pkg5.0
|
|
||||||
libarchive13
|
|
||||||
libargon2-1
|
|
||||||
libasan2
|
|
||||||
libasan5
|
|
||||||
libasn1-8-heimdal
|
|
||||||
libasound2
|
|
||||||
libasound2-data
|
|
||||||
libaspell15
|
|
||||||
libasprintf0v5
|
|
||||||
libassuan0
|
|
||||||
libatk-bridge2.0-0
|
|
||||||
libatk1.0-0
|
|
||||||
libatk1.0-data
|
|
||||||
libatm1
|
|
||||||
libatomic1
|
|
||||||
libatspi2.0-0
|
|
||||||
libattr1
|
|
||||||
libaudit-common
|
|
||||||
libaudit1
|
|
||||||
libauthen-sasl-perl
|
|
||||||
libavahi-client3
|
|
||||||
libavahi-common-data
|
|
||||||
libavahi-common3
|
|
||||||
libbind9-140
|
|
||||||
libbison-dev
|
|
||||||
libblas-common
|
|
||||||
libblas-dev
|
|
||||||
libblas3
|
|
||||||
libblkid1
|
|
||||||
libboost-filesystem1.58.0
|
|
||||||
libboost-system1.58.0
|
|
||||||
libbsd0
|
|
||||||
libburn4
|
|
||||||
libbz2-1.0
|
|
||||||
libbz2-dev
|
|
||||||
libc++-dev
|
|
||||||
libc++-helpers
|
|
||||||
libc++1
|
|
||||||
libc++abi-dev
|
|
||||||
libc++abi1
|
|
||||||
libc-ares2
|
|
||||||
libc-bin
|
|
||||||
libc-client2007e
|
|
||||||
libc-dev-bin
|
|
||||||
libc6
|
|
||||||
libc6-dev
|
|
||||||
libc6-i386
|
|
||||||
libcairo-gobject2
|
|
||||||
libcairo-script-interpreter2
|
|
||||||
libcairo2
|
|
||||||
libcairo2-dev
|
|
||||||
libcanberra0
|
|
||||||
libcap-ng0
|
|
||||||
libcap2
|
|
||||||
libcap2-bin
|
|
||||||
libcapnp-0.5.3
|
|
||||||
libcc1-0
|
|
||||||
libcdt5
|
|
||||||
libcgi-fast-perl
|
|
||||||
libcgi-pm-perl
|
|
||||||
libcgraph6
|
|
||||||
libcgroup1
|
|
||||||
libcilkrts5
|
|
||||||
libclang-common-9-dev
|
|
||||||
libclang-cpp9
|
|
||||||
libcolord2
|
|
||||||
libcomerr2
|
|
||||||
libcommon-sense-perl
|
|
||||||
libcroco3
|
|
||||||
libcryptsetup4
|
|
||||||
libcups2
|
|
||||||
libcurl3
|
|
||||||
libcurl3-gnutls
|
|
||||||
libdatrie1
|
|
||||||
libdb5.3
|
|
||||||
libdbus-1-3
|
|
||||||
libdbus-glib-1-2
|
|
||||||
libdbusmenu-glib4
|
|
||||||
libdbusmenu-gtk3-4
|
|
||||||
libdconf1
|
|
||||||
libdebconfclient0
|
|
||||||
libdevmapper-event1.02.1
|
|
||||||
libdevmapper1.02.1
|
|
||||||
libdjvulibre-dev
|
|
||||||
libdjvulibre-text
|
|
||||||
libdjvulibre21
|
|
||||||
libdns-export162
|
|
||||||
libdns162
|
|
||||||
libdpkg-perl
|
|
||||||
libdrm-amdgpu1
|
|
||||||
libdrm-common
|
|
||||||
libdrm-intel1
|
|
||||||
libdrm-nouveau2
|
|
||||||
libdrm-radeon1
|
|
||||||
libdrm2
|
|
||||||
libdumbnet1
|
|
||||||
libdw1
|
|
||||||
libeatmydata1
|
|
||||||
libedit2
|
|
||||||
libefivar0
|
|
||||||
libegl1-mesa
|
|
||||||
libelf1
|
|
||||||
libenchant1c2a
|
|
||||||
libencode-locale-perl
|
|
||||||
libepoxy0
|
|
||||||
liberror-perl
|
|
||||||
libestr0
|
|
||||||
libevent-2.0-5
|
|
||||||
libevent-core-2.0-5
|
|
||||||
libevent-pthreads-2.0-5
|
|
||||||
libexif-dev
|
|
||||||
libexif12
|
|
||||||
libexpat1
|
|
||||||
libexpat1-dev
|
|
||||||
libfakeroot
|
|
||||||
libfbclient2
|
|
||||||
libfcgi-perl
|
|
||||||
libfdisk1
|
|
||||||
libffi-dev
|
|
||||||
libffi6
|
|
||||||
libfftw3-double3
|
|
||||||
libfile-basedir-perl
|
|
||||||
libfile-desktopentry-perl
|
|
||||||
libfile-listing-perl
|
|
||||||
libfile-mimeinfo-perl
|
|
||||||
libfl-dev
|
|
||||||
libfont-afm-perl
|
|
||||||
libfontconfig1
|
|
||||||
libfontconfig1-dev
|
|
||||||
libfontenc1
|
|
||||||
libfreetype6
|
|
||||||
libfreetype6-dev
|
|
||||||
libfribidi0
|
|
||||||
libfuse2
|
|
||||||
libgbm-dev
|
|
||||||
libgbm1
|
|
||||||
libgc1c2
|
|
||||||
libgcc-5-dev
|
|
||||||
libgcc-9-dev
|
|
||||||
libgcc1
|
|
||||||
libgconf-2-4
|
|
||||||
libgcrypt20
|
|
||||||
libgd3
|
|
||||||
libgdbm3
|
|
||||||
libgdiplus
|
|
||||||
libgdk-pixbuf2.0-0
|
|
||||||
libgdk-pixbuf2.0-common
|
|
||||||
libgdk-pixbuf2.0-dev
|
|
||||||
libgeoip1
|
|
||||||
libgflags2v5
|
|
||||||
libgfortran-5-dev
|
|
||||||
libgfortran-9-dev
|
|
||||||
libgfortran3
|
|
||||||
libgfortran5
|
|
||||||
libgif7
|
|
||||||
libgirepository-1.0-1
|
|
||||||
libgl1-mesa-dri
|
|
||||||
libgl1-mesa-glx
|
|
||||||
libglade2-0
|
|
||||||
libglade2.0-cil
|
|
||||||
libglapi-mesa
|
|
||||||
libglib2.0-0
|
|
||||||
libglib2.0-bin
|
|
||||||
libglib2.0-cil
|
|
||||||
libglib2.0-data
|
|
||||||
libglib2.0-dev
|
|
||||||
libgmp-dev
|
|
||||||
libgmp10
|
|
||||||
libgmpxx4ldbl
|
|
||||||
libgnutls-openssl27
|
|
||||||
libgnutls30
|
|
||||||
libgomp1
|
|
||||||
libgoogle-glog0v5
|
|
||||||
libgpg-error0
|
|
||||||
libgpm2
|
|
||||||
libgraphite2-3
|
|
||||||
libgraphviz-dev
|
|
||||||
libgsl-dev
|
|
||||||
libgsl2
|
|
||||||
libgssapi-krb5-2
|
|
||||||
libgssapi3-heimdal
|
|
||||||
libgtk-3-0
|
|
||||||
libgtk-3-bin
|
|
||||||
libgtk-3-common
|
|
||||||
libgtk2.0-0
|
|
||||||
libgtk2.0-cil
|
|
||||||
libgtk2.0-common
|
|
||||||
libgvc6
|
|
||||||
libgvc6-plugins-gtk
|
|
||||||
libgvpr2
|
|
||||||
libharfbuzz0b
|
|
||||||
libhavege1
|
|
||||||
libhcrypto4-heimdal
|
|
||||||
libheimbase1-heimdal
|
|
||||||
libheimntlm0-heimdal
|
|
||||||
libhogweed4
|
|
||||||
libhtml-form-perl
|
|
||||||
libhtml-format-perl
|
|
||||||
libhtml-parser-perl
|
|
||||||
libhtml-tagset-perl
|
|
||||||
libhtml-template-perl
|
|
||||||
libhtml-tree-perl
|
|
||||||
libhttp-cookies-perl
|
|
||||||
libhttp-daemon-perl
|
|
||||||
libhttp-date-perl
|
|
||||||
libhttp-message-perl
|
|
||||||
libhttp-negotiate-perl
|
|
||||||
libhunspell-1.3-0
|
|
||||||
libhx509-5-heimdal
|
|
||||||
libice-dev
|
|
||||||
libice6
|
|
||||||
libicu-dev
|
|
||||||
libicu55
|
|
||||||
libicu65
|
|
||||||
libidn11
|
|
||||||
libilmbase-dev
|
|
||||||
libilmbase12
|
|
||||||
libio-html-perl
|
|
||||||
libio-socket-ssl-perl
|
|
||||||
libipc-system-simple-perl
|
|
||||||
libisc-export160
|
|
||||||
libisc160
|
|
||||||
libisccc140
|
|
||||||
libisccfg140
|
|
||||||
libisl15
|
|
||||||
libisoburn1
|
|
||||||
libisofs6
|
|
||||||
libitm1
|
|
||||||
libjasper-dev
|
|
||||||
libjasper1
|
|
||||||
libjbig-dev
|
|
||||||
libjbig0
|
|
||||||
libjpeg-dev
|
|
||||||
libjpeg-turbo8
|
|
||||||
libjpeg-turbo8-dev
|
|
||||||
libjpeg8
|
|
||||||
libjpeg8-dev
|
|
||||||
libjs-jquery
|
|
||||||
libjson-c2
|
|
||||||
libjson-glib-1.0-0
|
|
||||||
libjson-glib-1.0-common
|
|
||||||
libjson-perl
|
|
||||||
libjson-xs-perl
|
|
||||||
libjte1
|
|
||||||
libk5crypto3
|
|
||||||
libkeyutils1
|
|
||||||
libklibc
|
|
||||||
libkmod2
|
|
||||||
libkrb5-26-heimdal
|
|
||||||
libkrb5-3
|
|
||||||
libkrb5support0
|
|
||||||
libksba8
|
|
||||||
liblapack-dev
|
|
||||||
liblapack3
|
|
||||||
liblcms2-2
|
|
||||||
liblcms2-dev
|
|
||||||
libldap-2.4-2
|
|
||||||
libldb1
|
|
||||||
liblldb-9
|
|
||||||
libllvm6.0
|
|
||||||
libllvm9
|
|
||||||
liblmdb0
|
|
||||||
liblocale-gettext-perl
|
|
||||||
liblqr-1-0
|
|
||||||
liblqr-1-0-dev
|
|
||||||
liblsan0
|
|
||||||
libltdl-dev
|
|
||||||
libltdl7
|
|
||||||
liblttng-ust-ctl2
|
|
||||||
liblttng-ust0
|
|
||||||
liblua5.1-0
|
|
||||||
liblua5.2-0
|
|
||||||
liblvm2app2.2
|
|
||||||
liblvm2cmd2.02
|
|
||||||
liblwp-mediatypes-perl
|
|
||||||
liblwp-protocol-https-perl
|
|
||||||
liblwres141
|
|
||||||
liblxc1
|
|
||||||
liblz4-1
|
|
||||||
liblzma-dev
|
|
||||||
liblzma5
|
|
||||||
liblzo2-2
|
|
||||||
libmagic-dev
|
|
||||||
libmagic1
|
|
||||||
libmagickcore-6-arch-config
|
|
||||||
libmagickcore-6-headers
|
|
||||||
libmagickcore-6.q16-2
|
|
||||||
libmagickcore-6.q16-2-extra
|
|
||||||
libmagickcore-6.q16-dev
|
|
||||||
libmagickcore-dev
|
|
||||||
libmagickwand-6-headers
|
|
||||||
libmagickwand-6.q16-2
|
|
||||||
libmagickwand-6.q16-dev
|
|
||||||
libmagickwand-dev
|
|
||||||
libmailtools-perl
|
|
||||||
libmcrypt4
|
|
||||||
libmediainfo0v5
|
|
||||||
libmemcached11
|
|
||||||
libmirclient9
|
|
||||||
libmircommon7
|
|
||||||
libmircore1
|
|
||||||
libmirprotobuf3
|
|
||||||
libmms0
|
|
||||||
libmnl0
|
|
||||||
libmono-2.0-1
|
|
||||||
libmono-2.0-dev
|
|
||||||
libmono-accessibility4.0-cil
|
|
||||||
libmono-cairo4.0-cil
|
|
||||||
libmono-cecil-private-cil
|
|
||||||
libmono-cil-dev
|
|
||||||
libmono-codecontracts4.0-cil
|
|
||||||
libmono-compilerservices-symbolwriter4.0-cil
|
|
||||||
libmono-corlib4.5-cil
|
|
||||||
libmono-cscompmgd0.0-cil
|
|
||||||
libmono-csharp4.0c-cil
|
|
||||||
libmono-custommarshalers4.0-cil
|
|
||||||
libmono-data-tds4.0-cil
|
|
||||||
libmono-db2-1.0-cil
|
|
||||||
libmono-debugger-soft4.0a-cil
|
|
||||||
libmono-http4.0-cil
|
|
||||||
libmono-i18n-cjk4.0-cil
|
|
||||||
libmono-i18n-mideast4.0-cil
|
|
||||||
libmono-i18n-other4.0-cil
|
|
||||||
libmono-i18n-rare4.0-cil
|
|
||||||
libmono-i18n-west4.0-cil
|
|
||||||
libmono-i18n4.0-all
|
|
||||||
libmono-i18n4.0-cil
|
|
||||||
libmono-ldap4.0-cil
|
|
||||||
libmono-management4.0-cil
|
|
||||||
libmono-messaging-rabbitmq4.0-cil
|
|
||||||
libmono-messaging4.0-cil
|
|
||||||
libmono-microsoft-build-engine4.0-cil
|
|
||||||
libmono-microsoft-build-framework4.0-cil
|
|
||||||
libmono-microsoft-build-tasks-v4.0-4.0-cil
|
|
||||||
libmono-microsoft-build-utilities-v4.0-4.0-cil
|
|
||||||
libmono-microsoft-build4.0-cil
|
|
||||||
libmono-microsoft-csharp4.0-cil
|
|
||||||
libmono-microsoft-visualc10.0-cil
|
|
||||||
libmono-microsoft-web-infrastructure1.0-cil
|
|
||||||
libmono-oracle4.0-cil
|
|
||||||
libmono-parallel4.0-cil
|
|
||||||
libmono-peapi4.0a-cil
|
|
||||||
libmono-posix4.0-cil
|
|
||||||
libmono-profiler
|
|
||||||
libmono-rabbitmq4.0-cil
|
|
||||||
libmono-relaxng4.0-cil
|
|
||||||
libmono-security4.0-cil
|
|
||||||
libmono-sharpzip4.84-cil
|
|
||||||
libmono-simd4.0-cil
|
|
||||||
libmono-smdiagnostics0.0-cil
|
|
||||||
libmono-sqlite4.0-cil
|
|
||||||
libmono-system-componentmodel-composition4.0-cil
|
|
||||||
libmono-system-componentmodel-dataannotations4.0-cil
|
|
||||||
libmono-system-configuration-install4.0-cil
|
|
||||||
libmono-system-configuration4.0-cil
|
|
||||||
libmono-system-core4.0-cil
|
|
||||||
libmono-system-data-datasetextensions4.0-cil
|
|
||||||
libmono-system-data-entity4.0-cil
|
|
||||||
libmono-system-data-linq4.0-cil
|
|
||||||
libmono-system-data-services-client4.0-cil
|
|
||||||
libmono-system-data-services4.0-cil
|
|
||||||
libmono-system-data4.0-cil
|
|
||||||
libmono-system-deployment4.0-cil
|
|
||||||
libmono-system-design4.0-cil
|
|
||||||
libmono-system-drawing-design4.0-cil
|
|
||||||
libmono-system-drawing4.0-cil
|
|
||||||
libmono-system-dynamic4.0-cil
|
|
||||||
libmono-system-enterpriseservices4.0-cil
|
|
||||||
libmono-system-identitymodel-selectors4.0-cil
|
|
||||||
libmono-system-identitymodel4.0-cil
|
|
||||||
libmono-system-io-compression-filesystem4.0-cil
|
|
||||||
libmono-system-io-compression4.0-cil
|
|
||||||
libmono-system-json-microsoft4.0-cil
|
|
||||||
libmono-system-json4.0-cil
|
|
||||||
libmono-system-ldap-protocols4.0-cil
|
|
||||||
libmono-system-ldap4.0-cil
|
|
||||||
libmono-system-management4.0-cil
|
|
||||||
libmono-system-messaging4.0-cil
|
|
||||||
libmono-system-net-http-formatting4.0-cil
|
|
||||||
libmono-system-net-http-webrequest4.0-cil
|
|
||||||
libmono-system-net-http4.0-cil
|
|
||||||
libmono-system-net4.0-cil
|
|
||||||
libmono-system-numerics-vectors4.0-cil
|
|
||||||
libmono-system-numerics4.0-cil
|
|
||||||
libmono-system-reactive-core2.2-cil
|
|
||||||
libmono-system-reactive-debugger2.2-cil
|
|
||||||
libmono-system-reactive-experimental2.2-cil
|
|
||||||
libmono-system-reactive-interfaces2.2-cil
|
|
||||||
libmono-system-reactive-linq2.2-cil
|
|
||||||
libmono-system-reactive-observable-aliases0.0-cil
|
|
||||||
libmono-system-reactive-platformservices2.2-cil
|
|
||||||
libmono-system-reactive-providers2.2-cil
|
|
||||||
libmono-system-reactive-runtime-remoting2.2-cil
|
|
||||||
libmono-system-reactive-windows-forms2.2-cil
|
|
||||||
libmono-system-reactive-windows-threading2.2-cil
|
|
||||||
libmono-system-reflection-context4.0-cil
|
|
||||||
libmono-system-runtime-caching4.0-cil
|
|
||||||
libmono-system-runtime-durableinstancing4.0-cil
|
|
||||||
libmono-system-runtime-serialization-formatters-soap4.0-cil
|
|
||||||
libmono-system-runtime-serialization4.0-cil
|
|
||||||
libmono-system-runtime4.0-cil
|
|
||||||
libmono-system-security4.0-cil
|
|
||||||
libmono-system-servicemodel-activation4.0-cil
|
|
||||||
libmono-system-servicemodel-discovery4.0-cil
|
|
||||||
libmono-system-servicemodel-internals0.0-cil
|
|
||||||
libmono-system-servicemodel-routing4.0-cil
|
|
||||||
libmono-system-servicemodel-web4.0-cil
|
|
||||||
libmono-system-servicemodel4.0a-cil
|
|
||||||
libmono-system-serviceprocess4.0-cil
|
|
||||||
libmono-system-threading-tasks-dataflow4.0-cil
|
|
||||||
libmono-system-transactions4.0-cil
|
|
||||||
libmono-system-web-abstractions4.0-cil
|
|
||||||
libmono-system-web-applicationservices4.0-cil
|
|
||||||
libmono-system-web-dynamicdata4.0-cil
|
|
||||||
libmono-system-web-extensions-design4.0-cil
|
|
||||||
libmono-system-web-extensions4.0-cil
|
|
||||||
libmono-system-web-http-selfhost4.0-cil
|
|
||||||
libmono-system-web-http-webhost4.0-cil
|
|
||||||
libmono-system-web-http4.0-cil
|
|
||||||
libmono-system-web-mobile4.0-cil
|
|
||||||
libmono-system-web-mvc3.0-cil
|
|
||||||
libmono-system-web-razor2.0-cil
|
|
||||||
libmono-system-web-regularexpressions4.0-cil
|
|
||||||
libmono-system-web-routing4.0-cil
|
|
||||||
libmono-system-web-services4.0-cil
|
|
||||||
libmono-system-web-webpages-deployment2.0-cil
|
|
||||||
libmono-system-web-webpages-razor2.0-cil
|
|
||||||
libmono-system-web-webpages2.0-cil
|
|
||||||
libmono-system-web4.0-cil
|
|
||||||
libmono-system-windows-forms-datavisualization4.0a-cil
|
|
||||||
libmono-system-windows-forms4.0-cil
|
|
||||||
libmono-system-windows4.0-cil
|
|
||||||
libmono-system-workflow-activities4.0-cil
|
|
||||||
libmono-system-workflow-componentmodel4.0-cil
|
|
||||||
libmono-system-workflow-runtime4.0-cil
|
|
||||||
libmono-system-xaml4.0-cil
|
|
||||||
libmono-system-xml-linq4.0-cil
|
|
||||||
libmono-system-xml-serialization4.0-cil
|
|
||||||
libmono-system-xml4.0-cil
|
|
||||||
libmono-system4.0-cil
|
|
||||||
libmono-tasklets4.0-cil
|
|
||||||
libmono-webbrowser4.0-cil
|
|
||||||
libmono-webmatrix-data4.0-cil
|
|
||||||
libmono-windowsbase4.0-cil
|
|
||||||
libmono-xbuild-tasks4.0-cil
|
|
||||||
libmonoboehm-2.0-1
|
|
||||||
libmonosgen-2.0-1
|
|
||||||
libmonosgen-2.0-dev
|
|
||||||
libmount1
|
|
||||||
libmpc3
|
|
||||||
libmpdec2
|
|
||||||
libmpfr4
|
|
||||||
libmpx0
|
|
||||||
libmspack0
|
|
||||||
libmysqlclient-dev
|
|
||||||
libmysqlclient20
|
|
||||||
libncurses5
|
|
||||||
libncurses5-dev
|
|
||||||
libncursesw5
|
|
||||||
libnet-dbus-perl
|
|
||||||
libnet-http-perl
|
|
||||||
libnet-smtp-ssl-perl
|
|
||||||
libnet-ssleay-perl
|
|
||||||
libnetfilter-conntrack3
|
|
||||||
libnettle6
|
|
||||||
libnewt0.52
|
|
||||||
libnfnetlink0
|
|
||||||
libnih-dbus1
|
|
||||||
libnih1
|
|
||||||
libnorm1
|
|
||||||
libnotify4
|
|
||||||
libnpth0
|
|
||||||
libnspr4
|
|
||||||
libnss3
|
|
||||||
libnss3-nssdb
|
|
||||||
libnuma1
|
|
||||||
libobjc-5-dev
|
|
||||||
libobjc4
|
|
||||||
libodbc1
|
|
||||||
libogg0
|
|
||||||
libomp-9-dev
|
|
||||||
libomp5-9
|
|
||||||
libonig2
|
|
||||||
libopenexr-dev
|
|
||||||
libopenexr22
|
|
||||||
libp11-kit0
|
|
||||||
libpam-modules
|
|
||||||
libpam-modules-bin
|
|
||||||
libpam-runtime
|
|
||||||
libpam-systemd
|
|
||||||
libpam0g
|
|
||||||
libpango-1.0-0
|
|
||||||
libpangocairo-1.0-0
|
|
||||||
libpangoft2-1.0-0
|
|
||||||
libpaper-utils
|
|
||||||
libpaper1
|
|
||||||
libparted2
|
|
||||||
libpathplan4
|
|
||||||
libpcap0.8
|
|
||||||
libpci3
|
|
||||||
libpciaccess0
|
|
||||||
libpcre16-3
|
|
||||||
libpcre2-16-0
|
|
||||||
libpcre2-32-0
|
|
||||||
libpcre2-8-0
|
|
||||||
libpcre2-dev
|
|
||||||
libpcre2-posix2
|
|
||||||
libpcre3
|
|
||||||
libpcre3-dev
|
|
||||||
libpcre32-3
|
|
||||||
libpcrecpp0v5
|
|
||||||
libperl5.22
|
|
||||||
libpfm4
|
|
||||||
libpgm-5.2-0
|
|
||||||
libpipeline1
|
|
||||||
libpixman-1-0
|
|
||||||
libpixman-1-dev
|
|
||||||
libplymouth4
|
|
||||||
libpng12-0
|
|
||||||
libpng12-dev
|
|
||||||
libpolkit-agent-1-0
|
|
||||||
libpolkit-backend-1-0
|
|
||||||
libpolkit-gobject-1-0
|
|
||||||
libpopt0
|
|
||||||
libpq-dev
|
|
||||||
libpq5
|
|
||||||
libprocps4
|
|
||||||
libprotobuf-lite9v5
|
|
||||||
libproxy1v5
|
|
||||||
libpthread-stubs0-dev
|
|
||||||
libpython-dev
|
|
||||||
libpython-stdlib
|
|
||||||
libpython2.7
|
|
||||||
libpython2.7-dev
|
|
||||||
libpython2.7-minimal
|
|
||||||
libpython2.7-stdlib
|
|
||||||
libpython3-dev
|
|
||||||
libpython3-stdlib
|
|
||||||
libpython3.5
|
|
||||||
libpython3.5-dev
|
|
||||||
libpython3.5-minimal
|
|
||||||
libpython3.5-stdlib
|
|
||||||
libqdbm14
|
|
||||||
libquadmath0
|
|
||||||
librabbitmq4
|
|
||||||
libre2-1v5
|
|
||||||
libreadline-dev
|
|
||||||
libreadline5
|
|
||||||
libreadline6
|
|
||||||
libreadline6-dev
|
|
||||||
librecode0
|
|
||||||
librest-0.7-0
|
|
||||||
libroken18-heimdal
|
|
||||||
librpm3
|
|
||||||
librpmbuild3
|
|
||||||
librpmio3
|
|
||||||
librpmsign3
|
|
||||||
librsvg2-2
|
|
||||||
librsvg2-common
|
|
||||||
librsvg2-dev
|
|
||||||
librtmp1
|
|
||||||
libruby2.3
|
|
||||||
libsasl2-2
|
|
||||||
libsasl2-modules
|
|
||||||
libsasl2-modules-db
|
|
||||||
libsctp1
|
|
||||||
libseccomp2
|
|
||||||
libsecret-1-0
|
|
||||||
libsecret-1-dev
|
|
||||||
libsecret-common
|
|
||||||
libselinux1
|
|
||||||
libsemanage-common
|
|
||||||
libsemanage1
|
|
||||||
libsensors4
|
|
||||||
libsepol1
|
|
||||||
libserf-1-1
|
|
||||||
libsigsegv2
|
|
||||||
libslang2
|
|
||||||
libsm-dev
|
|
||||||
libsm6
|
|
||||||
libsmartcols1
|
|
||||||
libsnmp-base
|
|
||||||
libsnmp30
|
|
||||||
libsodium23
|
|
||||||
libsoup-gnome2.4-1
|
|
||||||
libsoup2.4-1
|
|
||||||
libsqlite3-0
|
|
||||||
libsqlite3-dev
|
|
||||||
libss2
|
|
||||||
libssh2-1
|
|
||||||
libssl-dev
|
|
||||||
libssl-doc
|
|
||||||
libssl1.0.0
|
|
||||||
libssl1.1
|
|
||||||
libstdc++-5-dev
|
|
||||||
libstdc++-9-dev
|
|
||||||
libstdc++6
|
|
||||||
libstemmer0d
|
|
||||||
libsvn1
|
|
||||||
libsybdb5
|
|
||||||
libsystemd0
|
|
||||||
libtalloc2
|
|
||||||
libtasn1-6
|
|
||||||
libtbb2
|
|
||||||
libtcl8.6
|
|
||||||
libtcltk-ruby
|
|
||||||
libtdb1
|
|
||||||
libtevent0
|
|
||||||
libtext-charwidth-perl
|
|
||||||
libtext-iconv-perl
|
|
||||||
libtext-unidecode-perl
|
|
||||||
libtext-wrapi18n-perl
|
|
||||||
libthai-data
|
|
||||||
libthai0
|
|
||||||
libtidy5deb1
|
|
||||||
libtie-ixhash-perl
|
|
||||||
libtiff5
|
|
||||||
libtiff5-dev
|
|
||||||
libtiffxx5
|
|
||||||
libtimedate-perl
|
|
||||||
libtinfo-dev
|
|
||||||
libtinfo5
|
|
||||||
libtinyxml2-2v5
|
|
||||||
libtk8.6
|
|
||||||
libtool
|
|
||||||
libtsan0
|
|
||||||
libtypes-serialiser-perl
|
|
||||||
libubsan0
|
|
||||||
libubsan1
|
|
||||||
libucl1
|
|
||||||
libudev1
|
|
||||||
libunwind8
|
|
||||||
liburcu4
|
|
||||||
liburi-perl
|
|
||||||
libusb-0.1-4
|
|
||||||
libusb-1.0-0
|
|
||||||
libustr-1.0-1
|
|
||||||
libutempter0
|
|
||||||
libuuid1
|
|
||||||
libvorbis0a
|
|
||||||
libvorbisfile3
|
|
||||||
libvpx3
|
|
||||||
libvulkan1
|
|
||||||
libwayland-client0
|
|
||||||
libwayland-cursor0
|
|
||||||
libwayland-egl1-mesa
|
|
||||||
libwayland-server0
|
|
||||||
libwbclient0
|
|
||||||
libwind0-heimdal
|
|
||||||
libwmf-dev
|
|
||||||
libwmf0.2-7
|
|
||||||
libwrap0
|
|
||||||
libwww-perl
|
|
||||||
libwww-robotrules-perl
|
|
||||||
libwxbase3.0-0v5
|
|
||||||
libwxgtk3.0-0v5
|
|
||||||
libx11-6
|
|
||||||
libx11-data
|
|
||||||
libx11-dev
|
|
||||||
libx11-protocol-perl
|
|
||||||
libx11-xcb1
|
|
||||||
libxau-dev
|
|
||||||
libxau6
|
|
||||||
libxaw7
|
|
||||||
libxcb-dri2-0
|
|
||||||
libxcb-dri3-0
|
|
||||||
libxcb-glx0
|
|
||||||
libxcb-present0
|
|
||||||
libxcb-render0
|
|
||||||
libxcb-render0-dev
|
|
||||||
libxcb-shape0
|
|
||||||
libxcb-shm0
|
|
||||||
libxcb-shm0-dev
|
|
||||||
libxcb-sync1
|
|
||||||
libxcb-xfixes0
|
|
||||||
libxcb1
|
|
||||||
libxcb1-dev
|
|
||||||
libxcomposite1
|
|
||||||
libxcursor1
|
|
||||||
libxdamage1
|
|
||||||
libxdmcp-dev
|
|
||||||
libxdmcp6
|
|
||||||
libxdot4
|
|
||||||
libxext-dev
|
|
||||||
libxext6
|
|
||||||
libxfixes3
|
|
||||||
libxfont1
|
|
||||||
libxft-dev
|
|
||||||
libxft2
|
|
||||||
libxi6
|
|
||||||
libxinerama1
|
|
||||||
libxkbcommon0
|
|
||||||
libxkbfile-dev
|
|
||||||
libxkbfile1
|
|
||||||
libxml-libxml-perl
|
|
||||||
libxml-namespacesupport-perl
|
|
||||||
libxml-parser-perl
|
|
||||||
libxml-sax-base-perl
|
|
||||||
libxml-sax-perl
|
|
||||||
libxml-twig-perl
|
|
||||||
libxml-xpathengine-perl
|
|
||||||
libxml2
|
|
||||||
libxml2-dev
|
|
||||||
libxmlrpc-epi0
|
|
||||||
libxmlsec1
|
|
||||||
libxmlsec1-openssl
|
|
||||||
libxmu6
|
|
||||||
libxmuu1
|
|
||||||
libxpm4
|
|
||||||
libxrandr2
|
|
||||||
libxrender-dev
|
|
||||||
libxrender1
|
|
||||||
libxshmfence1
|
|
||||||
libxslt1.1
|
|
||||||
libxss1
|
|
||||||
libxt-dev
|
|
||||||
libxt6
|
|
||||||
libxtables11
|
|
||||||
libxtst6
|
|
||||||
libxv1
|
|
||||||
libxxf86dga1
|
|
||||||
libxxf86vm1
|
|
||||||
libyaml-0-2
|
|
||||||
libz3-dev
|
|
||||||
libzen0v5
|
|
||||||
libzip4
|
|
||||||
libzmq5
|
|
||||||
libzstd1
|
|
||||||
python3-oauthlib
|
|
||||||
@@ -38,6 +38,7 @@ get_api_version() {
|
|||||||
7.3) echo "20180731" ;;
|
7.3) echo "20180731" ;;
|
||||||
7.4) echo "20190902" ;;
|
7.4) echo "20190902" ;;
|
||||||
8.0) echo "20200930" ;;
|
8.0) echo "20200930" ;;
|
||||||
|
8.1) echo "20210902" ;;
|
||||||
*) get_api_version_from_repo ;;
|
*) get_api_version_from_repo ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -68,7 +69,7 @@ extension_dir_darwin() {
|
|||||||
|
|
||||||
extension_dir_linux() {
|
extension_dir_linux() {
|
||||||
api_version=$1
|
api_version=$1
|
||||||
if [[ "${version:?}" =~ ${old_versions:?}|${nightly_versions:?} ]]; then
|
if [[ "${version:?}" =~ ${old_versions:?} ]]; then
|
||||||
echo "/usr/local/php/$version/lib/php/extensions/no-debug-non-zts-$api_version"
|
echo "/usr/local/php/$version/lib/php/extensions/no-debug-non-zts-$api_version"
|
||||||
else
|
else
|
||||||
echo "/usr/lib/php/$api_version"
|
echo "/usr/lib/php/$api_version"
|
||||||
@@ -77,8 +78,7 @@ extension_dir_linux() {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
old_versions="5.[3-5]"
|
old_versions="5.[3-5]"
|
||||||
nightly_versions="8.[1-9]"
|
date='20211217'
|
||||||
date='20210703'
|
|
||||||
if [ "$os" = "Linux" ]; then
|
if [ "$os" = "Linux" ]; then
|
||||||
. /etc/lsb-release
|
. /etc/lsb-release
|
||||||
os=$os-$DISTRIB_CODENAME
|
os=$os-$DISTRIB_CODENAME
|
||||||
@@ -89,14 +89,13 @@ data() {
|
|||||||
api_version=$(get_api_version)
|
api_version=$(get_api_version)
|
||||||
dir=$(extension_dir_darwin "$api_version")
|
dir=$(extension_dir_darwin "$api_version")
|
||||||
sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
|
sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
|
||||||
date='20210707'
|
|
||||||
else
|
else
|
||||||
os="Windows"
|
os="Windows"
|
||||||
dir='C:\\tools\\php\\ext'
|
dir='C:\\tools\\php\\ext'
|
||||||
[[ "$extensions" == *"imagick"* ]] && date='20210512'
|
|
||||||
fi
|
fi
|
||||||
key="$os"-ext-"$version"-$(echo -n "$extensions-$key" | openssl dgst -sha256 | cut -d ' ' -f 2)
|
job="${GITHUB_REPOSITORY}-${GITHUB_WORKFLOW}-${GITHUB_JOB}"
|
||||||
key="$key-$date"
|
key="$(echo -n "$extensions-$key-$job" | openssl dgst -sha256 | cut -d ' ' -f 2)"
|
||||||
|
key="$os"-"$version"-"$key"-"$date"
|
||||||
echo "$dir" > "${RUNNER_TEMP:?}"/dir
|
echo "$dir" > "${RUNNER_TEMP:?}"/dir
|
||||||
echo "$key" > "${RUNNER_TEMP:?}"/key
|
echo "$key" > "${RUNNER_TEMP:?}"/key
|
||||||
echo "::set-output name=dir::$dir"
|
echo "::set-output name=dir::$dir"
|
||||||
|
|||||||
@@ -23,11 +23,25 @@ add_brew_tap() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_dependencies() {
|
||||||
|
extension=$1
|
||||||
|
list_deps="$(grep "$extension" "${script_dir:?}"/../lists/darwin-deps | cut -d '=' -f 2)"
|
||||||
|
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' ' ')"
|
||||||
|
fi
|
||||||
|
deps=()
|
||||||
|
[[ -n "${list_deps[*]}" ]] && deps+=("${list_deps[@]}")
|
||||||
|
[[ -n "${formula_deps[*]}" ]] && deps+=("${formula_deps[@]}")
|
||||||
|
echo "${deps[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
filter_extensions() {
|
filter_extensions() {
|
||||||
extensions_array=("$@")
|
extensions_array=("$@")
|
||||||
filtered_extensions=()
|
filtered_extensions=()
|
||||||
for ext in "${extensions_array[@]}"; do
|
for ext in "${extensions_array[@]}"; do
|
||||||
if grep -i -q -w "$ext" "${script_dir:?}"/../lists/darwin-extensions; then
|
if grep -i -q -w "$ext" "${script_dir:?}"/../lists/darwin-extensions ||
|
||||||
|
grep -q "$ext=" "${script_dir:?}"/../lists/darwin-deps; then
|
||||||
filtered_extensions+=("$ext")
|
filtered_extensions+=("$ext")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -40,7 +54,7 @@ setup_extensions_helper() {
|
|||||||
extension_dir=$3
|
extension_dir=$3
|
||||||
cached_extension="${deps_cache_directory:?}/$dependency_extension.so"
|
cached_extension="${deps_cache_directory:?}/$dependency_extension.so"
|
||||||
if ! [ -e "$cached_extension" ]; then
|
if ! [ -e "$cached_extension" ]; then
|
||||||
brew install "$dependency_extension@${version:?}"
|
brew install "$dependency_extension@$version"
|
||||||
sudo find "$brew_cellar/$dependency_extension@${version:?}" -name "$dependency_extension.so" -exec cp {} "$cached_extension" \;
|
sudo find "$brew_cellar/$dependency_extension@${version:?}" -name "$dependency_extension.so" -exec cp {} "$cached_extension" \;
|
||||||
else
|
else
|
||||||
echo "Found $dependency_extension extension in cache"
|
echo "Found $dependency_extension extension in cache"
|
||||||
@@ -66,11 +80,9 @@ setup_extensions() {
|
|||||||
add_library_helper() {
|
add_library_helper() {
|
||||||
dep_name=$1
|
dep_name=$1
|
||||||
cache_dir=$2
|
cache_dir=$2
|
||||||
sudo cp -R "$brew_cellar/$dep_name" "$cache_dir/"
|
|
||||||
sudo chmod -R 777 "$cache_dir/$dep_name"
|
|
||||||
echo "$dep_name" | sudo tee -a "$cache_dir"/list >/dev/null 2>&1
|
echo "$dep_name" | sudo tee -a "$cache_dir"/list >/dev/null 2>&1
|
||||||
(
|
(
|
||||||
cd "$cache_dir" || exit 1
|
cd "$brew_cellar" || exit 1
|
||||||
if command -v gtar >/dev/null; then
|
if command -v gtar >/dev/null; then
|
||||||
sudo gtar -I "zstd -T0" -cf "$cache_dir"/"$dep_name".tar.zst "$dep_name"
|
sudo gtar -I "zstd -T0" -cf "$cache_dir"/"$dep_name".tar.zst "$dep_name"
|
||||||
else
|
else
|
||||||
@@ -90,16 +102,17 @@ add_library() {
|
|||||||
to_wait+=($!)
|
to_wait+=($!)
|
||||||
done
|
done
|
||||||
wait "${to_wait[@]}"
|
wait "${to_wait[@]}"
|
||||||
sudo rm -R -- "${cache_dir:?}"/*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
restore_library_helper() {
|
restore_library_helper() {
|
||||||
dep_name=$1
|
dep_name=$1
|
||||||
cache_dir=$2
|
cache_dir=$2
|
||||||
if command -v gtar >/dev/null; then
|
if ! [ -d "$brew_cellar/$dep_name" ]; then
|
||||||
sudo gtar -I "zstd -d" -xf "$cache_dir"/"$dep_name".tar.zst -C "$brew_cellar"
|
if command -v gtar >/dev/null; then
|
||||||
else
|
sudo gtar -I "zstd -d" -xf "$cache_dir"/"$dep_name".tar.zst -C "$brew_cellar"
|
||||||
sudo zstd -dq "$cache_dir"/"$dep_name".tar.zst && sudo tar -xf "$cache_dir"/"$dep_name".tar -C "$brew_cellar"
|
else
|
||||||
|
sudo zstd -dq "$cache_dir"/"$dep_name".tar.zst && sudo tar -xf "$cache_dir"/"$dep_name".tar -C "$brew_cellar"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if ! [ -d "$brew_prefix/opt/$dep_name" ]; then
|
if ! [ -d "$brew_prefix/opt/$dep_name" ]; then
|
||||||
brew link --force --overwrite "$dep_name" 2>/dev/null || true
|
brew link --force --overwrite "$dep_name" 2>/dev/null || true
|
||||||
@@ -121,7 +134,7 @@ setup_libraries() {
|
|||||||
shift 1
|
shift 1
|
||||||
libraries_array=("$@")
|
libraries_array=("$@")
|
||||||
ext_deps_dir="$deps_cache_directory/$extension"
|
ext_deps_dir="$deps_cache_directory/$extension"
|
||||||
sudo cp -a "$tap_dir"/shivammathur/homebrew-extensions/.github/deps/"$extension"/*.rb "$tap_dir"/homebrew/homebrew-core/Formula/
|
sudo cp -a "$tap_dir"/"$ext_tap"/.github/deps/"$extension"/*.rb "$tap_dir"/"$core_tap"/Formula/ 2>/dev/null || true
|
||||||
sudo mkdir -p "$ext_deps_dir"
|
sudo mkdir -p "$ext_deps_dir"
|
||||||
echo "::group::Logs to set up libraries required for $extension"
|
echo "::group::Logs to set up libraries required for $extension"
|
||||||
for lib in "${libraries_array[@]}"; do
|
for lib in "${libraries_array[@]}"; do
|
||||||
@@ -143,17 +156,19 @@ setup_dependencies() {
|
|||||||
IFS=' ' read -r -a extensions_array <<<"$(echo "$extensions" | sed -e "s/pdo[_-]//g" -Ee "s/^|,\s*/ /g")"
|
IFS=' ' read -r -a extensions_array <<<"$(echo "$extensions" | sed -e "s/pdo[_-]//g" -Ee "s/^|,\s*/ /g")"
|
||||||
IFS=' ' read -r -a extensions_array <<<"$(filter_extensions "${extensions_array[@]}")"
|
IFS=' ' read -r -a extensions_array <<<"$(filter_extensions "${extensions_array[@]}")"
|
||||||
if [[ -n "${extensions_array[*]// /}" ]]; then
|
if [[ -n "${extensions_array[*]// /}" ]]; then
|
||||||
add_brew_tap "shivammathur/homebrew-php"
|
add_brew_tap "$php_tap"
|
||||||
add_brew_tap "shivammathur/homebrew-extensions"
|
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
|
||||||
for extension in "${extensions_array[@]}"; do
|
for extension in "${extensions_array[@]}"; do
|
||||||
IFS=' ' read -r -a dependency_array <<<"$(grep "depends_on" "$tap_dir/shivammathur/homebrew-extensions/Formula/$extension@$version.rb" | cut -d '"' -f 2 | tr '\n' ' ')"
|
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' ' ')"
|
IFS=' ' read -r -a extension_array <<<"$(echo "${dependency_array[@]}" | grep -Eo "[a-z]*@" | sed 's/@//' | tr '\n' ' ')"
|
||||||
IFS=' ' read -r -a libraries_array <<<"${dependency_array[@]//shivammathur*/}"
|
IFS=' ' read -r -a libraries_array <<<"${dependency_array[@]//shivammathur*/}"
|
||||||
if [[ -n "${libraries_array[*]// /}" ]]; then
|
if [[ -n "${libraries_array[*]// /}" ]]; then
|
||||||
step_log "Setup libraries for $extension"
|
step_log "Setup libraries for $extension"
|
||||||
setup_libraries "$extension" "${libraries_array[@]}"
|
setup_libraries "$extension" "${libraries_array[@]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${extension_array[*]// /}" ]]; then
|
if [[ -n "${extension_array[*]// /}" ]] && [ "${skip_dependency_extensions:=}" != "true" ]; then
|
||||||
step_log "Setup extensions for $extension"
|
step_log "Setup extensions for $extension"
|
||||||
setup_extensions "$extension" "$extension_dir" "${extension_array[@]}"
|
setup_extensions "$extension" "$extension_dir" "${extension_array[@]}"
|
||||||
fi
|
fi
|
||||||
@@ -169,3 +184,6 @@ export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
|||||||
brew_prefix="$(brew --prefix)"
|
brew_prefix="$(brew --prefix)"
|
||||||
brew_cellar="$brew_prefix/Cellar"
|
brew_cellar="$brew_prefix/Cellar"
|
||||||
tap_dir="$(brew --repository)"/Library/Taps
|
tap_dir="$(brew --repository)"/Library/Taps
|
||||||
|
core_tap=homebrew/homebrew-core
|
||||||
|
php_tap=shivammathur/homebrew-php
|
||||||
|
ext_tap=shivammathur/homebrew-extensions
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ link_apt_fast() {
|
|||||||
|
|
||||||
fetch_package() {
|
fetch_package() {
|
||||||
if ! [ -e /tmp/Packages ]; then
|
if ! [ -e /tmp/Packages ]; then
|
||||||
. /etc/lsb-release
|
. /etc/os-release
|
||||||
deb_build_arch=$(dpkg-architecture -q DEB_BUILD_ARCH)
|
deb_build_arch=$(dpkg-architecture -q DEB_BUILD_ARCH)
|
||||||
curl -o /tmp/Packages.gz -sL "http://ppa.launchpad.net/ondrej/php/ubuntu/dists/$DISTRIB_CODENAME/main/binary-$deb_build_arch/Packages.gz"
|
curl -o /tmp/Packages.gz -sL "http://ppa.launchpad.net/ondrej/php/ubuntu/dists/$VERSION_CODENAME/main/binary-$deb_build_arch/Packages.gz"
|
||||||
gzip -df /tmp/Packages.gz
|
gzip -df /tmp/Packages.gz
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,12 @@ fetch_package() {
|
|||||||
get_dependencies() {
|
get_dependencies() {
|
||||||
package=$1
|
package=$1
|
||||||
prefix=$2
|
prefix=$2
|
||||||
sed -e '/Package:\s'"$package$"'/,/^\s*$/!d' /tmp/Packages | grep -Eo "^Depends.*" | tr ',' '\n' | awk -v ORS='' '/^\s'"$prefix"'/{print$0}' | sed -e 's/([^()]*)//g' | sort | uniq | xargs echo -n
|
list_deps="$(grep "${package#*-}" "${script_dir:?}"/../lists/linux-deps | cut -d '=' -f 2 | grep -Eo "$prefix.*")"
|
||||||
|
package_deps="$(sed -e '/Package:\s'"$package$"'/,/^\s*$/!d' /tmp/Packages | grep -Eo "^Depends.*" | tr ',' '\n' | awk -v ORS='' '/^\s'"$prefix"'/{print$0}' | sed -e 's/([^()]*)//g' | sort | uniq | xargs echo -n)"
|
||||||
|
deps=()
|
||||||
|
[[ -n "${list_deps[*]}" ]] && deps+=("${list_deps[@]}")
|
||||||
|
[[ -n "${package_deps[*]}" ]] && deps+=("${package_deps[@]}")
|
||||||
|
echo "${deps[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_package_link() {
|
get_package_link() {
|
||||||
@@ -58,7 +63,7 @@ setup_extensions() {
|
|||||||
filter_libraries() {
|
filter_libraries() {
|
||||||
libraries="$(echo "$1" | xargs -n1 | sort | uniq | xargs)"
|
libraries="$(echo "$1" | xargs -n1 | sort | uniq | xargs)"
|
||||||
for library in $libraries; do
|
for library in $libraries; do
|
||||||
if grep -i -q -w "$library" "${script_dir:?}"/../lists/"$DISTRIB_CODENAME"-libs; then
|
if grep -i -q -w "$library" "${script_dir:?}"/../lists/"$VERSION_CODENAME"-libs; then
|
||||||
libraries=${libraries//$library/}
|
libraries=${libraries//$library/}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -88,20 +93,25 @@ setup_dependencies() {
|
|||||||
extension_dir=$2
|
extension_dir=$2
|
||||||
[[ -z "${extensions// }" ]] && return
|
[[ -z "${extensions// }" ]] && return
|
||||||
IFS=' ' read -r -a extensions_array <<<"$(echo "$extensions" | sed -e "s/pdo[_-]//g" -Ee "s/^|,\s*/ php$version-/g")"
|
IFS=' ' read -r -a extensions_array <<<"$(echo "$extensions" | sed -e "s/pdo[_-]//g" -Ee "s/^|,\s*/ php$version-/g")"
|
||||||
. /etc/lsb-release
|
. /etc/os-release
|
||||||
sudo rm -rf "${ext_config_directory:?}" || true
|
sudo rm -rf "${ext_config_directory:?}" || true
|
||||||
libraries=""
|
libraries=""
|
||||||
extension_packages=""
|
extension_packages=""
|
||||||
for extension_package in "${extensions_array[@]}"; do
|
for extension_package in "${extensions_array[@]}"; do
|
||||||
fetch_package
|
fetch_package
|
||||||
libraries="$libraries $(get_dependencies "$extension_package" "lib")"
|
libraries="$libraries $(get_dependencies "$extension_package" "lib")"
|
||||||
extension_packages="$extension_packages $(get_dependencies "$extension_package" "php$version-")"
|
IFS=' ' read -r -a dependency_extension_packages_array <<<"$(get_dependencies "$extension_package" "php$version-")"
|
||||||
|
extension_packages="$extension_packages ${dependency_extension_packages_array[*]}"
|
||||||
extension_packages="${extension_packages//php$version-common/}"
|
extension_packages="${extension_packages//php$version-common/}"
|
||||||
|
for dependency_extension in "${dependency_extension_packages_array[@]}"; do
|
||||||
|
mkdir -p "$ext_config_directory/${extension_package#*-}"
|
||||||
|
add_config "${extension_package#*-}" "$dependency_extension"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
if [[ -n "${libraries// /}" ]]; then
|
if [[ -n "${libraries// /}" ]]; then
|
||||||
setup_libraries "$libraries"
|
setup_libraries "$libraries"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${extension_packages// /}" ]]; then
|
if [[ -n "${extension_packages// /}" ]] && [ "${skip_dependency_extensions:=}" != "true" ]; then
|
||||||
setup_extensions "$extension_dir" "${extension_packages//php$version-/}"
|
setup_extensions "$extension_dir" "${extension_packages//php$version-/}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
62
src/utils.ts
62
src/utils.ts
@@ -1,75 +1,17 @@
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as core from '@actions/core';
|
import * as spu from 'setup-php/lib/utils';
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to read environment variable and return a string value.
|
|
||||||
*
|
|
||||||
* @param property
|
|
||||||
*/
|
|
||||||
export async function readEnv(property: string): Promise<string> {
|
|
||||||
const value = process.env[property];
|
|
||||||
switch (value) {
|
|
||||||
case undefined:
|
|
||||||
return '';
|
|
||||||
default:
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to get inputs from both with and env annotations.
|
|
||||||
*
|
|
||||||
* @param name
|
|
||||||
* @param mandatory
|
|
||||||
*/
|
|
||||||
export async function getInput(
|
|
||||||
name: string,
|
|
||||||
mandatory: boolean
|
|
||||||
): Promise<string> {
|
|
||||||
const input = core.getInput(name);
|
|
||||||
const env_input = await readEnv(name);
|
|
||||||
switch (true) {
|
|
||||||
case input != '':
|
|
||||||
return input;
|
|
||||||
case input == '' && env_input != '':
|
|
||||||
return env_input;
|
|
||||||
case input == '' && env_input == '' && mandatory:
|
|
||||||
throw new Error(`Input required and not supplied: ${name}`);
|
|
||||||
default:
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to get outputs
|
* Function to get outputs
|
||||||
*/
|
*/
|
||||||
export async function getOutput(output: string): Promise<string> {
|
export async function getOutput(output: string): Promise<string> {
|
||||||
return fs.readFileSync(
|
return fs.readFileSync(
|
||||||
path.join(await readEnv('RUNNER_TEMP'), output),
|
path.join(await spu.readEnv('RUNNER_TEMP'), output),
|
||||||
'utf8'
|
'utf8'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to parse PHP version.
|
|
||||||
*
|
|
||||||
* @param version
|
|
||||||
*/
|
|
||||||
export async function parseVersion(version: string): Promise<string> {
|
|
||||||
switch (version) {
|
|
||||||
case 'latest':
|
|
||||||
return '7.4';
|
|
||||||
default:
|
|
||||||
switch (true) {
|
|
||||||
case version.length > 1:
|
|
||||||
return version.slice(0, 3);
|
|
||||||
default:
|
|
||||||
return version + '.0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to filter extensions
|
* Function to filter extensions
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"lib": [
|
"lib": [
|
||||||
"ESNext"
|
"ESNext"
|
||||||
|
|||||||
Reference in New Issue
Block a user