-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add support for cross-compiling for s390x platform #9455
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1ea1236
Added s390x platform support
haubenr eb30d05
Adapt to existing platform naming scheme
haubenr 8e879b3
Updated s390_64 library whitelist
haubenr 39b0e3e
Fixed s390x library whitelist
haubenr 97c15c2
Use g++ compiler version 8.x for s390x
haubenr 890c984
Use g++ compiler version 8.x for s390x
haubenr 51ccbb8
Use g++ compiler version 8.x for s390x
haubenr 3e51545
Introduced dedicated Docker container for building s390x artifacts
haubenr e831fc1
Minor fix
haubenr 4d07264
Merge branch 'master' into haubenr_add-s390x-support
ejona86 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -exu -o pipefail | ||
|
||
# first we need to install the prerequisites required for s390x cross compilation | ||
apt-get update && apt-get install -y g++-s390x-linux-gnu | ||
|
||
# now kick off the build for the mvn artifacts for s390x | ||
# mvn artifacts are stored in grpc-java/mvn-artifacts/ | ||
SKIP_TESTS=true ARCH=s390_64 "$(dirname $0)"/kokoro/unix.sh | ||
|
15 changes: 15 additions & 0 deletions
15
buildscripts/grpc-java-artifacts/Dockerfile.multiarch.base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ubuntu:22.04 | ||
|
||
# make sure apt-get works in unattended mode | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# install the OS-level prerequisites for building protobuf and running the gradle build | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends ca-certificates build-essential wget curl openjdk-8-jdk && \ | ||
apt-get autoclean -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to install
g++-s390x-linux-gnu
within the Dockerfile.If we do that, do we need this
build_s390x_artifacts_in_docker.sh
any more?"$GRPC_JAVA_DIR"/buildscripts/run_in_docker.sh grpc-java-artifacts-x86 SKIP_TESTS=true ARCH=s390_64 /grpc-java/buildscripts/kokoro/unix.sh
might just work.(And that's making me want to remove
build_artifacts_in_docker.sh
, because we can simply run docker twice.)