Merge pull request #374 from openswoole/master #1791
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ext-openswoole | |
on: | |
push: | |
pull_request: | |
# Allow to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-ubuntu-latest: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install-deps | |
run: sudo apt update -y && sudo apt install -y libcurl4-openssl-dev php-curl libc-ares-dev | |
- name: phpize | |
run: phpize | |
- name: build1 | |
run: ./configure && make clean && make -j$(sysctl -n hw.ncpu) | |
- name: build2 | |
run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-hook-curl | |
--enable-openssl --enable-cares --enable-debug-log && | |
make clean && make -j$(sysctl -n hw.ncpu) | |
# build-centos: | |
# runs-on: ubuntu-latest | |
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
# container: 'centos:latest' | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: fix-repo | |
# run: sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && | |
# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* | |
# - name: install-deps | |
# run: yum update -y && yum install -y gcc gcc-c++ make c-ares-devel php-devel curl php-curl libcurl-devel openssl-devel postgresql-devel | |
# - name: phpize | |
# run: phpize | |
# - name: build | |
# run: ./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-hook-curl | |
# --enable-openssl --enable-cares --with-postgres --enable-debug-log && | |
# make clean && make -j$(sysctl -n hw.ncpu) | |
build-macos-latest: | |
runs-on: macos-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- name: Install dependencies | |
run: | | |
brew install autoconf | |
brew install shivammathur/php/[email protected] | |
brew link --overwrite --force shivammathur/php/[email protected] | |
brew install pcre2 | |
brew install c-ares | |
ln -s /opt/homebrew/include/pcre2.h /opt/homebrew/opt/[email protected]/include/php/ext/pcre/pcre2.h | |
- uses: actions/checkout@v4 | |
- name: phpize | |
run: phpize | |
- name: build1 | |
run: ./configure && make clean && make -j$(sysctl -n hw.ncpu) | |
- name: build2 | |
run: | | |
export CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix c-ares)/include $CFLAGS" | |
export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix c-ares)/lib $LDFLAGS" | |
./configure --enable-sockets --enable-mysqlnd --enable-http2 --enable-hook-curl --enable-openssl --with-openssl-dir=/opt/homebrew/opt/openssl@3 --enable-cares --enable-debug-log | |
make clean && make -j$(sysctl -n hw.ncpu) | |
build-alpine-latest: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
strategy: | |
matrix: | |
php-version: [ '8.2.26'] | |
alpine-version: [ '3.20' ] | |
include: | |
- php-version: '8.3.15' | |
alpine-version: '3.20' | |
- php-version: '8.4.0' | |
alpine-version: '3.20' | |
max-parallel: 8 | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
run: | | |
cp .github/workflows/alpine.Dockerfile alpine.Dockerfile | |
docker build -t openswoole . -f alpine.Dockerfile --build-arg PHP_VERSION=${{ matrix.php-version }} --build-arg ALPINE_VERSION=${{ matrix.alpine-version }} |