diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..25746a6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + name: PHP ${{ matrix.php }} ${{ matrix.ts }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, macos-15] + php: ['8.4', '8.5'] + ts: [nts, zts] + + steps: + - uses: actions/checkout@v4 + + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: none + env: + phpts: ${{ matrix.ts == 'zts' && 'ts' || 'nts' }} + + - name: Build + run: | + phpize + ./configure --enable-rasterize + make -j"$(nproc 2>/dev/null || sysctl -n hw.ncpu)" + + - name: Load + run: | + php -n -d extension="$PWD/modules/rasterize.so" -r 'exit(extension_loaded("rasterize") ? 0 : 1);' + php -n -d extension="$PWD/modules/rasterize.so" --ri rasterize diff --git a/README.md b/README.md index 56949fb..6429bec 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # ext-rasterize +[![CI](https://img.shields.io/github/actions/workflow/status/php-io-extensions/rasterize/ci.yml?style=flat-square&label=CI)](https://github.com/php-io-extensions/rasterize/actions/workflows/ci.yml) + Shapes into coverage spans in C. `RasterScanner` holds a clip and an edge mode and answers paths, ellipses, rings and one-pixel polylines as span bytes, ready for a pixel store to paint. Geometry only: it never touches a pixel. Written