Skip to content

Commit

Permalink
Optimize composer config (#593)
Browse files Browse the repository at this point in the history
* 优化composer配置

* 优化composer配置

* optimize github workflow config for composer

* optimize github workflow config for composer

* optimize github workflow config for composer
  • Loading branch information
jingjingxyk committed Apr 19, 2024
1 parent 9251aaf commit 5db4440
Show file tree
Hide file tree
Showing 7 changed files with 3,696 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/auto-cache-pool-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ jobs:
export PATH=${WORK_DIR}/bin/runtime:$PATH
alias php="php -d curl.cainfo=${WORK_DIR}/bin/runtime/cacert.pem -d openssl.cafile=${WORK_DIR}/bin/runtime/cacert.pem"
composer update --optimize-autoloader
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +pgsql --with-swoole-pgsql=1
php prepare.php +apcu +ds +xlswriter +ssh2 +pgsql --with-swoole-pgsql=1 @macos
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +pgsql
php prepare.php +apcu +ds +xlswriter +ssh2 +pgsql @macos
cd ${{ github.workspace }}/pool/
zip -9 -r ${WORK_DIR}/all-deps.zip ext lib
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ jobs:
alias php="php -d curl.cainfo=/work/bin/runtime/cacert.pem -d openssl.cafile=/work/bin/runtime/cacert.pem"
sh sapi/quickstart/linux/alpine-init.sh
composer update --optimize-autoloader
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 --with-swoole-pgsql=1 --with-libavif=1
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ jobs:
export PATH=/work/bin/runtime:$PATH # 容器已经内置 php 和 composer
alias php="php -d curl.cainfo=/work/bin/runtime/cacert.pem -d openssl.cafile=/work/bin/runtime/cacert.pem"
sh sapi/quickstart/linux/alpine-init.sh --mirror ""
composer update --optimize-autoloader
sh sapi/quickstart/linux/alpine-init.sh
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 --with-swoole-pgsql=1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ jobs:
export PATH=${{ github.workspace }}/bin/runtime:$PATH
alias php="php -d curl.cainfo=${{ github.workspace }}/bin/runtime/cacert.pem -d openssl.cafile=${{ github.workspace }}/bin/runtime/cacert.pem"
composer update --optimize-autoloader
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile
php prepare.php --without-docker=1 +ds +apcu +xlswriter +ssh2 --with-build-type=release --with-swoole-pgsql=1
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ tmp-php.ini
/ext/xlswriter
/.phpunit.result.cache
/samples/sfx/*.phar
composer.lock
.php-cs-fixer.cache
ldflags.log
cppflags.log
Expand Down
5 changes: 4 additions & 1 deletion build-release-example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ if [ ${WITH_PHP_COMPOSER} -eq 1 ] ; then
# composer suggests --all
# composer dump-autoload

composer update --optimize-autoloader
# composer update --optimize-autoloader
composer install --no-interaction --no-autoloader --no-scripts --profile # --no-dev
composer dump-autoload --optimize --profile

composer config -g --unset repos.packagist
fi

Expand Down
Loading

0 comments on commit 5db4440

Please sign in to comment.