Skip to content

Commit

Permalink
merge code
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Oct 7, 2024
2 parents 899684c + b4fa2d8 commit 7a04589
Show file tree
Hide file tree
Showing 49 changed files with 875 additions and 617 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/auto-cache-pool-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +uuid +mongodb --show-tarball-hash=1
php prepare.php +apcu +ds +xlswriter +ssh2 +uuid @macos --show-tarball-hash=1
php prepare.php +inotify --show-tarball-hash=1
php prepare.php @macos --show-tarball-hash=1
cd ${{ github.workspace }}/pool/
zip -9 -r ${WORK_DIR}/all-deps.zip ext lib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +pgsql +uuid +mongodb --with-build-type=release --with-libavif=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php +inotify --with-php-version=${{ env.BUILD_PHP_VERSION }}
bash make-install-deps.sh
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev
# php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +pgsql +mongodb --with-libavif=1 ${{ inputs.build_type }} ${{ inputs.build_options }} --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +pgsql +mongodb +uuid --with-libavif=1 --with-build-type=release --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php +inotify ${{ inputs.build_type }} ${{ inputs.build_options }} --with-php-version=${{ env.BUILD_PHP_VERSION }}
bash make-install-deps.sh
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,11 @@ jobs:
sysctl -n hw.ncpu
env
echo $HOME
sw_vers
xcodebuild -version
brew config
# sudo rm -rf /Library/Developer/CommandLineTools
# xcode-select --install
# sudo xcode-select --reset
# sudo xcode-select -switch /Library/Developer/CommandLineTools
# softwareupdate --list --verbose
# softwareupdate --install -a
# xcode-select --install
# export SDKROOT=$(xcrun --show-sdk-path)
xcrun --show-sdk-path
ls -lh $(xcrun --show-sdk-path)
# sudo xcode-select --switch /Applications/Xcode.app
# export MACOSX_DEPLOYMENT_TARGET=12.6
ifconfig
export IPV6=$(ifconfig en0 | grep "inet6 " | grep -v "inet6 fe80:" | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
Expand All @@ -63,8 +52,6 @@ jobs:
run: |
bash sapi/quickstart/macos/macos-init.sh
export PATH="/opt/homebrew/opt/libtool/bin:$PATH"
export PATH="/opt/homebrew/opt/libtool/bin:$PATH"
ls -lha /opt/homebrew/opt/libtool/bin/
libtoolize --version
Expand Down Expand Up @@ -128,7 +115,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile
php prepare.php --without-docker=1 +ds +apcu +xlswriter +ssh2 +pgsql +uuid -mongodb --with-build-type=release --with-libavif=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
- name: Build
run: |
Expand All @@ -146,6 +133,7 @@ jobs:
run: |
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri swow
./thirdparty/php-src/sapi/cli/php --ri pgsql
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
macos-x86_64:
if: 1
runs-on: macos-12
runs-on: macos-13
# macos-latest (macos-14) 变更了 CPU 架构,由 x86_64 变更为 arm64
# macos-14 CPU 架构 arm64
# macos-13 CPU 架构 x86_64
Expand All @@ -34,22 +34,22 @@ jobs:
sysctl -n hw.ncpu
env
echo $HOME
sw_vers
xcodebuild -version
brew config
# sudo rm -rf /Library/Developer/CommandLineTools
# xcode-select --install
xcrun --show-sdk-path
# sudo xcode-select --reset
# sudo xcode-select -switch /Library/Developer/CommandLineTools
# softwareupdate --list --verbose
# softwareupdate --install -a
# xcode-select --install
# export SDKROOT=$(xcrun --show-sdk-path)
ls -lh $(xcrun --show-sdk-path)
# sudo xcode-select --switch /Applications/Xcode.app
# export MACOSX_DEPLOYMENT_TARGET=12.6
# find /Applications/Xcode.app -name stdio.h
xcodebuild -find make
xcodebuild -find gcc
xcodebuild -find g++
xcodebuild -find clang
xcodebuild -find clang++
find /Applications/Xcode.app -path '*/usr/include/stdio.h'
find $(xcode-select --print-path) -name stdio.h
ifconfig
export IPV6=$(ifconfig en0 | grep "inet6 " | grep -v "inet6 fe80:" | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
Expand All @@ -65,8 +65,6 @@ jobs:
run: |
bash sapi/quickstart/macos/macos-init.sh
export PATH=/usr/local/opt/libtool/bin:$PATH
export PATH=/usr/local/opt/libtool/bin:$PATH
ls -lha /usr/local/opt/libtool/bin/
Expand Down Expand Up @@ -132,7 +130,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev
php prepare.php --without-docker=1 +ds +apcu +xlswriter +ssh2 +pgsql +uuid -mongodb --with-build-type=release --with-libavif=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
- name: Build
run: |
Expand All @@ -150,6 +148,7 @@ jobs:
run: |
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri swow
./thirdparty/php-src/sapi/cli/php --ri pgsql
Expand Down
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,18 @@ var/
php-src/
ext/swoole/
sapi/webUI/.idea/
Dockerfile-all-dependencies-alpine
php.ini
sapi/webUI/deploy.sh
sapi/webUI/public/data/
Makefile.backup
ldflags.log
cppflags.log
libs.log

/php-src
ext/apcu/
ext/ssh2/
LICENSE
swoole-cli-*
php-cli-*
php-fpm-*
!sapi/patches

35 changes: 7 additions & 28 deletions build-release-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ esac

IN_DOCKER=0
WITH_DOWNLOAD_BOX=0
WITH_BUILD_CONTAINER=0
WITH_WEB_UI=0
WITH_HTTP_PROXY=0
WITH_PHP_COMPOSER=1
Expand Down Expand Up @@ -79,10 +78,6 @@ while [ $# -gt 0 ]; do
WITH_DOWNLOAD_BOX=1
OPTIONS="${OPTIONS} --without-docker=1 --skip-download=1 --with-dependency-graph=1 "
;;
--build-contianer)
WITH_BUILD_CONTAINER=1
OPTIONS="${OPTIONS} --without-docker=1 "
;;
--webui)
WITH_WEB_UI=1
OPTIONS="${OPTIONS} --without-docker=1 --skip-download=1 --with-web-ui=1 "
Expand Down Expand Up @@ -220,9 +215,8 @@ if [ ${WITH_PHP_COMPOSER} -eq 1 ]; then
composer config -g --unset repos.packagist
fi


# 可用配置参数
# --with-swoole-pgsql=1
# --with-libavif=1
# --with-global-prefix=/usr/local/swoole-cli
# --with-dependency-graph=1
# --with-web-ui
Expand Down Expand Up @@ -265,16 +259,6 @@ if [ ${WITH_DOWNLOAD_BOX} -eq 1 ]; then
exit 0
fi

if [ ${WITH_BUILD_CONTAINER} -eq 1 ]; then
echo " please exec script: "
if [ "$MIRROR" = 'china' ]; then
echo " bash sapi/multistage-build-dependencies-container/all-dependencies-build-container.sh --composer_mirror tencent --mirror ustc "
else
echo " bash sapi/multistage-build-dependencies-container/all-dependencies-build-container.sh "
fi
exit 0
fi

if [ ${WITH_WEB_UI} -eq 1 ]; then
echo " please exec script: "
echo " bash sapi/webUI/webui-init-data.sh "
Expand All @@ -287,10 +271,9 @@ if [ "$OS" = 'linux' ] && [ ${IN_DOCKER} -eq 0 ]; then
exit 0
fi

bash make-install-deps.sh
set -ue

# 兼容上一版本已构建完毕的依赖库
# bash sapi/quickstart/mark-install-library-cached.sh
bash make-install-deps.sh

bash make.sh all-library

Expand All @@ -303,18 +286,14 @@ bash make.sh archive
exit 0

# 例子
# bash build-release.sh --mirror china
# bash build-release.sh --mirror china --debug
# bash build-release-php.sh --mirror china
# bash build-release-php.sh --mirror china --debug

# 例子 download-box
# bash build-release.sh --mirror china --download-box
# bash build-release-php.sh --mirror china --download-box
# bash sapi/download-box/download-box-init.sh --proxy http://192.168.3.26:8015

# 例子 build-contianer
# bash build-release.sh --mirror china --build-contianer
# bash sapi/multistage-build-dependencies-container/all-dependencies-build-container.sh --composer_mirror tencent --mirror ustc

# 例子 web ui
# bash build-release.sh --mirror china --webui
# bash build-release-php.sh --mirror china --webui
# bash sapi/webUI/webui-init-data.sh
# php sapi/webUI/bootstrap.php
Loading

0 comments on commit 7a04589

Please sign in to comment.