Skip to content

Commit

Permalink
macos ci (#5349)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFreeman authored May 31, 2024
1 parent 750b03e commit 1c9736d
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 58 deletions.
113 changes: 58 additions & 55 deletions .github/workflows/ext.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,74 @@
name: ext-swoole

on: [push, pull_request]
on: [ push, pull_request ]

env:
CPPFLAGS: "-I/opt/homebrew/opt/c-ares/include/ -I/opt/homebrew/opt/pcre2/include/ -I/opt/homebrew/opt/openssl/include/"
LDFLAGS: "-L/opt/homebrew/opt/c-ares/lib -L/opt/homebrew/opt/openssl/lib/"

jobs:
build-ubuntu-latest:
if: "!contains(github.event.head_commit.message, '[test]')"
runs-on: ubuntu-latest
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$(nproc)
- name: build2
run: ./configure --enable-sockets &&
make clean && make -j$(nproc)
- name: build3
run: ./configure --enable-sockets --enable-mysqlnd &&
make clean && make -j$(nproc)
- name: build5
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl &&
make clean && make -j$(nproc)
- name: build6
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl --enable-debug-log &&
make clean && make -j$(nproc)
- name: build7
run: ./configure --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-openssl --enable-debug-log &&
make clean && make -j$(nproc)
- name: build8
run: ./configure --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-openssl --enable-cares --enable-debug-log &&
make clean && make -j$(nproc)
- name: build with thread context
run: ./configure --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-openssl --enable-cares --enable-debug-log --enable-thread-context &&
make clean && make -j$(nproc)
- 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$(nproc)
- name: build2
run: ./configure --enable-sockets &&
make clean && make -j$(nproc)
- name: build3
run: ./configure --enable-sockets --enable-mysqlnd &&
make clean && make -j$(nproc)
- name: build5
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl &&
make clean && make -j$(nproc)
- name: build6
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl --enable-debug-log &&
make clean && make -j$(nproc)
- name: build7
run: ./configure --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-openssl --enable-debug-log &&
make clean && make -j$(nproc)
- name: build8
run: ./configure --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-openssl --enable-cares --enable-debug-log &&
make clean && make -j$(nproc)
- name: build with thread context
run: ./configure --enable-sockets --enable-mysqlnd --enable-swoole-curl --enable-openssl --enable-cares --enable-debug-log --enable-thread-context &&
make clean && make -j$(nproc)

build-macos-latest:
if: "!contains(github.event.head_commit.message, '[test]')"
runs-on: macos-latest
steps:
- name: install dependencies
run: brew install openssl && brew link openssl && brew install curl && brew link curl && brew install c-ares && brew link c-ares
- uses: actions/checkout@v4
- name: phpize
run: phpize
- name: build1
run: ./configure && make clean && make -j$(sysctl -n hw.ncpu)
- name: build2
run: ./configure --enable-sockets &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build3
run: ./configure --enable-sockets --enable-mysqlnd &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build5
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl
--with-openssl-dir=/usr/local/opt/[email protected] &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build6
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl --enable-swoole-curl --enable-debug-log
--with-openssl-dir=/usr/local/opt/[email protected] &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build7
run: ./configure --enable-sockets --enable-mysqlnd --enable-openssl --enable-swoole-curl --enable-debug-log --enable-cares
--with-openssl-dir=/usr/local/opt/[email protected] &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: install dependencies
run: brew reinstall php
- uses: actions/checkout@v4
- name: phpize
run: phpize
- name: build1
run: ./configure CPPFLAGS="${CPPFLAGS}" && make clean && make -j$(sysctl -n hw.ncpu)
- name: build2
run: ./configure CPPFLAGS="${CPPFLAGS}" --enable-sockets &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build3
run: ./configure CPPFLAGS="${CPPFLAGS}" --enable-sockets --enable-mysqlnd &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build5
run: ./configure CPPFLAGS="${CPPFLAGS}" --enable-sockets --enable-mysqlnd --enable-openssl &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build6
run: ./configure CPPFLAGS="${CPPFLAGS}" --enable-sockets --enable-mysqlnd --enable-openssl
--enable-swoole-curl --enable-debug-log &&
make clean && make -j$(sysctl -n hw.ncpu)
- name: build7
run: ./configure CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" --enable-sockets --enable-mysqlnd --enable-openssl --enable-swoole-curl
--enable-debug-log --enable-cares &&
make clean && make -j$(sysctl -n hw.ncpu)

build-alpine-latest:
if: "!contains(github.event.head_commit.message, '[test]')"
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
pull_request:

env:
CPPFLAGS: "-I/opt/homebrew/opt/c-ares/include/ -I/opt/homebrew/opt/pcre2/include/ -I/opt/homebrew/opt/openssl/include/"
LDFLAGS: "-L/opt/homebrew/opt/c-ares/lib -L/opt/homebrew/opt/openssl/lib/"

jobs:
linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -120,10 +124,8 @@ jobs:

- name: Build Swoole
run: |
brew install openssl && brew link openssl
brew install c-ares && brew link c-ares
phpize
./configure --enable-openssl --with-openssl-dir=/usr/local/opt/openssl@3 --enable-mysqlnd --enable-swoole-curl --enable-cares
./configure LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}" --enable-openssl --enable-mysqlnd --enable-swoole-curl --enable-cares
make -j$(sysctl -n hw.ncpu)
sudo make install
php --ri swoole
Expand Down

0 comments on commit 1c9736d

Please sign in to comment.