From 9d2996638370be478fa1daca8b93bbbaa3013cbb Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 19 Nov 2026 21:05:08 +0100 Subject: [PATCH] Modernize Ubuntu build workflow for phpyaz Align triggers, permissions, concurrency, dependency installation, and failure diagnostics with build-complete-yaz.yaml. Configure GCC explicitly and enable parallel builds with test failure reporting. Rename the workflow file and display name to identify Ubuntu ahead of adding a separate Windows workflow. --- .github/workflows/build-phpyaz-ubuntu.yaml | 55 ++++++++++++++++++++++ .github/workflows/build-phpyaz.yaml | 21 --------- 2 files changed, 55 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/build-phpyaz-ubuntu.yaml delete mode 100644 .github/workflows/build-phpyaz.yaml diff --git a/.github/workflows/build-phpyaz-ubuntu.yaml b/.github/workflows/build-phpyaz-ubuntu.yaml new file mode 100644 index 0000000..ae85035 --- /dev/null +++ b/.github/workflows/build-phpyaz-ubuntu.yaml @@ -0,0 +1,55 @@ +name: Build phpyaz on Ubuntu + +on: + push: + branches: [master] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 1 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + php-dev gcc make pkg-config libyaz-dev + + - name: Run phpize + run: phpize + + - name: Configure with GCC + env: + CC: gcc + CFLAGS: -g -O2 -Wall + run: ./configure --with-yaz + + - name: Build and test with GCC + env: + NO_INTERACTION: 1 + REPORT_EXIT_STATUS: 1 + run: make -j4 test + + - name: Show build and test failures + if: failure() + run: | + for log in config.log tests/*.log tests/*.diff; do + if test -f "$log"; then + echo "::group::$log" + cat "$log" + echo "::endgroup::" + fi + done diff --git a/.github/workflows/build-phpyaz.yaml b/.github/workflows/build-phpyaz.yaml deleted file mode 100644 index 3212990..0000000 --- a/.github/workflows/build-phpyaz.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Build phpyaz -on: [push, pull_request] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - with: - fetch-depth: 1 - - name: update packages - run: sudo apt update - - name: Install required and optional dependencies - run: > - sudo apt install php-dev gcc make pkg-config libyaz-dev - - name: Run phpize for phpyaz - run: phpize - - name: Run configure for phpyaz - run: > - ./configure - - name: Run make test for phpyaz - run: NO_INTERACTION=1 make test