Skip to content

ci: reduce pull request build matrices - #2581

Closed
ousamabenyounes wants to merge 2 commits into
php:mainfrom
ousamabenyounes:fix-2580-reduce-pr-build-matrix
Closed

ci: reduce pull request build matrices#2581
ousamabenyounes wants to merge 2 commits into
php:mainfrom
ousamabenyounes:fix-2580-reduce-pr-build-matrix

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Fixes #2580.

What changed

  • Added .github/scripts/ci-build-matrix.sh to centralize Docker/static build matrix selection.
  • Pull requests without the full-build-matrix label now run a reduced build matrix:
    • Docker images: one bookworm variant per PHP version on linux/amd64.
    • Static binaries: linux/amd64 only.
  • Pushes, schedules, releases, manual runs, and PRs labeled full-build-matrix keep the full matrix.

RED

.github/scripts/ci-build-matrix-test.sh

.github/scripts/ci-build-matrix-test.sh: line 12: .github/scripts/ci-build-matrix.sh: No such file or directory

GREEN

.github/scripts/ci-build-matrix-test.sh
bash -n .github/scripts/ci-build-matrix.sh .github/scripts/ci-build-matrix-test.sh
docker run --rm --label com.ora.cleanup.scope=contribute -v "$PWD":/work -w /work mikefarah/yq:4.47.2 '.name' .github/workflows/docker.yaml .github/workflows/static.yaml\n\nBuild Docker Images\n---\nBuild binary releases\n```\n\n## Matrix smoke checks\n```\nMETADATA="$(docker buildx bake --print | jq -c)" .github/scripts/ci-build-matrix.sh docker false\nvariants=["php-8-2-bookworm","php-8-3-bookworm","php-8-4-bookworm","php-8-5-bookworm"]\nplatforms=["linux/amd64"]\n\nMETADATA="$(docker buildx bake --print static-builder-musl | jq -c)" .github/scripts/ci-build-matrix.sh static false\nplatforms=["linux/amd64"]\n```

@ousamabenyounes
ousamabenyounes force-pushed the fix-2580-reduce-pr-build-matrix branch 3 times, most recently from 5bd8c59 to d725698 Compare August 16, 2026 16:52
ousamabenyounes and others added 2 commits September 10, 2026 16:28
Pull requests without the full-build-matrix label now build a reduced
docker/static matrix (one bookworm variant per PHP version on
linux/amd64), while pushes, schedules, releases, manual runs and
labeled PRs keep the full matrix.

Fixes php#2580.
@ousamabenyounes
ousamabenyounes force-pushed the fix-2580-reduce-pr-build-matrix branch from d725698 to ec1570d Compare September 10, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

don't rebuild full docker/binary matrix every pull request

1 participant