1
0
Fork 0

CI
Some checks failed
Build PHP PDO SQLCipher packages / php8.0 on debian-12-bookworm (push) Successful in 4m21s
Build PHP PDO SQLCipher packages / php8.1 on debian-12-bookworm (push) Successful in 4m33s
Build PHP PDO SQLCipher packages / php8.2 on debian-12-bookworm (push) Successful in 4m13s
Build PHP PDO SQLCipher packages / php7.4 on debian-13-trixie (push) Failing after 3m48s
Build PHP PDO SQLCipher packages / php8.0 on debian-13-trixie (push) Successful in 4m8s
Build PHP PDO SQLCipher packages / php8.1 on debian-13-trixie (push) Successful in 3m59s
Build PHP PDO SQLCipher packages / php8.3 on debian-12-bookworm (push) Successful in 4m5s
Build PHP PDO SQLCipher packages / php8.4 on debian-12-bookworm (push) Successful in 4m7s
Build PHP PDO SQLCipher packages / php8.2 on debian-13-trixie (push) Successful in 3m57s
Build PHP PDO SQLCipher packages / php8.3 on debian-13-trixie (push) Successful in 4m4s
Build PHP PDO SQLCipher packages / php8.4 on debian-13-trixie (push) Successful in 3m56s
Build PHP PDO SQLCipher packages / php7.4 on ubuntu-22.04 (push) Failing after 4m48s
Build PHP PDO SQLCipher packages / php8.0 on ubuntu-22.04 (push) Successful in 4m24s
Build PHP PDO SQLCipher packages / php8.1 on ubuntu-22.04 (push) Successful in 4m59s
Build PHP PDO SQLCipher packages / php8.2 on ubuntu-22.04 (push) Successful in 4m34s
Build PHP PDO SQLCipher packages / php8.3 on ubuntu-22.04 (push) Successful in 4m31s
Build PHP PDO SQLCipher packages / php8.4 on ubuntu-22.04 (push) Successful in 5m3s
Build PHP PDO SQLCipher packages / php7.4 on ubuntu-24.04 (push) Failing after 5m6s
Build PHP PDO SQLCipher packages / php8.0 on ubuntu-24.04 (push) Successful in 4m49s
Build PHP PDO SQLCipher packages / php8.1 on ubuntu-24.04 (push) Successful in 4m53s
Build PHP PDO SQLCipher packages / php8.2 on ubuntu-24.04 (push) Successful in 4m40s
Build PHP PDO SQLCipher packages / php8.3 on ubuntu-24.04 (push) Successful in 4m29s
Build PHP PDO SQLCipher packages / php8.4 on ubuntu-24.04 (push) Successful in 4m40s
Build PHP PDO SQLCipher packages / php7.4 on debian-12-bookworm (push) Failing after 3m21s

This commit is contained in:
Miguel Jacq 2025-12-09 15:55:45 +11:00
parent 2aafefafb2
commit e0caa48382
Signed by: mig5
GPG key ID: 59B3F0C24135C6A9
2 changed files with 163 additions and 0 deletions

40
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,40 @@
name: Build PHP PDO SQLCipher packages
on:
push:
jobs:
build-debs:
strategy:
fail-fast: false
matrix:
os: [debian-13-trixie, debian-12-bookworm, ubuntu-22.04, ubuntu-24.04]
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
name: php${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Debian package
uses: ./
with:
php-version: ${{ matrix.php }}
sqlcipher-version: '4.12.0'
tz: 'UTC'
- name: Notify on failure
if: ${{ failure() }}
env:
WEBHOOK_URL: ${{ secrets.NODERED_WEBHOOK_URL }}
REPOSITORY: ${{ forgejo.repository }}
RUN_NUMBER: ${{ forgejo.run_number }}
SERVER_URL: ${{ forgejo.server_url }}
run: |
curl -X POST \
-H "Content-Type: application/json" \
-d "{\"repository\":\"$REPOSITORY\",\"run_number\":\"$RUN_NUMBER\",\"status\":\"failure\",\"url\":\"$SERVER_URL/$REPOSITORY/actions/runs/$RUN_NUMBER\"}" \
"$WEBHOOK_URL"

123
action.yml Normal file
View file

@ -0,0 +1,123 @@
name: Build php-pdo-sqlcipher Debian package
description: Build and test php-pdo-sqlcipher .deb using dpkg-buildpackage + autopkgtest on Debian
inputs:
php-version:
description: PHP version to build against (e.g. 8.2)
default: '8.2'
sqlcipher-version:
description: SQLCipher tag (without the leading v)
default: '4.12.0'
tz:
description: Timezone
default: 'UTC'
runs:
using: composite
steps:
- name: Set up APT and build dependencies
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
TZ: ${{ inputs.tz }}
run: |
set -euo pipefail
apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https apt-utils autoconf autopkgtest build-essential \
ca-certificates curl dpkg-dev devscripts debhelper dh-php pkg-php-tools \
git gnupg pkg-config \
libicu-dev libreadline-dev libssl-dev libsqlite3-dev libtool \
lintian lsb-release tcl-dev
- name: Configure PHP APT sources
shell: bash
env:
TZ: ${{ inputs.tz }}
DEBIAN_FRONTEND: noninteractive
PHP_VER: ${{ inputs.php-version }}
run: |
set -euo pipefail
./scripts/setup-php-sources.sh
- name: Install PHP build-deps
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
PHP_VER: ${{ inputs.php-version }}
run: |
set -euo pipefail
apt-get update
apt-get build-dep -y "php${PHP_VER}"
- name: Ensure PHP CLI with docs for autopkgtest
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
PHP_VER: ${{ inputs.php-version }}
run: |
set -euo pipefail
# Make sure docs are not excluded, autopkgtest needs examples
rm -f /etc/dpkg/dpkg.cfg.d/docker /etc/dpkg/dpkg.cfg.d/excludes || true
printf 'path-include=/usr/share/doc/*\n' > /etc/dpkg/dpkg.cfg.d/01-include-docs
apt-get update
apt-get install -y --no-install-recommends "php${PHP_VER}-cli"
- name: Fetch upstream sources (sqlcipher, pdo_sqlcipher, PHP)
shell: bash
env:
PHP_VER: ${{ inputs.php-version }}
SQLCIPHER_VERSION: ${{ inputs.sqlcipher-version }}
run: |
set -euo pipefail
cd "$FORGEJO_WORKSPACE"
# match Dockerfile layout in /work/src
git clone --branch "v${SQLCIPHER_VERSION}" --depth 1 \
https://github.com/sqlcipher/sqlcipher.git build-sqlcipher
git clone --branch main --depth 1 \
https://git.mig5.net/mig5/pdo_sqlcipher.git
mkdir -p php-src
cd php-src
apt-get -y source "php${PHP_VER}"
- name: Render Debian files and build package
shell: bash
env:
PHP_VER: ${{ inputs.php-version }}
SQLCIPHER_VERSION: ${{ inputs.sqlcipher-version }}
run: |
set -euo pipefail
cd "$FORGEJO_WORKSPACE"
umask 022
./scripts/render-debian-files.sh
dpkg-buildpackage -us -uc -b -rfakeroot
. /etc/os-release
lintian -i -E --pedantic --profile "${ID}" --fail-on error ../*.changes
- name: Run autopkgtest on built package
shell: bash
run: |
set -euo pipefail
cd "$FORGEJO_WORKSPACE"
pkg=$(ls -1 ../*.deb | grep -v dbgsym | head -n1)
echo "Testing package: $pkg"
autopkgtest "$pkg" -- null
- name: Collect artifacts
shell: bash
run: |
set -euo pipefail
cd "$FORGEJO_WORKSPACE"
mkdir -p dist
cp -a ../*.deb ../*.buildinfo ../*.changes dist/ || true