Skip to content
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
4 changes: 3 additions & 1 deletion .github/workflows/windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.ignorecase false
git config --global --add safe.directory ${{ github.workspace }}
ipconfig

- uses: actions/checkout@v4
- name: Prepare submodule
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:
run: |
bash ./sapi/scripts/cygwin/install-re2c.sh

- name: Configure
- name: Prepare
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
run: |
# git config --global --add safe.directory /cygdrive/d/a/swoole-cli/swoole-cli
Expand Down
2 changes: 1 addition & 1 deletion sapi/quickstart/linux/connection-swoole-cli-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ __DIR__=$(

cd ${__DIR__}

docker exec -it woole-cli-builder sh
docker exec -it swoole-cli-alpine-dev sh
6 changes: 3 additions & 3 deletions sapi/quickstart/linux/run-alpine-container-full.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ __PROJECT__=$(
cd ${__DIR__}

{
docker stop swoole-cli-builder
docker stop swoole-cli-alpine-dev
sleep 5
} || {
echo $?
Expand Down Expand Up @@ -73,7 +73,7 @@ cd ${__DIR__}
if [ $DEV_SHM -eq 1 ]; then
mkdir -p /dev/shm/swoole-cli/thirdparty/
mkdir -p /dev/shm/swoole-cli/ext/
docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -v /dev/shm/swoole-cli/thirdparty/:/work/thirdparty/ -v /dev/shm/swoole-cli/ext/:/work/ext/ -w /work --init $IMAGE tail -f /dev/null
docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -v /dev/shm/swoole-cli/thirdparty/:/work/thirdparty/ -v /dev/shm/swoole-cli/ext/:/work/ext/ -w /work --init $IMAGE tail -f /dev/null
else
docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null
docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null
fi
6 changes: 3 additions & 3 deletions sapi/quickstart/linux/run-alpine-container.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -exu
__DIR__=$(
Expand All @@ -12,7 +12,7 @@ __PROJECT__=$(
cd ${__DIR__}

{
docker stop swoole-cli-builder
docker stop swoole-cli-alpine-dev
sleep 5
} || {
echo $?
Expand All @@ -37,4 +37,4 @@ while [ $# -gt 0 ]; do
done

cd ${__DIR__}
docker run --rm --name swoole-cli-builder -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null
docker run --rm --name swoole-cli-alpine-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null
2 changes: 1 addition & 1 deletion sapi/quickstart/linux/run-debian-container.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -exu
__DIR__=$(
Expand Down
62 changes: 62 additions & 0 deletions sapi/quickstart/linux/run-swoole-cli-builder-container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env bash

set -exu
__DIR__=$(
cd "$(dirname "$0")"
pwd
)
__PROJECT__=$(
cd ${__DIR__}/../../../
pwd
)
cd ${__PROJECT__}

MIRROR=''
OPTIONS=''
while [ $# -gt 0 ]; do
case "$1" in
--mirror)
MIRROR="$2"
case "$MIRROR" in
china)
OPTIONS=" --mirror china "
;;
*)
echo "$0 parameter error"
exit 0
;;
esac

;;
esac
shift $(($# > 0 ? 1 : 0))
done

bash setup-php-runtime.sh ${OPTIONS}
export PATH=${__PROJECT__}/bin/runtime:$PATH
alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem "

export COMPOSER_ALLOW_SUPERUSER=1

if [ "$MIRROR" = 'china' ]; then
composer config -g repos.packagist composer https://mirrors.tencent.com/composer/
fi

composer install --no-interaction --no-autoloader --no-scripts --prefer-dist -vv --profile # --no-dev
composer dump-autoload --optimize --profile

if [ "$MIRROR" = 'china' ]; then
composer config -g --unset repos.packagist
fi

php ./prepare.php --skip-download=yes --without-docker=yes

bash make.sh docker-build ${MIRROR}

{
docker exec -it swoole-cli-builder which bash
} || {
docker exec -it swoole-cli-builder sh /work/sapi/quickstart/linux/alpine-init.sh ${OPTIONS}
}

bash make.sh docker-bash
3 changes: 0 additions & 3 deletions sapi/quickstart/windows/cygwin-build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@ sapi\quickstart\windows\cygwin-build\install-cygwin.bat


```



Loading