-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90feeae
commit 9432005
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Async IO With IOUring | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test-linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['8.1', '8.2', '8.3', '8.1-zts', '8.2-zts', '8.3-zts'] | ||
name: ${{ matrix.php }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php }}" | ||
coverage: none | ||
- name: Show machine information | ||
run: | | ||
date | ||
env | ||
uname -a | ||
ulimit -a | ||
php -v | ||
php --ini | ||
ls -al | ||
pwd | ||
echo "`git log -20 --pretty --oneline`" | ||
echo "`git log -10 --stat --pretty --oneline`" | ||
- name: Run Swoole test | ||
run: | | ||
export SWOOLE_BRANCH=${GITHUB_REF##*/} | ||
export SWOOLE_USE_IOURING=1 | ||
export SWOOLE_BUILD_DIR=$(realpath .) | ||
export PHP_VERSION=${{ matrix.php }} | ||
${SWOOLE_BUILD_DIR}/scripts/route.sh | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh -e | ||
__CURRENT__=$(pwd) | ||
__DIR__=$(cd "$(dirname "$0")";pwd) | ||
|
||
if [ ! -f "/.dockerenv" ]; then | ||
echo "" && echo "❌ This script is just for Docker!" | ||
exit | ||
fi | ||
|
||
sh library.sh | ||
|
||
cd "${__DIR__}" && cd .. | ||
./scripts/clear.sh && phpize | ||
|
||
mode=$(php -v | grep zts) | ||
if [ "$mode" != "" ]; then | ||
echo "" && echo "🚀 php zts + swoole thread mode + iouring!" | ||
./configure --enable-iouring --enable-thread | ||
else | ||
echo "" && echo "🚀 php nts + swoole + iouring!" | ||
./configure --enable-iouring | ||
fi | ||
|
||
make -j$(cat /proc/cpuinfo | grep processor | wc -l) | ||
make install | ||
docker-php-ext-enable swoole | ||
php -v | ||
php -m | ||
php --ri curl | ||
php --ri swoole | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh -e | ||
__CURRENT__=$(pwd) | ||
__DIR__=$(cd "$(dirname "$0")";pwd) | ||
export SWOOLE_USE_IOURING=1 | ||
|
||
# enter the dir | ||
cd "${__DIR__}" | ||
|
||
# show system info | ||
date && echo "" | ||
uname -a && echo "" | ||
|
||
# show php info | ||
php -v && echo "" | ||
|
||
# compile in docker | ||
echo "" && echo "📦 Compile ext-swoole[iouring] in docker..." && echo "" | ||
./docker-compile-with-iouring.sh | ||
|
||
# run unit tests | ||
echo "" && echo "📋 Run php tests[iouring] in docker..." && echo "" | ||
./run-tests.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters