From bc046ec2a1050e49557d1290aae8d284f2f0236f Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 14:28:49 -0300 Subject: [PATCH 1/6] Fold PHPCS and PHPStan into one job and test PHP 8.5 The two jobs were identical up to their final step, each paying for its own Setup PHP. That step is the flaky one (#178), so running it twice to reach two short commands was two chances for a run to fall over instead of one. They are now steps in a single Coding Standards & Static Analysis job. The one thing given up is that PHPCS failing now stops the job before PHPStan reports, where before the two ran in parallel and both spoke. That seemed a fair trade for halving the exposure, and the fix for a PHPCS failure rarely depends on knowing PHPStan's verdict at the same time. PHP 8.5 joins the test matrix. composer.json already allows it at >=8.1 and the suite passes on 8.5.9 locally: 915 tests, PHPStan and PHPCS clean, check-platform-reqs satisfied. 8.4 is deliberately not added, only 8.5. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/ci.yml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c14788b..815f95d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -8,8 +8,13 @@ on: pull_request: jobs: - lint: - name: Coding Standards + # PHPCS and PHPStan share a job so the two of them draw once on Setup PHP + # rather than twice. That step is slow and intermittently fails on 8.3 + # (see #178), so every job that can be folded into another is one less + # chance for a run to fall over. They run as separate steps, and PHPCS + # failing stops the job before PHPStan reports. + quality: + name: Coding Standards & Static Analysis runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -32,28 +37,6 @@ jobs: - name: Run PHPCS run: composer cs - - static-analysis: - name: PHPStan - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3' - tools: composer:v2 - - - name: Cache Composer packages - uses: actions/cache@v3 - with: - path: ~/.composer/cache - key: composer-${{ hashFiles('composer.json') }} - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-interaction - - name: Run PHPStan run: composer lint @@ -67,6 +50,7 @@ jobs: - '8.1' - '8.2' - '8.3' + - '8.5' steps: - uses: actions/checkout@v4 @@ -108,7 +92,7 @@ jobs: runs-on: ubuntu-latest # Only build a shippable artifact once changes land on main, and only # after the quality gates pass. - needs: [lint, static-analysis, test, no-debug] + needs: [quality, test, no-debug] if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 From 85c7a019399cf9106fe592280c0114ead5ac9c34 Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 14:44:54 -0300 Subject: [PATCH 2/6] Cache the .debs php-builder installs, to measure whether it helps Experiment for #178. On self-hosted runners setup-php installs PHP 8.3+ through php-builder, whose install.sh apt-installs ~70 -dev packages before unpacking the build. The build tarball itself is only 19MB, so that apt work is the whole cost, not the download. Ubuntu's image drops the .debs after install, so every job fetches them from the archive again. This keeps them and restores them through the cache server, which lives in the cluster, so a WAN download becomes a local one. The dependency list does not vary by PHP version, so a single key serves 8.3 and 8.5 and the quality and build jobs alike. Only the .debs are cached. /var/lib/apt/lists is deliberately left alone, since a stale index is how apt starts 404ing mid-install, and reducing flakiness is the entire point. The Report restored .debs step is temporary instrumentation to show whether the cache is actually being read. Baseline to beat, from run 526: 8.1 30s, 8.2 53s, 8.3 454s, quality 151s, 8.5 733s and a hard failure. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/ci.yml | 87 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 815f95d..96e6966 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,6 +19,35 @@ jobs: steps: - uses: actions/checkout@v4 + # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 + # -dev packages before unpacking the build (#178). Ubuntu's own image + # deletes the .debs after install, so every job re-downloads them from + # the archive. Keep them and restore them from the cache server, which + # lives in the cluster, turning a WAN download into a local one. + # + # The dep list is the same for every PHP version on the builder path, so + # one shared key serves them all. Only the .debs are cached, never + # /var/lib/apt/lists — a stale index is how you get 404s on install. + - name: Keep downloaded .debs + run: | + sudo rm -f /etc/apt/apt.conf.d/docker-clean + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ + | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null + + - name: Cache apt packages + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives/*.deb + key: apt-php-builder-deps-${{ runner.arch }}-v1 + + # Temporary, for #178: shows whether the cache actually served the + # builder's dependencies, and times the step that consumes them. + - name: Report restored .debs + run: | + echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" + echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" + date -u +'setup-php start: %H:%M:%S' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -54,6 +83,35 @@ jobs: steps: - uses: actions/checkout@v4 + # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 + # -dev packages before unpacking the build (#178). Ubuntu's own image + # deletes the .debs after install, so every job re-downloads them from + # the archive. Keep them and restore them from the cache server, which + # lives in the cluster, turning a WAN download into a local one. + # + # The dep list is the same for every PHP version on the builder path, so + # one shared key serves them all. Only the .debs are cached, never + # /var/lib/apt/lists — a stale index is how you get 404s on install. + - name: Keep downloaded .debs + run: | + sudo rm -f /etc/apt/apt.conf.d/docker-clean + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ + | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null + + - name: Cache apt packages + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives/*.deb + key: apt-php-builder-deps-${{ runner.arch }}-v1 + + # Temporary, for #178: shows whether the cache actually served the + # builder's dependencies, and times the step that consumes them. + - name: Report restored .debs + run: | + echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" + echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" + date -u +'setup-php start: %H:%M:%S' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -97,6 +155,35 @@ jobs: steps: - uses: actions/checkout@v4 + # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 + # -dev packages before unpacking the build (#178). Ubuntu's own image + # deletes the .debs after install, so every job re-downloads them from + # the archive. Keep them and restore them from the cache server, which + # lives in the cluster, turning a WAN download into a local one. + # + # The dep list is the same for every PHP version on the builder path, so + # one shared key serves them all. Only the .debs are cached, never + # /var/lib/apt/lists — a stale index is how you get 404s on install. + - name: Keep downloaded .debs + run: | + sudo rm -f /etc/apt/apt.conf.d/docker-clean + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ + | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null + + - name: Cache apt packages + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives/*.deb + key: apt-php-builder-deps-${{ runner.arch }}-v1 + + # Temporary, for #178: shows whether the cache actually served the + # builder's dependencies, and times the step that consumes them. + - name: Report restored .debs + run: | + echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" + echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" + date -u +'setup-php start: %H:%M:%S' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: From dd31afcd0654a22bd3dc44f5989cda80a13b952f Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 14:59:39 -0300 Subject: [PATCH 3/6] Revert the apt cache experiment: the cache service is switched off Measured on run 527 and it cannot work. Every actions/cache step on these runners prints Cache action is only supported on GHES version >= 3.5 ... check with GHES admin if Actions cache service is enabled or not and then no-ops. The save step finishes in 0.19-0.31s, which is not a few hundred megabytes of .debs going anywhere. setup-php timings were unchanged against the run 526 baseline, within the usual variance: 8.3 454s then 148s, 8.5 733s then 446s, both noise rather than signal. The same warning appears on the Composer cache this workflow has carried all along, including run 523 and earlier, so that step has never cached anything either. Worth fixing, but in the runner config rather than here. Leaving dead steps in the workflow is how the Composer cache went years without anyone noticing it did nothing, so the experiment comes out until act_runner has its cache service enabled. It is in the history when that happens. Detail in #178. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/ci.yml | 87 ----------------------------------------- 1 file changed, 87 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 96e6966..815f95d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,35 +19,6 @@ jobs: steps: - uses: actions/checkout@v4 - # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 - # -dev packages before unpacking the build (#178). Ubuntu's own image - # deletes the .debs after install, so every job re-downloads them from - # the archive. Keep them and restore them from the cache server, which - # lives in the cluster, turning a WAN download into a local one. - # - # The dep list is the same for every PHP version on the builder path, so - # one shared key serves them all. Only the .debs are cached, never - # /var/lib/apt/lists — a stale index is how you get 404s on install. - - name: Keep downloaded .debs - run: | - sudo rm -f /etc/apt/apt.conf.d/docker-clean - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ - | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null - - - name: Cache apt packages - uses: actions/cache@v3 - with: - path: /var/cache/apt/archives/*.deb - key: apt-php-builder-deps-${{ runner.arch }}-v1 - - # Temporary, for #178: shows whether the cache actually served the - # builder's dependencies, and times the step that consumes them. - - name: Report restored .debs - run: | - echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" - echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" - date -u +'setup-php start: %H:%M:%S' - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -83,35 +54,6 @@ jobs: steps: - uses: actions/checkout@v4 - # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 - # -dev packages before unpacking the build (#178). Ubuntu's own image - # deletes the .debs after install, so every job re-downloads them from - # the archive. Keep them and restore them from the cache server, which - # lives in the cluster, turning a WAN download into a local one. - # - # The dep list is the same for every PHP version on the builder path, so - # one shared key serves them all. Only the .debs are cached, never - # /var/lib/apt/lists — a stale index is how you get 404s on install. - - name: Keep downloaded .debs - run: | - sudo rm -f /etc/apt/apt.conf.d/docker-clean - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ - | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null - - - name: Cache apt packages - uses: actions/cache@v3 - with: - path: /var/cache/apt/archives/*.deb - key: apt-php-builder-deps-${{ runner.arch }}-v1 - - # Temporary, for #178: shows whether the cache actually served the - # builder's dependencies, and times the step that consumes them. - - name: Report restored .debs - run: | - echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" - echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" - date -u +'setup-php start: %H:%M:%S' - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -155,35 +97,6 @@ jobs: steps: - uses: actions/checkout@v4 - # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 - # -dev packages before unpacking the build (#178). Ubuntu's own image - # deletes the .debs after install, so every job re-downloads them from - # the archive. Keep them and restore them from the cache server, which - # lives in the cluster, turning a WAN download into a local one. - # - # The dep list is the same for every PHP version on the builder path, so - # one shared key serves them all. Only the .debs are cached, never - # /var/lib/apt/lists — a stale index is how you get 404s on install. - - name: Keep downloaded .debs - run: | - sudo rm -f /etc/apt/apt.conf.d/docker-clean - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ - | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null - - - name: Cache apt packages - uses: actions/cache@v3 - with: - path: /var/cache/apt/archives/*.deb - key: apt-php-builder-deps-${{ runner.arch }}-v1 - - # Temporary, for #178: shows whether the cache actually served the - # builder's dependencies, and times the step that consumes them. - - name: Report restored .debs - run: | - echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" - echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" - date -u +'setup-php start: %H:%M:%S' - - name: Setup PHP uses: shivammathur/setup-php@v2 with: From d5eb2764a34c4d5a7a2f22c5dee30a8826496c25 Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 15:04:33 -0300 Subject: [PATCH 4/6] Retry the apt cache on actions/cache@v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My last conclusion was wrong. The GHES warning is not evidence that the runner has no cache server; it is actions/cache v3 disabling itself. v3's isGhes() reads GITHUB_SERVER_URL, and anything that is not github.com reads as GitHub Enterprise, so on Gitea it always trips and the action returns before touching the cache. That explains the 0.2s save perfectly well without any runner setting being off. Gitea's runner 3.0.0 release notes say every runner starts its own cache server and that the runner "patches action bundles at load time to open the GHES gate and read the cache endpoint from ACTIONS_CACHE_URL", with actions/cache supported unforked. Our runners report v3.0.0, so the server should be there and the gate should be open — but the patching evidently does not reach a v3 bundle. So this reapplies the apt cache and moves every actions/cache to v4. If the hypothesis holds the GHES warning disappears, the save step actually takes time, and a second run restores the .debs. The Composer cache gets the bump too, since it has been silently doing nothing for the same reason. Refs #178. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/ci.yml | 91 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 815f95d..cf2a660 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,6 +19,35 @@ jobs: steps: - uses: actions/checkout@v4 + # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 + # -dev packages before unpacking the build (#178). Ubuntu's own image + # deletes the .debs after install, so every job re-downloads them from + # the archive. Keep them and restore them from the cache server, which + # lives in the cluster, turning a WAN download into a local one. + # + # The dep list is the same for every PHP version on the builder path, so + # one shared key serves them all. Only the .debs are cached, never + # /var/lib/apt/lists — a stale index is how you get 404s on install. + - name: Keep downloaded .debs + run: | + sudo rm -f /etc/apt/apt.conf.d/docker-clean + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ + | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null + + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives/*.deb + key: apt-php-builder-deps-${{ runner.arch }}-v1 + + # Temporary, for #178: shows whether the cache actually served the + # builder's dependencies, and times the step that consumes them. + - name: Report restored .debs + run: | + echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" + echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" + date -u +'setup-php start: %H:%M:%S' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -26,7 +55,7 @@ jobs: tools: composer:v2 - name: Cache Composer packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.composer/cache key: composer-${{ hashFiles('composer.json') }} @@ -54,6 +83,35 @@ jobs: steps: - uses: actions/checkout@v4 + # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 + # -dev packages before unpacking the build (#178). Ubuntu's own image + # deletes the .debs after install, so every job re-downloads them from + # the archive. Keep them and restore them from the cache server, which + # lives in the cluster, turning a WAN download into a local one. + # + # The dep list is the same for every PHP version on the builder path, so + # one shared key serves them all. Only the .debs are cached, never + # /var/lib/apt/lists — a stale index is how you get 404s on install. + - name: Keep downloaded .debs + run: | + sudo rm -f /etc/apt/apt.conf.d/docker-clean + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ + | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null + + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives/*.deb + key: apt-php-builder-deps-${{ runner.arch }}-v1 + + # Temporary, for #178: shows whether the cache actually served the + # builder's dependencies, and times the step that consumes them. + - name: Report restored .debs + run: | + echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" + echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" + date -u +'setup-php start: %H:%M:%S' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -63,7 +121,7 @@ jobs: tools: composer:v2 - name: Cache Composer packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.composer/cache key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} @@ -97,6 +155,35 @@ jobs: steps: - uses: actions/checkout@v4 + # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 + # -dev packages before unpacking the build (#178). Ubuntu's own image + # deletes the .debs after install, so every job re-downloads them from + # the archive. Keep them and restore them from the cache server, which + # lives in the cluster, turning a WAN download into a local one. + # + # The dep list is the same for every PHP version on the builder path, so + # one shared key serves them all. Only the .debs are cached, never + # /var/lib/apt/lists — a stale index is how you get 404s on install. + - name: Keep downloaded .debs + run: | + sudo rm -f /etc/apt/apt.conf.d/docker-clean + echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ + | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null + + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives/*.deb + key: apt-php-builder-deps-${{ runner.arch }}-v1 + + # Temporary, for #178: shows whether the cache actually served the + # builder's dependencies, and times the step that consumes them. + - name: Report restored .debs + run: | + echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" + echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" + date -u +'setup-php start: %H:%M:%S' + - name: Setup PHP uses: shivammathur/setup-php@v2 with: From 43b903c1c8819f1f7fca39c7a1c59d6c2b065489 Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 15:07:18 -0300 Subject: [PATCH 5/6] Revert the v4 cache retry: the gate stays shut, so it is the runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested and the hypothesis is dead. actions/cache@v4 resolved properly (SHA 0057852) and printed the same GHES warning as v3, so the action version was not what was closing the gate. That points at the runner rather than the action. Gitea's docs say the runner patches the GHES check out of the action's bundle only when it recognises it, and that a bundle it does not recognise "is left alone". No patching for either v3 or v4, and no ACTIONS_CACHE_URL to patch it towards, is what you get when cache is simply off in the runner config. So the fix is cache.enabled in act_runner's config.yaml, with host set to an address job containers can reach. Nothing in this repository unblocks it, and inert steps are what let the Composer cache rot unnoticed, so the experiment comes out again. Both halves — the apt cache and the move to v4 — should land together once the runner serves a cache. Refs #178. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/ci.yml | 91 +---------------------------------------- 1 file changed, 2 insertions(+), 89 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cf2a660..815f95d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,35 +19,6 @@ jobs: steps: - uses: actions/checkout@v4 - # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 - # -dev packages before unpacking the build (#178). Ubuntu's own image - # deletes the .debs after install, so every job re-downloads them from - # the archive. Keep them and restore them from the cache server, which - # lives in the cluster, turning a WAN download into a local one. - # - # The dep list is the same for every PHP version on the builder path, so - # one shared key serves them all. Only the .debs are cached, never - # /var/lib/apt/lists — a stale index is how you get 404s on install. - - name: Keep downloaded .debs - run: | - sudo rm -f /etc/apt/apt.conf.d/docker-clean - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ - | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null - - - name: Cache apt packages - uses: actions/cache@v4 - with: - path: /var/cache/apt/archives/*.deb - key: apt-php-builder-deps-${{ runner.arch }}-v1 - - # Temporary, for #178: shows whether the cache actually served the - # builder's dependencies, and times the step that consumes them. - - name: Report restored .debs - run: | - echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" - echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" - date -u +'setup-php start: %H:%M:%S' - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -55,7 +26,7 @@ jobs: tools: composer:v2 - name: Cache Composer packages - uses: actions/cache@v4 + uses: actions/cache@v3 with: path: ~/.composer/cache key: composer-${{ hashFiles('composer.json') }} @@ -83,35 +54,6 @@ jobs: steps: - uses: actions/checkout@v4 - # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 - # -dev packages before unpacking the build (#178). Ubuntu's own image - # deletes the .debs after install, so every job re-downloads them from - # the archive. Keep them and restore them from the cache server, which - # lives in the cluster, turning a WAN download into a local one. - # - # The dep list is the same for every PHP version on the builder path, so - # one shared key serves them all. Only the .debs are cached, never - # /var/lib/apt/lists — a stale index is how you get 404s on install. - - name: Keep downloaded .debs - run: | - sudo rm -f /etc/apt/apt.conf.d/docker-clean - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ - | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null - - - name: Cache apt packages - uses: actions/cache@v4 - with: - path: /var/cache/apt/archives/*.deb - key: apt-php-builder-deps-${{ runner.arch }}-v1 - - # Temporary, for #178: shows whether the cache actually served the - # builder's dependencies, and times the step that consumes them. - - name: Report restored .debs - run: | - echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" - echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" - date -u +'setup-php start: %H:%M:%S' - - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -121,7 +63,7 @@ jobs: tools: composer:v2 - name: Cache Composer packages - uses: actions/cache@v4 + uses: actions/cache@v3 with: path: ~/.composer/cache key: ${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} @@ -155,35 +97,6 @@ jobs: steps: - uses: actions/checkout@v4 - # setup-php installs PHP 8.3+ through php-builder, which apt-installs ~70 - # -dev packages before unpacking the build (#178). Ubuntu's own image - # deletes the .debs after install, so every job re-downloads them from - # the archive. Keep them and restore them from the cache server, which - # lives in the cluster, turning a WAN download into a local one. - # - # The dep list is the same for every PHP version on the builder path, so - # one shared key serves them all. Only the .debs are cached, never - # /var/lib/apt/lists — a stale index is how you get 404s on install. - - name: Keep downloaded .debs - run: | - sudo rm -f /etc/apt/apt.conf.d/docker-clean - echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \ - | sudo tee /etc/apt/apt.conf.d/99keep-downloaded-packages >/dev/null - - - name: Cache apt packages - uses: actions/cache@v4 - with: - path: /var/cache/apt/archives/*.deb - key: apt-php-builder-deps-${{ runner.arch }}-v1 - - # Temporary, for #178: shows whether the cache actually served the - # builder's dependencies, and times the step that consumes them. - - name: Report restored .debs - run: | - echo "restored .debs: $(ls /var/cache/apt/archives/*.deb 2>/dev/null | wc -l)" - echo "restored size: $(du -sh /var/cache/apt/archives 2>/dev/null | cut -f1)" - date -u +'setup-php start: %H:%M:%S' - - name: Setup PHP uses: shivammathur/setup-php@v2 with: From f6481d4a3f34768ed1175220754db1725dd727be Mon Sep 17 00:00:00 2001 From: James Griffin Date: Thu, 20 Aug 2026 15:33:03 -0300 Subject: [PATCH 6/6] Hold PHP 8.5 until the runner serves a cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8.5 lands on setup-php's php-builder path, same as 8.3, so it pays for ~70 apt -dev packages on every run. It timed out in run 526 and passed in 527 on identical code, which is a coin toss, and merging it would mean intermittent red for a version nothing ships on yet. The code is fine on 8.5 — verified locally on 8.5.9: 915 tests, PHPStan and PHPCS clean, check-platform-reqs satisfied. This is purely about the runners, so 8.5 comes back once #178 is fixed and the matrix is cheap again. This PR is now just the PHPCS/PHPStan consolidation. Refs #178. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Uw545F1vveNJKjzLxdi2ks --- .gitea/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 815f95d..d8cf893 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -50,7 +50,6 @@ jobs: - '8.1' - '8.2' - '8.3' - - '8.5' steps: - uses: actions/checkout@v4