Use apt-fast instead of apt-get
Should provide a speed boost on package installation
This commit is contained in:
parent
87e6c70743
commit
95a2fea374
@ -30,15 +30,15 @@ describe('Extension tests', () => {
|
|||||||
'linux'
|
'linux'
|
||||||
);
|
);
|
||||||
expect(linux).toContain(
|
expect(linux).toContain(
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-xdebug'
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.4-xdebug'
|
||||||
);
|
);
|
||||||
expect(linux).toContain('pecl install xdebug');
|
expect(linux).toContain('pecl install xdebug');
|
||||||
expect(linux).toContain(
|
expect(linux).toContain(
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-pcov'
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.4-pcov'
|
||||||
);
|
);
|
||||||
expect(linux).toContain('pecl install pcov');
|
expect(linux).toContain('pecl install pcov');
|
||||||
expect(linux).toContain(
|
expect(linux).toContain(
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-igbinary php7.4-redis'
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.4-igbinary php7.4-redis'
|
||||||
);
|
);
|
||||||
|
|
||||||
linux = await extensions.addExtension('phalcon3, phalcon4', '7.2', 'linux');
|
linux = await extensions.addExtension('phalcon3, phalcon4', '7.2', 'linux');
|
||||||
|
|||||||
@ -64,7 +64,7 @@ describe('Utils tests', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('checking writeScripts', async () => {
|
it('checking writeScripts', async () => {
|
||||||
const testString = 'sudo apt-get install php';
|
const testString = 'sudo apt-fast install php';
|
||||||
const runner_dir: string = process.env['RUNNER_TOOL_CACHE'] || '';
|
const runner_dir: string = process.env['RUNNER_TOOL_CACHE'] || '';
|
||||||
const script_path: string = path.join(runner_dir, 'test.sh');
|
const script_path: string = path.join(runner_dir, 'test.sh');
|
||||||
await utils.writeScript('test.sh', testString);
|
await utils.writeScript('test.sh', testString);
|
||||||
|
|||||||
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -2187,7 +2187,7 @@ function addExtensionLinux(extension_csv, version) {
|
|||||||
switch (version + extension) {
|
switch (version + extension) {
|
||||||
case '7.4redis':
|
case '7.4redis':
|
||||||
install_command =
|
install_command =
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-igbinary php7.4-redis >/dev/null 2>&1';
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.4-igbinary php7.4-redis >/dev/null 2>&1';
|
||||||
break;
|
break;
|
||||||
case '7.2phalcon3':
|
case '7.2phalcon3':
|
||||||
case '7.3phalcon3':
|
case '7.3phalcon3':
|
||||||
@ -2210,7 +2210,7 @@ function addExtensionLinux(extension_csv, version) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
install_command =
|
install_command =
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' +
|
||||||
version +
|
version +
|
||||||
'-' +
|
'-' +
|
||||||
extension.replace('pdo_', '').replace('pdo-', '') +
|
extension.replace('pdo_', '').replace('pdo-', '') +
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export async function addExtensionLinux(
|
|||||||
switch (version + extension) {
|
switch (version + extension) {
|
||||||
case '7.4redis':
|
case '7.4redis':
|
||||||
install_command =
|
install_command =
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-igbinary php7.4-redis >/dev/null 2>&1';
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php7.4-igbinary php7.4-redis >/dev/null 2>&1';
|
||||||
break;
|
break;
|
||||||
case '7.2phalcon3':
|
case '7.2phalcon3':
|
||||||
case '7.3phalcon3':
|
case '7.3phalcon3':
|
||||||
@ -108,7 +108,7 @@ export async function addExtensionLinux(
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
install_command =
|
install_command =
|
||||||
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
|
'sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php' +
|
||||||
version +
|
version +
|
||||||
'-' +
|
'-' +
|
||||||
extension.replace('pdo_', '').replace('pdo-', '') +
|
extension.replace('pdo_', '').replace('pdo-', '') +
|
||||||
|
|||||||
@ -29,7 +29,7 @@ if [ "$existing_version" != "$1" ]; then
|
|||||||
elif [ "$1" = "8.0" ]; then
|
elif [ "$1" = "8.0" ]; then
|
||||||
tar_file=php_"$1"%2Bubuntu"$(lsb_release -r -s)".tar.xz
|
tar_file=php_"$1"%2Bubuntu"$(lsb_release -r -s)".tar.xz
|
||||||
install_dir=~/php/"$1"
|
install_dir=~/php/"$1"
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libicu-dev >/dev/null 2>&1
|
sudo DEBIAN_FRONTEND=noninteractive apt-fast -y install libicu-dev >/dev/null 2>&1
|
||||||
curl -o "$tar_file" -L https://bintray.com/shivammathur/php/download_file?file_path="$tar_file" >/dev/null 2>&1
|
curl -o "$tar_file" -L https://bintray.com/shivammathur/php/download_file?file_path="$tar_file" >/dev/null 2>&1
|
||||||
sudo mkdir -m 777 -p ~/php
|
sudo mkdir -m 777 -p ~/php
|
||||||
sudo tar xf "$tar_file" -C ~/php >/dev/null 2>&1 && rm -rf "$tar_file"
|
sudo tar xf "$tar_file" -C ~/php >/dev/null 2>&1 && rm -rf "$tar_file"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user