mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-07-27 16:12:40 +00:00
Prove the composer.json works end to end: a `pie-install` job downloads a pinned pie.phar, runs `pie install` from the checkout, and verifies the gnupg extension is loaded. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ${{ matrix.ubuntu }}
|
|
strategy:
|
|
matrix:
|
|
ubuntu: [ubuntu-22.04, ubuntu-24.04]
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gpg gpgsm libgpgme-dev php-cli php-dev autoconf libtool make gcc
|
|
|
|
- name: Checkout php-gnupg
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Build and install php-gnupg
|
|
run: |
|
|
phpize
|
|
./configure
|
|
make
|
|
sudo make install
|
|
|
|
- name: Run tests
|
|
run: |
|
|
make test
|
|
|
|
pie-install:
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
PIE_VERSION: "1.4.8"
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gpg gpgsm libgpgme-dev php-cli php-dev autoconf libtool make gcc
|
|
|
|
- name: Checkout php-gnupg
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Download pie.phar
|
|
run: |
|
|
curl -fsSL -o pie.phar \
|
|
"https://github.com/php/pie/releases/download/${PIE_VERSION}/pie.phar"
|
|
|
|
- name: Install php-gnupg with PIE
|
|
# PIE builds as the current user and auto-elevates with sudo (passwordless
|
|
# in GitHub Actions) only for the final install step.
|
|
run: php pie.phar install
|
|
|
|
- name: Verify the extension is loaded
|
|
run: php -m | grep -qx gnupg
|