From 42231ca008dfef5844bfda1187251025338791fe Mon Sep 17 00:00:00 2001 From: Sander Muller Date: Wed, 4 Nov 2026 10:37:26 +0100 Subject: [PATCH] Cache Composer packages in the musl differential tests The musl differential test job installs Composer packages inside an Alpine container with an empty cache. Each of its 20 legs downloads every package from GitHub, and one failed download fails the leg. A leg failed on an HTTP 504 for symfony/polyfill-intl-normalizer, after Composer retried the download. The job now restores a Composer cache, keyed on composer.lock, the same way it restores the PHP build. turbo-compile-core-musl-arm64 keeps its uncached install, because the core it builds ships. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/phar.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/phar.yml b/.github/workflows/phar.yml index 9ccc5ef72b4..2ca64b9fce3 100644 --- a/.github/workflows/phar.yml +++ b/.github/workflows/phar.yml @@ -2188,6 +2188,7 @@ jobs: docker run -d --name alpine-test \ -v "$PWD:/work" -w /work \ -e PHP_MINOR -e PHP_ZTS -e PHP_CACHE_DIR=/work/alpine-php-cache \ + -e COMPOSER_CACHE_DIR=/work/composer-cache \ "$ALPINE_IMAGE" sleep 7200 # see turbo-compile @@ -2208,6 +2209,17 @@ jobs: - name: "Trust the checkout despite the container/host uid mismatch" run: docker exec alpine-test git config --global --add safe.directory /work + # Without a cache, each of the 20 legs downloads every package from + # GitHub, and one failed download fails the leg. The differential + # tests ship nothing, so unlike turbo-compile-core-musl-arm64 they + # can trust a cache entry. + - name: "Restore the Composer cache" + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: "composer-cache" + key: "composer-musl-${{ hashFiles('composer.lock') }}" + restore-keys: "composer-musl-" + - name: "Install Composer dependencies (verified composer)" run: | docker exec -i alpine-test sh -e <<'EOF'