Skip to content

Commit

Permalink
Add macOS ci (#64)
Browse files Browse the repository at this point in the history
* Add macos ci

* Add macos ci

* Update name

* Update test.yml

* Update swoole verison v4.8.1
  • Loading branch information
sy-records authored Nov 5, 2021
1 parent 732824a commit 25910df
Showing 1 changed file with 64 additions and 5 deletions.
69 changes: 64 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:
- cron: '11 2 * * *'

jobs:
ci:
name: Test on PHP${{ matrix.php-version }} Swoole-${{ matrix.swoole-version }}
linux:
name: PHP${{ matrix.php-version }} Swoole-${{ matrix.swoole-version }} Test on Linux
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-latest]
php-version: ['7.2', '7.3', '7.4', '8.0']
swoole-version: ['v4.4.26', 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.0', 'master']
swoole-version: ['v4.4.26', 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.1', 'master']
exclude:
- php-version: '8.0'
swoole-version: 'v4.4.26'
max-parallel: 5
max-parallel: 10
fail-fast: false
env:
SWOOLE_VERSION: ${{ matrix.swoole-version }}
Expand Down Expand Up @@ -47,7 +47,66 @@ jobs:
sudo make install
php --ri swoole
- name: Setup Deps
- name: Setup Dependencies
env:
COMPOSER_ROOT_VERSION: 1.4-dev
run:
composer install -o

- name: Coding Standards Check
run: |
composer cs-check
- name: Run Test Cases
run: |
composer test
macos:
name: PHP${{ matrix.php-version }} Swoole-${{ matrix.swoole-version }} Test on macOS
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [macos-latest]
php-version: ['7.2', '7.3', '7.4', '8.0']
swoole-version: ['v4.4.26', 'v4.5.11', 'v4.6.7', 'v4.7.1', 'v4.8.1', 'master']
exclude:
- php-version: '8.0'
swoole-version: 'v4.4.26'
max-parallel: 10
fail-fast: false
env:
SWOOLE_VERSION: ${{ matrix.swoole-version }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: phpize
ini-values: extension=swoole
coverage: none

- name: Install Swoole Dependencies
run: |
brew install openssl
brew link openssl
- name: Build Swoole
run: |
wget https://github.com/swoole/swoole-src/archive/${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz
mkdir -p swoole
tar -xf swoole.tar.gz -C swoole --strip-components=1
rm swoole.tar.gz
cd swoole
phpize
./configure --enable-openssl --with-openssl-dir=/usr/local/opt/[email protected] --enable-mysqlnd --enable-http2
make -j$(nproc)
sudo make install
php --ri swoole
- name: Setup Dependencies
env:
COMPOSER_ROOT_VERSION: 1.4-dev
run:
Expand Down

0 comments on commit 25910df

Please sign in to comment.