Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build native php #182

Merged
merged 9 commits into from
Jun 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
bash sapi/download-box/download-box-get-archive-from-container.sh
bash sapi/quickstart/setup-php-runtime.sh
export PATH=${GITHUB_WORKSPACE}/bin/runtime:$PATH
composer update --no-dev --optimize-autoloader
# composer update --no-dev --optimize-autoloader
composer update --optimize-autoloader
php prepare.php +inotify +apcu +ds --without-docker=1
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Expand Down Expand Up @@ -79,7 +80,8 @@ jobs:
bash ./make.sh config
bash ./make.sh build
bash ./make.sh archive
./bin/swoole-cli vendor/bin/phpunit sapi/unit/MainTest.php
./php-src/sapi/cli/php ./vendor/bin/phpunit ./sapi/unit/MainTest.php --list-tests
./php-src/sapi/cli/php ./vendor/bin/phpunit ./sapi/unit/MainTest.php

- name: Show Build Result
uses: addnab/docker-run-action@v3
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ jobs:
run: |
set -eux
# export PATH=/work/bin/runtime:$PATH # 容器已经内置 php 和 composer 容器
composer update --no-dev --optimize-autoloader

# composer update --no-dev --optimize-autoloader
composer update --optimize-autoloader
php prepare.php --with-global-prefix=/usr --with-swoole-pgsql=1 +inotify +apcu +ds +xlswriter +ssh2 +pgsql +pdo_pgsql -mongodb

chmod a+x make.sh
head -n 20 make.sh
php ./vendor/bin/phpunit ./sapi/unit/MainTest.php --list-tests
php ./vendor/bin/phpunit ./sapi/unit/MainTest.php

- name: Build
uses: addnab/docker-run-action@v3
with:
Expand All @@ -86,7 +92,9 @@ jobs:
bash ./make.sh config
bash ./make.sh build
bash ./make.sh archive
./bin/swoole-cli vendor/bin/phpunit sapi/unit/MainTest.php
./php-src/sapi/cli/php ./vendor/bin/phpunit ./sapi/unit/MainTest.php --list-tests
./php-src/sapi/cli/php ./vendor/bin/phpunit ./sapi/unit/MainTest.php

- name: Show Build Result
run: |
./php-src/sapi/cli/php -v
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ jobs:
- name: prepare
run: |
export PATH=${GITHUB_WORKSPACE}/bin/runtime:$PATH
composer update --no-dev --optimize-autoloader

# composer update --no-dev --optimize-autoloader
composer update --optimize-autoloader
php prepare.php --without-docker=1 --with-build-type=release --with-swoole-pgsql=1 +apcu +ds +xlswriter +ssh2 +pgsql +pdo_pgsql


- name: Cache all-library
uses: actions/cache@v3
id: all-library-cache
Expand Down Expand Up @@ -89,7 +93,9 @@ jobs:
bash ./make.sh config
bash ./make.sh build
bash ./make.sh archive
./bin/swoole-cli vendor/bin/phpunit sapi/unit/MainTest.php
./php-src/sapi/cli/php ./vendor/bin/phpunit ./sapi/unit/MainTest.php --list-tests
./php-src/sapi/cli/php ./vendor/bin/phpunit ./sapi/unit/MainTest.php


- name: Show Build Result
run: |
Expand Down
2 changes: 1 addition & 1 deletion prepare.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// Generate make.sh
$p->execute();

function install_libraries($p): void
function install_libraries(Preprocessor $p): void
{
$php_install_prefix = BUILD_PHP_INSTALL_PREFIX;
$php_src = $p->getPhpSrcDir();
Expand Down