Add s390x architecture support for CI, packaging, and binary validation#5391
Add s390x architecture support for CI, packaging, and binary validation#5391Devarsh Patel (Devarsh010) wants to merge 1 commit intomasterfrom
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
Adds s390x (IBM Z) support to the release artifact build and packaging pipeline, including CI builds via QEMU and NuGet/static package inclusion, plus binary type validation for the new architecture.
Changes:
- Extend release artifact build tooling to support
docker run --platform ...and add dependencies needed for s390x builds. - Add s390x mappings to NuGet and static bundle packaging so s390x binaries are included in produced packages.
- Add CI jobs to build s390x manylinux artifacts under emulation and validate s390x ELF binaries.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packaging/tools/build-release-artifacts.sh | Adds --platform support for cross-arch docker runs and updates CentOS build deps. |
| packaging/nuget/staticpackage.py | Includes s390x static library + pkg-config mappings for the static bundle. |
| packaging/nuget/packaging.py | Adds file-magic validation pattern for s390x ELF shared objects. |
| packaging/nuget/nugetpackage.py | Includes s390x runtime .so mapping in the NuGet package. |
| .semaphore/semaphore.yml | Adds a tagged-release CI block to build s390x artifacts using QEMU binfmt. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| docker_platform="" | ||
| if [ "$1" = "--platform" ]; then | ||
| docker_platform="--platform=$2" | ||
| shift 2 | ||
| fi |
There was a problem hiding this comment.
The --platform option is parsed without validating that a value is provided. If the script is invoked as ... --platform (missing the platform argument), $2 will be empty and shift 2 will fail under set -e, producing a confusing error. Add an explicit argument-count check (and a clear usage message) before reading $2/shifting.
| prologue: | ||
| commands: | ||
| - '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY' | ||
| - docker run --privileged --rm tonistiigi/binfmt --install s390x |
There was a problem hiding this comment.
The binfmt helper container is referenced without a tag or digest (tonistiigi/binfmt). This makes the CI setup non-reproducible and increases supply-chain risk if the upstream image changes. Pin this image to a specific version tag (or, ideally, an immutable digest).
| - docker run --privileged --rm tonistiigi/binfmt --install s390x | |
| - docker run --privileged --rm tonistiigi/binfmt:qemu-v8.1.5 --install s390x |
pranav shah (prashah-confluent)
left a comment
There was a problem hiding this comment.
Lets do couple of checks as commented below
| './usr/local/lib/librdkafka.so.1', | ||
| 'runtimes/linux-arm64/native/alpine-librdkafka.so'), | ||
|
|
||
| # Linux glibc centos8 s390x without GSSAPI (no external deps) |
There was a problem hiding this comment.
Check with Emanuele Sabellico (@emasab) on whether we need similar one for with GSSAPI
| ('win', 'x86', '.lib'): re.compile('current ar archive'), | ||
| ('linux', 'x64', '.so'): re.compile('ELF 64.* x86-64'), | ||
| ('linux', 'arm64', '.so'): re.compile('ELF 64.* ARM aarch64'), | ||
| ('linux', 's390x', '.so'): re.compile('ELF 64.* IBM S/390'), |
There was a problem hiding this comment.
If we run file librdkafka.so then it does print the below string
artifacts-s390x-qemu/usr/local/lib/librdkafka.so.1: ELF 64-bit MSB shared object, IBM S/390, version 1 (SYSV), dynamically linked, BuildID[sha1]=
The format looks correct but lets reconfirm once if we need this change.
No description provided.