Optimize test-components (#5807)

This commit is contained in:
Deeka Wong 2023-06-07 14:22:47 +08:00 committed by GitHub
parent b39728ccd7
commit 9328a46bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 16 deletions

View File

@ -27,7 +27,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: redis, pdo, pdo_mysql, bcmath
extensions: redis, pdo, pdo_mysql, bcmath, swoole
ini-values: opcache.enable_cli=1
coverage: none
- name: Setup Swoole
@ -63,6 +63,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: swoole
ini-values: opcache.enable_cli=1
- name: Setup Swoole
run: ./.travis/swoole.install.sh
@ -111,7 +112,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: redis
extensions: redis, swoole
ini-values: opcache.enable_cli=0, phar.readonly='Off'
coverage: none
- name: Setup Swoole
@ -163,6 +164,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: swoole
ini-values: opcache.enable_cli=0
coverage: none
- name: Setup Swoole
@ -198,6 +200,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: swoole
ini-values: opcache.enable_cli=0
coverage: none
- name: Setup Swoole
@ -245,6 +248,7 @@ jobs:
with:
php-version: ${{ matrix.php-version }}
tools: phpize
extensions: swoole
ini-values: opcache.enable_cli=0
coverage: none
- name: Setup Swoole
@ -294,7 +298,7 @@ jobs:
php-version: ${{ matrix.php-version }}
tools: phpize
ini-values: opcache.enable_cli=0
extensions: redis, pdo, pdo_mysql, bcmath
extensions: redis, pdo, pdo_mysql, bcmath, swoole
coverage: none
- name: Setup Swoole
run: ./.travis/swoole.install.sh

View File

@ -1,16 +1,24 @@
#!/usr/bin/env bash
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade -f
sudo apt-get install libcurl4-openssl-dev libc-ares-dev libpq-dev
wget https://github.com/swoole/swoole-src/archive/${SW_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
tar -xf swoole.tar.gz -C swoole --strip-components=1
rm swoole.tar.gz
cd swoole
phpize
./configure --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli
make -j$(nproc)
sudo make install
php -m | grep -i swoole
if [ $? -eq 1 ]; then
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade -f
sudo apt-get install libcurl4-openssl-dev libc-ares-dev libpq-dev
wget https://github.com/swoole/swoole-src/archive/${SW_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
tar -xf swoole.tar.gz -C swoole --strip-components=1
rm swoole.tar.gz
cd swoole
phpize
./configure --enable-openssl --enable-swoole-curl --enable-cares --enable-swoole-pgsql --enable-brotli
make -j$(nproc)
sudo make install
fi
sudo sh -c "echo extension=swoole > /etc/php/${PHP_VERSION}/cli/conf.d/swoole.ini"
sudo sh -c "echo swoole.use_shortname='Off' >> /etc/php/${PHP_VERSION}/cli/conf.d/swoole.ini"