[PECL-CVS] [pecl-processing-rrd] master: ci: add GitHub Actions build and test matrix (#8)

[email protected] (Thomas Vincent via GitHub)
Newsgroups php.pecl.cvs
Message-ID <[email protected]>
Author: Thomas Vincent (somethingwithproof)
Committer: GitHub (web-flow)
Pusher: MirKml
Date: 2026-08-20T14:37:25+02:00

Commit: https://github.com/php/pecl-processing-rrd/commit/c8e18ba19190c50487e5889e9c36921ec94f1411
Raw diff: https://github.com/php/pecl-processing-rrd/commit/c8e18ba19190c50487e5889e9c36921ec94f1411.diff

ci: add GitHub Actions build and test matrix (#8)

Builds the extension against librrd and runs the .phpt suite on PHP
8.1 through 8.5. The PHP 8.5 build break in #7 shipped unnoticed because
nothing exercised the build; this catches that class of regression.

Signed-off-by: Thomas Vincent <[email protected]>

Changed paths:
  A  .github/workflows/ci.yml


Diff:

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..0f58412
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,55 @@
+name: CI
+
+on:
+  push:
+    branches: [ master, main ]
+  pull_request:
+  workflow_dispatch:
+
+permissions:
+  contents: read
+
+jobs:
+  build:
+    name: PHP ${{ matrix.php }}
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        php: ['8.1', '8.2', '8.3', '8.4', '8.5']
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+
+      - name: Install librrd
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y librrd-dev pkg-config
+
+      - name: Setup PHP
+        uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
+        with:
+          php-version: ${{ matrix.php }}
+          tools: none
+          coverage: none
+
+      - name: Build
+        run: |
+          phpize
+          ./configure --with-rrd
+          make -j"$(nproc)"
+
+      - name: Test
+        run: make test
+        env:
+          NO_INTERACTION: 1
+          REPORT_EXIT_STATUS: 1
+
+      - name: Show test diffs on failure
+        if: failure()
+        run: |
+          for f in tests/*.diff tests/*.out tests/*.log; do
+            [ -f "$f" ] && { echo "===== $f ====="; cat "$f"; }
+          done
+          exit 0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.