From e668baf5533ad381bc80d82d5b5ea7b17b8fe390 Mon Sep 17 00:00:00 2001 From: Alexsander Date: Thu, 26 Mar 2026 01:21:55 +0300 Subject: [PATCH] pie install --- .github/workflows/release.yml | 51 +++++++++++++++++++++++++++++++++++ README.md | 8 ++++++ composer.json | 21 +++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 composer.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..27501ee --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/README.md b/README.md index 972312d..836ae73 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..68f22a2 --- /dev/null +++ b/composer.json @@ -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" + } + ] + } +}