From 91482771528cbb9021381d54972f29f535c30f4f Mon Sep 17 00:00:00 2001 From: Yurun Date: Mon, 10 Jun 2024 07:55:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=9A=84=20Swoole=20=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/php.dockerfile | 2 +- .github/workflows/daily-test.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/php.dockerfile b/.github/php.dockerfile index cc280ffd6f..3c8fbe31b0 100644 --- a/.github/php.dockerfile +++ b/.github/php.dockerfile @@ -8,7 +8,7 @@ ARG SWOOLE_VERSION COPY script/ /tmp/script RUN set -eux \ - && apt-get update && apt-get -y install procps libpq-dev unzip git libzip-dev libevent-dev libssl-dev libicu-dev libc-ares-dev libcurl4-openssl-dev unixodbc-dev libsqlite3-dev \ + && apt-get update && apt-get -y install procps libpq-dev unzip git libzip-dev libevent-dev libssl-dev libicu-dev libc-ares-dev libcurl4-openssl-dev unixodbc-dev libsqlite3-dev libbrotli-dev \ && docker-php-ext-install -j$(nproc) bcmath mysqli pdo_mysql pdo_pgsql pcntl sockets intl zip \ && (php --ri redis || (pecl install redis && docker-php-ext-enable redis)) \ && pecl install inotify \ diff --git a/.github/workflows/daily-test.yml b/.github/workflows/daily-test.yml index a90c8bb8f6..6cb98c9dc7 100644 --- a/.github/workflows/daily-test.yml +++ b/.github/workflows/daily-test.yml @@ -6,9 +6,15 @@ on: push: paths: - ".github/workflows/daily-test.yml" + - ".github/docker-compose.yml" + - ".github/php.dockerfile" + - ".github/actions/ci-prepare" pull_request: paths: - ".github/workflows/daily-test.yml" + - ".github/docker-compose.yml" + - ".github/php.dockerfile" + - ".github/actions/ci-prepare" jobs: daily-test-3_0: From 2fe16a89f1d0fcc6cb4a273f09a8a26dfe2fbc90 Mon Sep 17 00:00:00 2001 From: Yurun Date: Mon, 10 Jun 2024 08:03:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- .github/workflows/daily-test.yml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2792781342..4090c14331 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -355,7 +355,7 @@ jobs: # MacOS Arm64 下需要下面的修复,否则无法编译成功 - name: Fix include run: | - sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ + sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /opt/homebrew/opt/pcre2/include/ - name: Get Openssl Dir id: opecssl-dir run: echo "path=$(brew --prefix openssl@1.1)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/daily-test.yml b/.github/workflows/daily-test.yml index 6cb98c9dc7..b3bf8d9b7d 100644 --- a/.github/workflows/daily-test.yml +++ b/.github/workflows/daily-test.yml @@ -39,8 +39,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - ref: "3.0" - name: Cache dependencies uses: actions/cache@v4 with: From 9649b1a944f2982f05fefa23539de6a185e5026f Mon Sep 17 00:00:00 2001 From: Yurun Date: Mon, 10 Jun 2024 08:23:45 +0800 Subject: [PATCH 3/4] test --- .github/php.dockerfile | 9 ++++++++- .github/workflows/ci.yml | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/php.dockerfile b/.github/php.dockerfile index 3c8fbe31b0..f327914ae5 100644 --- a/.github/php.dockerfile +++ b/.github/php.dockerfile @@ -18,6 +18,13 @@ RUN set -eux \ && pecl install apcu \ && docker-php-ext-enable apcu \ && curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && chmod +x /usr/bin/composer \ - && curl -L -o swoole.tar.gz https://github.com/swoole/swoole-src/archive/${SWOOLE_VERSION}.tar.gz && mkdir -p swoole && tar -xzf swoole.tar.gz -C swoole --strip-components=1 && rm swoole.tar.gz && cd swoole && ((stat ./make.sh && ./make.sh) || (stat ./scripts/make.sh && ./scripts/make.sh)) && cd - && docker-php-ext-enable swoole \ + && curl -L -o swoole.tar.gz https://github.com/swoole/swoole-src/archive/${SWOOLE_VERSION}.tar.gz && mkdir -p swoole && tar -xzf swoole.tar.gz -C swoole --strip-components=1 && rm swoole.tar.gz && cd swoole && ((stat ./make.sh && ./make.sh) || (./configure --enable-openssl \ + --enable-sockets \ + --enable-mysqlnd \ + --enable-swoole-curl \ + --enable-cares \ + --enable-swoole-pgsql \ + --with-swoole-odbc=unixODBC,/usr \ + --enable-swoole-sqlite)) && cd - && docker-php-ext-enable swoole \ && bash /tmp/script/swoole_postgresql.sh ${POSTGRESQL_VERSION} \ && echo "zend_extension=opcache.so" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4090c14331..d90e7be15b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -355,7 +355,8 @@ jobs: # MacOS Arm64 下需要下面的修复,否则无法编译成功 - name: Fix include run: | - sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /opt/homebrew/opt/pcre2/include/ + echo | gcc -E -v - + sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ - name: Get Openssl Dir id: opecssl-dir run: echo "path=$(brew --prefix openssl@1.1)" >> $GITHUB_OUTPUT From 2ae5aeb848233dad43ffeec1eeec9fa5d3de75f6 Mon Sep 17 00:00:00 2001 From: Yurun Date: Mon, 10 Jun 2024 08:29:06 +0800 Subject: [PATCH 4/4] test --- .github/php.dockerfile | 4 ++-- .github/workflows/ci.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/php.dockerfile b/.github/php.dockerfile index f327914ae5..3bafc62136 100644 --- a/.github/php.dockerfile +++ b/.github/php.dockerfile @@ -18,13 +18,13 @@ RUN set -eux \ && pecl install apcu \ && docker-php-ext-enable apcu \ && curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && chmod +x /usr/bin/composer \ - && curl -L -o swoole.tar.gz https://github.com/swoole/swoole-src/archive/${SWOOLE_VERSION}.tar.gz && mkdir -p swoole && tar -xzf swoole.tar.gz -C swoole --strip-components=1 && rm swoole.tar.gz && cd swoole && ((stat ./make.sh && ./make.sh) || (./configure --enable-openssl \ + && curl -L -o swoole.tar.gz https://github.com/swoole/swoole-src/archive/${SWOOLE_VERSION}.tar.gz && mkdir -p swoole && tar -xzf swoole.tar.gz -C swoole --strip-components=1 && rm swoole.tar.gz && cd swoole && ((stat ./make.sh && ./make.sh) || (phpize && ./configure --enable-openssl \ --enable-sockets \ --enable-mysqlnd \ --enable-swoole-curl \ --enable-cares \ --enable-swoole-pgsql \ --with-swoole-odbc=unixODBC,/usr \ - --enable-swoole-sqlite)) && cd - && docker-php-ext-enable swoole \ + --enable-swoole-sqlite && make -j install)) && cd - && docker-php-ext-enable swoole \ && bash /tmp/script/swoole_postgresql.sh ${POSTGRESQL_VERSION} \ && echo "zend_extension=opcache.so" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d90e7be15b..68b2e3b1dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -355,8 +355,8 @@ jobs: # MacOS Arm64 下需要下面的修复,否则无法编译成功 - name: Fix include run: | - echo | gcc -E -v - - sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ + sudo mkdir -p /usr/local/include + sudo ln -s $(brew --prefix pcre2)/include/pcre2.h /usr/local/include/ - name: Get Openssl Dir id: opecssl-dir run: echo "path=$(brew --prefix openssl@1.1)" >> $GITHUB_OUTPUT