Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build all upstream supported platforms #262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
uses: wyrihaximus/github-action-supported-php-versions@v1
with:
upcomingReleases: true
supported-arch-matrix:
name: Supported processor architectures
supported-platform-matrix:
name: Supported processor platforms
runs-on: ubuntu-latest
outputs:
arch: ${{ steps.supported-arch-matrix.outputs.arch }}
platform: ${{ steps.supported-platform-matrix.outputs.platform }}
steps:
- uses: actions/checkout@v4
- id: supported-arch-matrix
name: Generate Arch
run: |
echo "arch=[\\\"amd64\\\",\\\"arm64\\\"]" >> $GITHUB_OUTPUT
- id: supported-platform-matrix
name: Generate platform
uses: wyrihaximus/github-action-oci-image-supported-platforms@main
with:
image: "php:8.4-cli-alpine3.21"
image-type-matrix:
name: Create Image Type Matrix
runs-on: ubuntu-latest
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
needs:
- lint
- image-matrix
- supported-arch-matrix
- supported-platform-matrix
- exclude-matrix
runs-on: ubuntu-latest
strategy:
Expand All @@ -153,7 +153,7 @@ jobs:
timeout_minutes: 120
retry_wait_seconds: 30
max_attempts: 5
command: (echo "${{ needs.supported-arch-matrix.outputs.arch }}" | jq -r '.[]') | xargs -I % ./build-php.sh $(echo "${{ matrix.image }}" | tr '-' ' ') %
command: (echo "${{ toJson(fromJson(needs.supported-platform-matrix.outputs.platform)) }}" | jq -r '.[]') | xargs -I % ./build-php.sh $(echo "${{ matrix.image }}" | tr '-' ' ') %
- run: cat ./docker-image/image.tags | xargs -I % docker inspect --format='%={{.Id}}:{{index .Config.Env 7}}' %
- run: docker save "${DOCKER_IMAGE}" | gzip -9 > ./docker-image/image.tar
- run: docker images
Expand All @@ -167,7 +167,7 @@ jobs:
needs:
- build
- image-matrix
- supported-arch-matrix
- supported-platform-matrix
- exclude-matrix
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
needs:
- build
- image-matrix
- supported-arch-matrix
- supported-platform-matrix
- exclude-matrix
runs-on: ubuntu-latest
strategy:
Expand All @@ -215,7 +215,7 @@ jobs:
- run: docker load --input ./docker-image/image.tar
- run: |
export IMAGE_BASE_VERSION=$(php -r 'echo explode("-", "${{ matrix.image }}")[2];')
(echo "${{ needs.supported-arch-matrix.outputs.arch }}" | jq -r '.[]') | xargs -I % make $(php -r 'echo "test-", explode("-", str_replace(["zts-zts", "cli-nts"], ["zts", "nts"], "${{ matrix.image }}"))[0];') IMAGE_ARCH=%
(echo "${{ needs.supported-platform-matrix.outputs.platform }}" | jq -r '.[]') | xargs -I % make $(php -r 'echo "test-", explode("-", str_replace(["zts-zts", "cli-nts"], ["zts", "nts"], "${{ matrix.image }}"))[0];') IMAGE_ARCH=%
- run: rm -Rf ./docker-image/
check-mark:
name: ✔️
Expand All @@ -233,7 +233,7 @@ jobs:
needs:
- check-mark
- image-matrix
- supported-arch-matrix
- supported-platform-matrix
- exclude-matrix
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -306,5 +306,5 @@ jobs:
cat ./command.sh
./command.sh
env:
TARGET_ARCHS: ${{ needs.supported-arch-matrix.outputs.arch }}
TARGET_ARCHS: ${{ needs.supported-platform-matrix.outputs.platform }}
- run: docker images
Loading