Skip to content

ci: reduce pull request build matrices - #2581

Open
ousamabenyounes wants to merge 1 commit into
php:mainfrom
ousamabenyounes:fix-2580-reduce-pr-build-matrix
Open

ci: reduce pull request build matrices#2581
ousamabenyounes wants to merge 1 commit 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```

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