setup-php 2.12.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +977 -936
- package/package.json +66 -56
- package/src/config.ts +82 -82
- package/src/configs/brew_extensions +30 -0
- package/src/configs/os_releases.csv +17 -0
- package/src/configs/php-versions.json +6 -5
- package/src/configs/{php.json → pm/php.json} +29 -29
- package/src/configs/{phpunit.json → pm/phpunit.json} +24 -24
- package/src/configs/tools.json +256 -234
- package/src/configs/tools_schema.json +114 -103
- package/src/coverage.ts +169 -142
- package/src/extensions.ts +363 -349
- package/src/install.ts +79 -82
- package/src/scripts/common.sh +366 -314
- package/src/scripts/darwin.sh +257 -248
- package/src/scripts/ext/blackfire.ps1 +32 -32
- package/src/scripts/ext/blackfire.sh +22 -21
- package/src/scripts/ext/couchbase.sh +43 -43
- package/src/scripts/ext/cubrid.sh +60 -60
- package/src/scripts/ext/extension_map.php +109 -0
- package/src/scripts/ext/firebird.ps1 +19 -19
- package/src/scripts/ext/firebird.sh +39 -35
- package/src/scripts/ext/gearman.sh +22 -22
- package/src/scripts/ext/geos.sh +17 -17
- package/src/scripts/ext/http.ps1 +54 -54
- package/src/scripts/ext/http.sh +120 -120
- package/src/scripts/ext/intl.sh +23 -23
- package/src/scripts/ext/ioncube.ps1 +33 -32
- package/src/scripts/ext/ioncube.sh +21 -19
- package/src/scripts/ext/oci.ps1 +60 -60
- package/src/scripts/ext/oci.sh +65 -63
- package/src/scripts/ext/patches/firebird.sh +11 -11
- package/src/scripts/ext/patches/geos.sh +7 -7
- package/src/scripts/ext/patches/http.sh +11 -11
- package/src/scripts/ext/patches/pdo_oci.sh +6 -6
- package/src/scripts/ext/patches/phpize.sh +26 -26
- package/src/scripts/ext/patches/protobuf.sh +4 -4
- package/src/scripts/ext/phalcon.ps1 +54 -55
- package/src/scripts/ext/phalcon.sh +59 -59
- package/src/scripts/ext/source.sh +144 -144
- package/src/scripts/linux.sh +239 -280
- package/src/scripts/tools/add_tools.ps1 +28 -25
- package/src/scripts/tools/add_tools.sh +27 -19
- package/src/scripts/tools/blackfire.ps1 +19 -21
- package/src/scripts/tools/blackfire.sh +40 -35
- package/src/scripts/tools/grpc_php_plugin.ps1 +21 -21
- package/src/scripts/tools/grpc_php_plugin.sh +58 -61
- package/src/scripts/tools/ppa.sh +189 -0
- package/src/scripts/tools/protoc.ps1 +38 -38
- package/src/scripts/tools/protoc.sh +28 -28
- package/src/scripts/win32.ps1 +566 -471
- package/src/tools.ts +538 -509
- package/src/utils.ts +503 -497
- package/.eslintrc.json +0 -16
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/CONTRIBUTING.md +0 -70
- package/.github/FUNDING.yml +0 -7
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -42
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -37
- package/.github/SECURITY.md +0 -29
- package/.github/workflows/docs.yml +0 -77
- package/.github/workflows/node-workflow.yml +0 -51
- package/.github/workflows/workflow.yml +0 -78
- package/.idea/workspace.xml +0 -113
- package/.prettierrc.json +0 -12
- package/__tests__/config.test.ts +0 -52
- package/__tests__/coverage.test.ts +0 -110
- package/__tests__/extensions.test.ts +0 -261
- package/__tests__/install.test.ts +0 -175
- package/__tests__/tools.test.ts +0 -490
- package/__tests__/utils.test.ts +0 -303
- package/action.yml +0 -29
- package/dist/index.js +0 -3001
- package/examples/bedrock.yml +0 -32
- package/examples/blackfire-player.yml +0 -31
- package/examples/blackfire.yml +0 -31
- package/examples/cakephp-mysql.yml +0 -114
- package/examples/cakephp-postgres.yml +0 -112
- package/examples/cakephp.yml +0 -92
- package/examples/codeigniter.yml +0 -34
- package/examples/laravel-mysql.yml +0 -74
- package/examples/laravel-postgres.yml +0 -74
- package/examples/laravel.yml +0 -42
- package/examples/lumen-mysql.yml +0 -74
- package/examples/lumen-postgres.yml +0 -74
- package/examples/lumen.yml +0 -38
- package/examples/phalcon-mysql.yml +0 -74
- package/examples/phalcon-postgres.yml +0 -73
- package/examples/sage.yml +0 -57
- package/examples/slim-framework.yml +0 -34
- package/examples/symfony-mysql.yml +0 -57
- package/examples/symfony-postgres.yml +0 -55
- package/examples/symfony.yml +0 -39
- package/examples/yii2-mysql.yml +0 -73
- package/examples/yii2-postgres.yml +0 -71
- package/examples/zend-framework.yml +0 -36
- package/jest.config.js +0 -12
- package/lib/config.js +0 -72
- package/lib/config.js.map +0 -1
- package/lib/coverage.js +0 -88
- package/lib/coverage.js.map +0 -1
- package/lib/extensions.js +0 -201
- package/lib/extensions.js.map +0 -1
- package/lib/install.js +0 -82
- package/lib/install.js.map +0 -1
- package/lib/sapi.js +0 -64
- package/lib/tools.js +0 -387
- package/lib/tools.js.map +0 -1
- package/lib/utils.js +0 -292
- package/lib/utils.js.map +0 -1
- package/tsconfig.json +0 -18
package/src/install.ts
CHANGED
|
@@ -1,82 +1,79 @@
|
|
|
1
|
-
import {exec} from '@actions/exec';
|
|
2
|
-
import * as core from '@actions/core';
|
|
3
|
-
import * as config from './config';
|
|
4
|
-
import * as coverage from './coverage';
|
|
5
|
-
import * as extensions from './extensions';
|
|
6
|
-
import * as tools from './tools';
|
|
7
|
-
import * as utils from './utils';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Build the script
|
|
11
|
-
*
|
|
12
|
-
* @param filename
|
|
13
|
-
* @param version
|
|
14
|
-
* @param os_version
|
|
15
|
-
*/
|
|
16
|
-
export async function getScript(
|
|
17
|
-
filename: string,
|
|
18
|
-
version: string,
|
|
19
|
-
os_version: string
|
|
20
|
-
): Promise<string> {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
(
|
|
79
|
-
|
|
80
|
-
})().catch(error => {
|
|
81
|
-
core.setFailed(error.message);
|
|
82
|
-
});
|
|
1
|
+
import {exec} from '@actions/exec';
|
|
2
|
+
import * as core from '@actions/core';
|
|
3
|
+
import * as config from './config';
|
|
4
|
+
import * as coverage from './coverage';
|
|
5
|
+
import * as extensions from './extensions';
|
|
6
|
+
import * as tools from './tools';
|
|
7
|
+
import * as utils from './utils';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Build the script
|
|
11
|
+
*
|
|
12
|
+
* @param filename
|
|
13
|
+
* @param version
|
|
14
|
+
* @param os_version
|
|
15
|
+
*/
|
|
16
|
+
export async function getScript(
|
|
17
|
+
filename: string,
|
|
18
|
+
version: string,
|
|
19
|
+
os_version: string
|
|
20
|
+
): Promise<string> {
|
|
21
|
+
const url = 'https://setup-php.com/sponsor';
|
|
22
|
+
// taking inputs
|
|
23
|
+
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
|
|
24
|
+
const extension_csv: string = await utils.getInput('extensions', false);
|
|
25
|
+
const ini_values_csv: string = await utils.getInput('ini-values', false);
|
|
26
|
+
const coverage_driver: string = await utils.getInput('coverage', false);
|
|
27
|
+
const tools_csv: string = await utils.getInput('tools', false);
|
|
28
|
+
|
|
29
|
+
let script: string = await utils.readFile(filename, 'src/scripts');
|
|
30
|
+
script += await tools.addTools(tools_csv, version, os_version);
|
|
31
|
+
if (extension_csv) {
|
|
32
|
+
script += await extensions.addExtension(extension_csv, version, os_version);
|
|
33
|
+
}
|
|
34
|
+
if (coverage_driver) {
|
|
35
|
+
script += await coverage.addCoverage(coverage_driver, version, os_version);
|
|
36
|
+
}
|
|
37
|
+
if (ini_values_csv) {
|
|
38
|
+
script += await config.addINIValues(ini_values_csv, os_version);
|
|
39
|
+
}
|
|
40
|
+
script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os_version));
|
|
41
|
+
script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os_version));
|
|
42
|
+
|
|
43
|
+
return await utils.writeScript(filename, script);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Run the script
|
|
48
|
+
*/
|
|
49
|
+
export async function run(): Promise<void> {
|
|
50
|
+
try {
|
|
51
|
+
if ((await utils.readEnv('ImageOS')) == 'ubuntu16') {
|
|
52
|
+
core.setFailed(
|
|
53
|
+
'setup-php is not supported on Ubuntu 16.04. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452'
|
|
54
|
+
);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const version: string = await utils.parseVersion(
|
|
58
|
+
await utils.getInput('php-version', true)
|
|
59
|
+
);
|
|
60
|
+
if (version) {
|
|
61
|
+
const os_version: string = process.platform;
|
|
62
|
+
const tool = await utils.scriptTool(os_version);
|
|
63
|
+
const script = os_version + (await utils.scriptExtension(os_version));
|
|
64
|
+
const location = await getScript(script, version, os_version);
|
|
65
|
+
await exec(await utils.joins(tool, location, version, __dirname));
|
|
66
|
+
} else {
|
|
67
|
+
core.setFailed('Unable to get the PHP version');
|
|
68
|
+
}
|
|
69
|
+
} catch (error) {
|
|
70
|
+
core.setFailed((error as Error).message);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// call the run function
|
|
75
|
+
(async () => {
|
|
76
|
+
await run();
|
|
77
|
+
})().catch(error => {
|
|
78
|
+
core.setFailed(error.message);
|
|
79
|
+
});
|