From 541a983119f71fd662ea09ce754c50615ecaf7d0 Mon Sep 17 00:00:00 2001 From: Yurun Date: Mon, 10 Jun 2024 08:39:05 +0800 Subject: [PATCH] =?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/php.dockerfile | 12 +++++++++--- .github/workflows/ci.yml | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/php.dockerfile b/.github/php.dockerfile index 39670699f9..3bafc62136 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 \ @@ -18,7 +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) || (phpize && ./configure --enable-openssl \ + --enable-sockets \ + --enable-mysqlnd \ + --enable-swoole-curl \ + --enable-cares \ + --enable-swoole-pgsql \ + --with-swoole-odbc=unixODBC,/usr \ + --enable-swoole-sqlite && make -j install)) && cd - && docker-php-ext-enable swoole \ && bash /tmp/script/swoole_postgresql.sh ${POSTGRESQL_VERSION} \ - && bash /tmp/script/hprose.sh \ && 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 8957390af9..dcf6c14f75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -313,7 +313,8 @@ 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 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