mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-11 23:34:07 +07:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
dcffe28928 | |||
6ffdb3d118 | |||
c97dacbacf | |||
34f574e7aa | |||
317a051dea | |||
dfcda83968 | |||
96d7cf331d | |||
baed2d33b8 | |||
1398cb4c9f | |||
462e7103e4 | |||
8582cb12d5 | |||
ec406be512 | |||
36a27b0262 | |||
ea2f858afe | |||
507ff06e8d | |||
629475b7b3 | |||
521f2e5b93 | |||
259d177178 |
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
|
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@ -101,11 +101,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.repository }}.wiki
|
repository: ${{ github.repository }}.wiki
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v5
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/lists
|
path: ${{ github.workspace }}/lists
|
||||||
pattern: lists-*
|
pattern: lists-*
|
||||||
|
4
.github/workflows/node.yml
vendored
4
.github/workflows/node.yml
vendored
@ -29,12 +29,12 @@ jobs:
|
|||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: Setup Node.js 20.x
|
- name: Setup Node.js 20.x
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
|
|
||||||
|
2
.github/workflows/php.yml
vendored
2
.github/workflows/php.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
|||||||
key: cache-v5
|
key: cache-v5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup cache environment
|
- name: Setup cache environment
|
||||||
id: cache-env
|
id: cache-env
|
||||||
|
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@ -19,16 +19,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout release
|
- name: Checkout release
|
||||||
if: github.event_name != 'workflow_dispatch'
|
if: github.event_name != 'workflow_dispatch'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Checkout tag
|
- name: Checkout tag
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
if: github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'workflow_dispatch'
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.tag }}
|
ref: ${{ github.event.inputs.tag }}
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: '20.x'
|
node-version: '20.x'
|
||||||
registry-url: https://registry.npmjs.org
|
registry-url: https://registry.npmjs.org
|
||||||
@ -46,7 +46,7 @@ jobs:
|
|||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Change to GitHub Packages registry
|
- name: Change to GitHub Packages registry
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
registry-url: https://npm.pkg.github.com
|
registry-url: https://npm.pkg.github.com
|
||||||
scope: '@shivammathur'
|
scope: '@shivammathur'
|
||||||
|
@ -742,7 +742,7 @@ act -P ubuntu-22.04=shivammathur/node:2204
|
|||||||
|
|
||||||
- To enable JIT, enable `opcache` in cli mode by setting `opcache.enable_cli=1`.
|
- To enable JIT, enable `opcache` in cli mode by setting `opcache.enable_cli=1`.
|
||||||
- JIT conflicts with `Xdebug`, `PCOV`, and other extensions which override `zend_execute_ex` function, so set `coverage: none` and disable any such extension if added.
|
- JIT conflicts with `Xdebug`, `PCOV`, and other extensions which override `zend_execute_ex` function, so set `coverage: none` and disable any such extension if added.
|
||||||
- By default, `opcache.jit=1235` and `opcache.jit_buffer_size=256M` are set which can be changed using `ini-values` input.
|
- By default, `opcache.jit=1235` and `opcache.jit_buffer_size=256M` (`opcache.jit_buffer_size=128M` on ARM-based environments) are set which can be changed using `ini-values` input.
|
||||||
- For detailed information about JIT related directives refer to the [`official PHP documentation`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.jit "opcache.jit documentation").
|
- For detailed information about JIT related directives refer to the [`official PHP documentation`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.jit "opcache.jit documentation").
|
||||||
|
|
||||||
For example to enable JIT in `tracing` mode with buffer size of `64 MB`.
|
For example to enable JIT in `tracing` mode with buffer size of `64 MB`.
|
||||||
|
@ -332,6 +332,12 @@ describe('Tools tests', () => {
|
|||||||
${'preview'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
|
${'preview'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
|
||||||
${'1'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
|
${'1'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
|
||||||
${'2'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
|
${'2'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
|
||||||
|
${'latest'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
|
||||||
|
${'stable'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
|
||||||
|
${'snapshot'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-snapshot.phar'} | ${'https://getcomposer.org/composer.phar'}
|
||||||
|
${'preview'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
|
||||||
|
${'1'} | ${'7.4'} | ${'false'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
|
||||||
|
${'2'} | ${'7.4'} | ${'false'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
|
||||||
${'latest'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
${'latest'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
${'stable'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
${'stable'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
${'snapshot'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-snapshot.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
${'snapshot'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-snapshot.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
|
||||||
@ -395,7 +401,7 @@ describe('Tools tests', () => {
|
|||||||
[
|
[
|
||||||
'blackfire, blackfire-player, box, churn, cs2pr, flex, grpc_php_plugin, mago, name-collision-detector, parallel-lint, php-cs-fixer, php-scoper, phpDocumentor, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, phpunit-bridge, phpunit-polyfills, pint, php-config, phpize, protoc, symfony, vapor, wp, pie',
|
'blackfire, blackfire-player, box, churn, cs2pr, flex, grpc_php_plugin, mago, name-collision-detector, parallel-lint, php-cs-fixer, php-scoper, phpDocumentor, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, phpunit-bridge, phpunit-polyfills, pint, php-config, phpize, protoc, symfony, vapor, wp, pie',
|
||||||
[
|
[
|
||||||
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
||||||
'add_blackfire',
|
'add_blackfire',
|
||||||
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
|
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
|
||||||
'add_tool https://github.com/box-project/box/releases/latest/download/box.phar box "--version"',
|
'add_tool https://github.com/box-project/box/releases/latest/download/box.phar box "--version"',
|
||||||
@ -440,7 +446,7 @@ describe('Tools tests', () => {
|
|||||||
[
|
[
|
||||||
'backward-compatibility-check, behat, blackfire, blackfire-player, churn, composer-dependency-analyser, composer-normalize, composer-require-checker, composer-unused, cs2pr:1.2.3, ecs, flex, grpc_php_plugin:1.2.3, infection, mago:0.26.1, name-collision-detector, phan, phan:1.2.3, phing:1.2.3, phinx, phive:1.2.3, php-config, phpcbf, phpcpd, phpcs, phpdoc, phpize, phpmd, phpspec, phpunit-bridge:5.6, phpunit-polyfills:1.0.1, protoc:v1.2.3, psalm, rector, symfony-cli, vapor-cli, wp-cli, pie',
|
'backward-compatibility-check, behat, blackfire, blackfire-player, churn, composer-dependency-analyser, composer-normalize, composer-require-checker, composer-unused, cs2pr:1.2.3, ecs, flex, grpc_php_plugin:1.2.3, infection, mago:0.26.1, name-collision-detector, phan, phan:1.2.3, phing:1.2.3, phinx, phive:1.2.3, php-config, phpcbf, phpcpd, phpcs, phpdoc, phpize, phpmd, phpspec, phpunit-bridge:5.6, phpunit-polyfills:1.0.1, protoc:v1.2.3, psalm, rector, symfony-cli, vapor-cli, wp-cli, pie',
|
||||||
[
|
[
|
||||||
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
||||||
'add_composer_tool behat behat behat/ scoped',
|
'add_composer_tool behat behat behat/ scoped',
|
||||||
'add_blackfire',
|
'add_blackfire',
|
||||||
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
|
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
|
||||||
@ -492,7 +498,7 @@ describe('Tools tests', () => {
|
|||||||
[
|
[
|
||||||
'blackfire, blackfire-player:1.2.3, cs2pr, churn, deployer, does_not_exist, flex, mago, name-collision-detector, phinx, phive:0.13.2, php-config, phpize, phpmd, simple-phpunit, symfony, wp, pie',
|
'blackfire, blackfire-player:1.2.3, cs2pr, churn, deployer, does_not_exist, flex, mago, name-collision-detector, phinx, phive:0.13.2, php-config, phpize, phpmd, simple-phpunit, symfony, wp, pie',
|
||||||
[
|
[
|
||||||
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
|
||||||
'Add-Blackfire',
|
'Add-Blackfire',
|
||||||
'blackfire-player is not a windows tool',
|
'blackfire-player is not a windows tool',
|
||||||
'Add-Tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
|
'Add-Tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
|
||||||
@ -524,7 +530,7 @@ describe('Tools tests', () => {
|
|||||||
[
|
[
|
||||||
'composer:v1, codeception/codeception, prestissimo, hirak/prestissimo, composer-prefetcher, narrowspark/automatic-composer-prefetcher, phinx: 1.2, robmorgan/phinx: ^1.2, user/tool:1.2.3, user/tool:~1.2',
|
'composer:v1, codeception/codeception, prestissimo, hirak/prestissimo, composer-prefetcher, narrowspark/automatic-composer-prefetcher, phinx: 1.2, robmorgan/phinx: ^1.2, user/tool:1.2.3, user/tool:~1.2',
|
||||||
[
|
[
|
||||||
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer',
|
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://artifacts.setup-php.com/composer/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer',
|
||||||
'Add-ComposerTool codeception codeception codeception/ global',
|
'Add-ComposerTool codeception codeception codeception/ global',
|
||||||
'Add-ComposerTool prestissimo prestissimo hirak/ global',
|
'Add-ComposerTool prestissimo prestissimo hirak/ global',
|
||||||
'Add-ComposerTool automatic-composer-prefetcher automatic-composer-prefetcher narrowspark/ global',
|
'Add-ComposerTool automatic-composer-prefetcher automatic-composer-prefetcher narrowspark/ global',
|
||||||
@ -573,10 +579,10 @@ describe('Tools tests', () => {
|
|||||||
it.each`
|
it.each`
|
||||||
tools_csv | script
|
tools_csv | script
|
||||||
${'none'} | ${''}
|
${'none'} | ${''}
|
||||||
${'none, phpunit'} | ${'\nstep_log "Setup Tools"\nadd_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer latest\n\nadd_tool https://phar.phpunit.de/phpunit-7.4.0.phar,https://phar.phpunit.de/phpunit-7.phar phpunit "--version"'}
|
${'none, phpunit'} | ${'\nstep_log "Setup Tools"\nadd_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer latest\n\nadd_tool https://phar.phpunit.de/phpunit-7.4.0.phar,https://phar.phpunit.de/phpunit-7.phar phpunit "--version"'}
|
||||||
${'composer:preview'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-preview.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar,https://getcomposer.org/composer-preview.phar composer preview'}
|
${'composer:preview'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-preview.phar,https://artifacts.setup-php.com/composer/composer-7.4-preview.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar,https://getcomposer.org/composer-preview.phar composer preview'}
|
||||||
${'composer, composer:v1'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer'}
|
${'composer, composer:v1'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://artifacts.setup-php.com/composer/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer'}
|
||||||
${'composer:v1, composer:preview, composer:snapshot'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-snapshot.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-snapshot.phar,https://getcomposer.org/composer.phar composer snapshot'}
|
${'composer:v1, composer:preview, composer:snapshot'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-snapshot.phar,https://artifacts.setup-php.com/composer/composer-7.4-snapshot.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-snapshot.phar,https://getcomposer.org/composer.phar composer snapshot'}
|
||||||
`('checking composer setup: $tools_csv', async ({tools_csv, script}) => {
|
`('checking composer setup: $tools_csv', async ({tools_csv, script}) => {
|
||||||
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
|
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
|
||||||
});
|
});
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
606
package-lock.json
generated
606
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "2.35.3",
|
"version": "2.35.5",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Setup PHP for use with GitHub Actions",
|
"description": "Setup PHP for use with GitHub Actions",
|
||||||
"main": "lib/install.js",
|
"main": "lib/install.js",
|
||||||
@ -41,21 +41,21 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/compat": "^1.3.2",
|
"@eslint/compat": "^1.3.2",
|
||||||
"@eslint/js": "9.33.0",
|
"@eslint/js": "9.35.0",
|
||||||
"@types/jest": "^30.0.0",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/node": "^24.2.1",
|
"@types/node": "^24.3.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
||||||
"@typescript-eslint/parser": "^8.39.0",
|
"@typescript-eslint/parser": "^8.43.0",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"eslint": "9.33.0",
|
"eslint": "9.35.0",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
"eslint-plugin-jest": "^29.0.1",
|
"eslint-plugin-jest": "^29.0.1",
|
||||||
"eslint-plugin-prettier": "^5.5.4",
|
"eslint-plugin-prettier": "^5.5.4",
|
||||||
"globals": "^16.3.0",
|
"globals": "^16.3.0",
|
||||||
"jest": "^30.0.5",
|
"jest": "^30.1.3",
|
||||||
"jest-circus": "^30.0.5",
|
"jest-circus": "^30.1.3",
|
||||||
"nock": "^14.0.9",
|
"nock": "^14.0.10",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"simple-git-hooks": "^2.13.1",
|
"simple-git-hooks": "^2.13.1",
|
||||||
"ts-jest": "^29.4.1",
|
"ts-jest": "^29.4.1",
|
||||||
|
3
src/configs/ini/jit_aarch64.ini
Normal file
3
src/configs/ini/jit_aarch64.ini
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
opcache.enable=1
|
||||||
|
opcache.jit_buffer_size=128M
|
||||||
|
opcache.jit=1235
|
@ -59,10 +59,10 @@ export async function setEnv(): Promise<void> {
|
|||||||
* Run the script
|
* Run the script
|
||||||
*/
|
*/
|
||||||
export async function run(): Promise<void> {
|
export async function run(): Promise<void> {
|
||||||
|
await setEnv();
|
||||||
const os: string = process.platform;
|
const os: string = process.platform;
|
||||||
const tool = await utils.scriptTool(os);
|
const tool = await utils.scriptTool(os);
|
||||||
const run_path = await getScript(os);
|
const run_path = await getScript(os);
|
||||||
await setEnv();
|
|
||||||
await exec(tool + run_path);
|
await exec(tool + run_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,9 +134,9 @@ patch_brew() {
|
|||||||
update_dependencies() {
|
update_dependencies() {
|
||||||
patch_brew
|
patch_brew
|
||||||
if ! [ -e /tmp/update_dependencies ]; then
|
if ! [ -e /tmp/update_dependencies ]; then
|
||||||
for repo in "$brew_repo" "$core_repo"; do
|
for repo in "$brew_repo" "${core_repo:?}"; do
|
||||||
if [ -e "$repo" ]; then
|
if [ -e "$repo" ]; then
|
||||||
git_retry -C "$repo" fetch origin master && git -C "$repo" reset --hard origin/master
|
git_retry -C "$repo" fetch origin main && git -C "$repo" reset --hard origin/main
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo '' | sudo tee /tmp/update_dependencies >/dev/null 2>&1
|
echo '' | sudo tee /tmp/update_dependencies >/dev/null 2>&1
|
||||||
|
@ -11,13 +11,14 @@ install_icu() {
|
|||||||
# Function to add ext-intl with the given version of ICU
|
# Function to add ext-intl with the given version of ICU
|
||||||
add_intl() {
|
add_intl() {
|
||||||
icu=$(echo "$1" | cut -d'-' -f 2)
|
icu=$(echo "$1" | cut -d'-' -f 2)
|
||||||
supported_version=$(get -s -n "" https://api.github.com/repos/shivammathur/icu-intl/releases | grep -Po "${icu//./\\.}" | head -n 1)
|
supported_version=$(get -s -n "" https://api.github.com/repos/shivammathur/icu-intl/releases/tags/intl-"$icu" | grep -Po "php${version?}-intl-$icu" | head -n 1)
|
||||||
if [ "$icu" != "$supported_version" ]; then
|
[ -z "$supported_version" ] && supported_version=$(get -s -n "" https://github.com/shivammathur/icu-intl/releases/expanded_assets/intl-"$icu" | grep -Po "php$version-intl-$icu" | head -n 1)
|
||||||
add_log "${cross:?}" "intl" "ICU $icu is not supported"
|
if [ "php$version-intl-$icu" != "$supported_version" ]; then
|
||||||
|
add_log "${cross:?}" "intl" "ICU $icu is not supported for PHP $version"
|
||||||
else
|
else
|
||||||
[ "${ts:?}" = 'zts' ] && suffix='-zts'
|
[ "${ts:?}" = 'zts' ] && suffix='-zts'
|
||||||
install_icu "$icu" >/dev/null 2>&1
|
install_icu "$icu" >/dev/null 2>&1
|
||||||
get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl/php${version:?}-intl-$icu$suffix$arch_suffix.so"
|
get -q -n "${ext_dir:?}/intl.so" "https://github.com/shivammathur/icu-intl/releases/download/intl-$icu/php${version:?}-intl-$icu$suffix$arch_suffix.so"
|
||||||
enable_extension intl extension
|
enable_extension intl extension
|
||||||
add_extension_log intl "Installed and enabled with ICU $icu"
|
add_extension_log intl "Installed and enabled with ICU $icu"
|
||||||
fi
|
fi
|
||||||
|
@ -200,7 +200,11 @@ add_tool() {
|
|||||||
elif [ -e /tmp/"$tool" ]; then
|
elif [ -e /tmp/"$tool" ]; then
|
||||||
sudo cp -a /tmp/"$tool" "$tool_path"
|
sudo cp -a /tmp/"$tool" "$tool_path"
|
||||||
fi
|
fi
|
||||||
add_log "$cross" "$tool" "Could not setup $tool"
|
if [ "$status_code" = "404" ]; then
|
||||||
|
add_log "$cross" "$tool" "Failed to download $tool from ${url[*]}"
|
||||||
|
else
|
||||||
|
add_log "$cross" "$tool" "Could not setup $tool"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ add_brew() {
|
|||||||
brew_prefix="$(get_brew_prefix)"
|
brew_prefix="$(get_brew_prefix)"
|
||||||
if ! [ -d "$brew_prefix"/bin ]; then
|
if ! [ -d "$brew_prefix"/bin ]; then
|
||||||
step_log "Setup Brew"
|
step_log "Setup Brew"
|
||||||
get -s "" "/tmp/install.sh" "https://raw.githubusercontent.com/Homebrew/install/master/install.sh" | bash -s >/dev/null 2>&1
|
get -s "" "/tmp/install.sh" "https://raw.githubusercontent.com/Homebrew/install/main/install.sh" | bash -s >/dev/null 2>&1
|
||||||
add_log "${tick:?}" "Brew" "Installed Homebrew"
|
add_log "${tick:?}" "Brew" "Installed Homebrew"
|
||||||
fi
|
fi
|
||||||
add_brew_bins_to_path "$brew_prefix"
|
add_brew_bins_to_path "$brew_prefix"
|
||||||
|
@ -66,10 +66,14 @@ update_lists() {
|
|||||||
|
|
||||||
# Function to get fingerprint from an Ubuntu PPA.
|
# Function to get fingerprint from an Ubuntu PPA.
|
||||||
ubuntu_fingerprint() {
|
ubuntu_fingerprint() {
|
||||||
ppa=$1
|
ppa="$1"
|
||||||
get -s -n "" "${lp_api[@]/%//~${ppa%/*}/+archive/${ppa##*/}}" | jq -r '.signing_key_fingerprint'
|
ppa_uri="~${ppa%/*}/+archive/ubuntu/${ppa##*/}"
|
||||||
|
get -s -n "" "${lp_api[0]}/$ppa_uri" | jq -er '.signing_key_fingerprint' 2>/dev/null \
|
||||||
|
|| get -s -n "" "${lp_api[1]}/$ppa_uri" | jq -er '.signing_key_fingerprint' 2>/dev/null \
|
||||||
|
|| get -s -n "" "$ppa_sp/keys/$ppa.fingerprint"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Function to get fingerprint from a Debian PPA.
|
# Function to get fingerprint from a Debian PPA.
|
||||||
debian_fingerprint() {
|
debian_fingerprint() {
|
||||||
ppa=$1
|
ppa=$1
|
||||||
@ -93,6 +97,7 @@ add_key() {
|
|||||||
sks_params="op=get&options=mr&exact=on&search=0x$fingerprint"
|
sks_params="op=get&options=mr&exact=on&search=0x$fingerprint"
|
||||||
key_urls=("${sks[@]/%/\/pks\/lookup\?"$sks_params"}")
|
key_urls=("${sks[@]/%/\/pks\/lookup\?"$sks_params"}")
|
||||||
fi
|
fi
|
||||||
|
key_urls+=("$ppa_sp/keys/$ppa.gpg")
|
||||||
[ ! -e "$key_source" ] && get -q -n "$key_file" "${key_urls[@]}"
|
[ ! -e "$key_source" ] && get -q -n "$key_file" "${key_urls[@]}"
|
||||||
if [[ "$(file "$key_file")" =~ .*('Public-Key (old)'|'Secret-Key') ]]; then
|
if [[ "$(file "$key_file")" =~ .*('Public-Key (old)'|'Secret-Key') ]]; then
|
||||||
sudo gpg --batch --yes --dearmor "$key_file" >/dev/null 2>&1 && sudo mv "$key_file".gpg "$key_file"
|
sudo gpg --batch --yes --dearmor "$key_file" >/dev/null 2>&1 && sudo mv "$key_file".gpg "$key_file"
|
||||||
|
@ -35,6 +35,6 @@ Function Add-Protoc() {
|
|||||||
Add-ToProfile $current_profile 'protoc' "New-Alias protoc $bin_dir\protoc.exe"
|
Add-ToProfile $current_profile 'protoc' "New-Alias protoc $bin_dir\protoc.exe"
|
||||||
Add-Log $tick "protoc" "Added protoc $($protobuf_tag -replace 'v', '')"
|
Add-Log $tick "protoc" "Added protoc $($protobuf_tag -replace 'v', '')"
|
||||||
printf "$env:GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information"
|
printf "$env:GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information"
|
||||||
Write-Output (Invoke-WebRequest https://raw.githubusercontent.com/protocolbuffers/protobuf/master/LICENSE).Content
|
Write-Output (Invoke-WebRequest https://raw.githubusercontent.com/protocolbuffers/protobuf/main/LICENSE).Content
|
||||||
Write-Output "$env:END_GROUP"
|
Write-Output "$env:END_GROUP"
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ add_protoc() {
|
|||||||
) >/dev/null 2>&1
|
) >/dev/null 2>&1
|
||||||
add_log "${tick:?}" "protoc" "Added protoc ${protobuf_tag:1}"
|
add_log "${tick:?}" "protoc" "Added protoc ${protobuf_tag:1}"
|
||||||
printf "$GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information"
|
printf "$GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information"
|
||||||
curl "${curl_opts[@]:?}" https://raw.githubusercontent.com/protocolbuffers/protobuf/master/LICENSE
|
curl "${curl_opts[@]:?}" https://raw.githubusercontent.com/protocolbuffers/protobuf/main/LICENSE
|
||||||
echo "$END_GROUP"
|
echo "$END_GROUP"
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ get() {
|
|||||||
status_code=$(sudo curl -w "%{http_code}" -o "$file_path" "${curl_opts[@]}" "$link")
|
status_code=$(sudo curl -w "%{http_code}" -o "$file_path" "${curl_opts[@]}" "$link")
|
||||||
[ "$status_code" = "200" ] && break
|
[ "$status_code" = "200" ] && break
|
||||||
done
|
done
|
||||||
[ "$execute" = "-e" ] && sudo chmod a+x "$file_path"
|
[[ "$execute" = "-e" && -e "$file_path" ]] && sudo chmod a+x "$file_path"
|
||||||
[ "$mode" = "-v" ] && echo "$status_code"
|
[ "$mode" = "-v" ] && echo "$status_code"
|
||||||
[ "$runner" = "self-hosted" ] && release_lock "$lock_path"
|
[ "$runner" = "self-hosted" ] && release_lock "$lock_path"
|
||||||
fi
|
fi
|
||||||
@ -244,7 +244,9 @@ configure_php() {
|
|||||||
add_php_config
|
add_php_config
|
||||||
ini_config_dir="${src:?}"/configs/ini
|
ini_config_dir="${src:?}"/configs/ini
|
||||||
ini_config_files=("$ini_config_dir"/php.ini)
|
ini_config_files=("$ini_config_dir"/php.ini)
|
||||||
jit_config_files=("$ini_config_dir"/jit.ini)
|
arch="$(uname -m)"
|
||||||
|
[[ "$arch" = "arm64" || "$arch" = "aarch64" ]] && jit_ini="$ini_config_dir"/jit_aarch64.ini || jit_ini="$ini_config_dir"/jit.ini
|
||||||
|
jit_config_files=("$jit_ini")
|
||||||
[[ "$version" =~ $xdebug3_versions ]] && ini_config_files+=("$ini_config_dir"/xdebug.ini)
|
[[ "$version" =~ $xdebug3_versions ]] && ini_config_files+=("$ini_config_dir"/xdebug.ini)
|
||||||
cat "${ini_config_files[@]}" | sudo tee -a "${ini_file[@]:?}" >/dev/null 2>&1
|
cat "${ini_config_files[@]}" | sudo tee -a "${ini_file[@]:?}" >/dev/null 2>&1
|
||||||
[[ "$version" =~ $jit_versions ]] && cat "${jit_config_files[@]}" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1
|
[[ "$version" =~ $jit_versions ]] && cat "${jit_config_files[@]}" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1
|
||||||
|
@ -263,13 +263,15 @@ export async function addComposer(data: RS): Promise<string> {
|
|||||||
const github = data['github'];
|
const github = data['github'];
|
||||||
const getcomposer = data['domain'];
|
const getcomposer = data['domain'];
|
||||||
const cds = 'https://dl.cloudsmith.io';
|
const cds = 'https://dl.cloudsmith.io';
|
||||||
|
const spc = 'https://artifacts.setup-php.com';
|
||||||
const filename = `composer-${data['php_version']}-${channel}.phar`;
|
const filename = `composer-${data['php_version']}-${channel}.phar`;
|
||||||
const releases_url = `${github}/shivammathur/composer-cache/releases/latest/download/${filename}`;
|
const releases_url = `${github}/shivammathur/composer-cache/releases/latest/download/${filename}`;
|
||||||
const cds_url = `${cds}/public/shivammathur/composer-cache/raw/files/${filename}`;
|
const cds_url = `${cds}/public/shivammathur/composer-cache/raw/files/${filename}`;
|
||||||
|
const spc_url = `${spc}/composer/${filename}`;
|
||||||
const lts_url = `${getcomposer}/download/latest-2.2.x/composer.phar`;
|
const lts_url = `${getcomposer}/download/latest-2.2.x/composer.phar`;
|
||||||
const is_lts = /^5\.[3-6]$|^7\.[0-1]$/.test(data['php_version']);
|
const is_lts = /^5\.[3-6]$|^7\.[0-1]$/.test(data['php_version']);
|
||||||
const version_source_url = `${getcomposer}/composer-${channel}.phar`;
|
const version_source_url = `${getcomposer}/composer-${channel}.phar`;
|
||||||
let cache_url = `${releases_url},${cds_url}`;
|
let cache_url = `${releases_url},${spc_url},${cds_url}`;
|
||||||
let source_url = `${getcomposer}/composer.phar`;
|
let source_url = `${getcomposer}/composer.phar`;
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^snapshot$/.test(channel):
|
case /^snapshot$/.test(channel):
|
||||||
|
Reference in New Issue
Block a user