Skip to content

feat: Add Dockerfiles and a build script for multi-target PHP extensi… - #9

Merged
Soner (shyim) merged 5 commits into
mainfrom
ci/add-gh-job
Dec 15, 2025
Merged

Soner (shyim) merged 5 commits into
mainfrom
ci/add-gh-job

Conversation

@shyim

Copy link
Copy Markdown
Contributor

…on builds, updating CI to use them.

Copilot AI review requested due to automatic review settings December 15, 2025 09:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a comprehensive Docker-based build system for compiling the Shopware PHP extension across multiple PHP versions, CPU architectures, and libc implementations. It replaces the previous simple build workflow with a matrix-based approach supporting 16 build combinations (4 PHP versions × 2 libc types × 2 CPU architectures).

Key changes:

  • Adds two separate Dockerfiles (gnu/musl) optimized for different libc implementations with multi-stage builds
  • Introduces a local build script for developer convenience
  • Replaces the single-configuration GitHub Actions workflow with a comprehensive matrix build strategy

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
build-docker.sh Local build script to generate extension binaries for multiple PHP versions and libc types
Dockerfile.musl Multi-stage Dockerfile for building the extension on Alpine Linux (musl libc) with Rust and required dependencies
Dockerfile.gnu Multi-stage Dockerfile for building the extension on Debian (glibc) with Rust and required dependencies
.github/workflows/build.yml Updated CI workflow from single build to 16-variant matrix build covering PHP 8.1-8.4, gnu/musl, and x86_64/aarch64

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build-docker.sh
Comment thread build-docker.sh
Comment thread build-docker.sh Outdated
Comment thread Dockerfile.gnu
# Copy Cargo files first to cache dependencies
COPY Cargo.toml Cargo.lock ./

# Create a dummy main.rs to build dependencies and cache them

Copilot AI Dec 15, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment incorrectly refers to 'main.rs' when it should say 'lib.rs', as shown in the actual command on line 32.

Suggested change
# Create a dummy main.rs to build dependencies and cache them
# Create a dummy lib.rs to build dependencies and cache them

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/build-artifact.yml
Comment thread .github/workflows/build.yml
Comment thread Dockerfile.gnu
Comment thread Dockerfile.gnu
Comment thread .github/workflows/build-artifact.yml
@shyim
Soner (shyim) merged commit b0ff27f into main Dec 15, 2025
1 check passed
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.

2 participants