Skip to content

Commit

Permalink
Build all upstream supported platforms
Browse files Browse the repository at this point in the history
Not sure if this is a good thing to do, but at least want to see how
many of them would work out of the box.
  • Loading branch information
WyriHaximus committed Jan 24, 2025
1 parent a0f9d3a commit 20e512e
Showing 1 changed file with 15 additions and 15 deletions.
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

0 comments on commit 20e512e

Please sign in to comment.