Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
push:
tags: ['v*']

jobs:
test:
name: PHP ${{ matrix.php }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest]
php: ['8.1', '8.2', '8.3', '8.4', '8.5']

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: none

- name: Build extension
run: |
phpize
./configure --enable-eventloop
make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)

- name: Run tests
run: make test TESTS="-q --show-diff"

- name: Verify extension loads
run: php -d extension=modules/eventloop.so -m | grep eventloop

release:
name: Create GitHub Release
needs: test
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ The API surface mirrors Revolt's, so migrating between the two is straightforwar

## Installation

### Via PIE (recommended)

```bash
pie install axcherednikov/eventloop
```

### From source

```bash
git clone https://github.com/axcherednikov/php-eventloop.git
cd php-eventloop
Expand Down
21 changes: 21 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "axcherednikov/eventloop",
"type": "php-ext",
"license": "MIT",
"description": "Native PHP extension providing a high-performance event loop with epoll/kqueue/poll support. API-compatible with Revolt.",
"require": {
"php": ">=8.1"
},
"php-ext": {
"extension-name": "eventloop",
"priority": 80,
"support-zts": true,
"support-nts": true,
"configure-options": [
{
"name": "enable-eventloop",
"description": "Enable EventLoop support"
}
]
}
}
Loading