-
Notifications
You must be signed in to change notification settings - Fork 192
ARM64 build for Test Server #2448
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
Changes from all commits
23467a3
c1abc24
d9c6cbf
b0d2105
ae57cb5
8dedf9c
8ace1a9
0703c5d
2d21ccc
bf4727d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,6 @@ | ||
| buildscript { | ||
| ext { | ||
| // 0.11.0 and later are build on JDK 11 bytecode version | ||
| graalVersion = "${JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_11) ? '0.12.0' : '0.10.0'}" | ||
| } | ||
| } | ||
|
|
||
| plugins { | ||
| id 'application' | ||
| id 'com.palantir.graal' version "${graalVersion}" | ||
| id 'org.graalvm.buildtools.native' version '0.10.6' apply false | ||
| id 'com.google.protobuf' version '0.9.2' | ||
| } | ||
|
|
||
|
|
@@ -99,28 +92,43 @@ idea { | |
| } | ||
|
|
||
|
|
||
| graal { | ||
| outputName "temporal-test-server" | ||
| mainClass application.getMainClass().get() | ||
| javaVersion '17' | ||
| graalVersion '22.3.1' | ||
|
|
||
| // Don't fallback to running a JVM | ||
| option "--no-fallback" | ||
|
|
||
| // Signal handling so that ^C actually stops the process | ||
| option "--install-exit-handlers" | ||
|
|
||
| // If we're on linux, static link everything but libc. Otherwise link | ||
| // everything dynamically (note the '-' rather than '+' in fromt of | ||
| // StaticExecutable) | ||
| option isLinux() | ||
| ? "-H:+StaticExecutableWithDynamicLibC" | ||
| : "-H:-StaticExecutable" | ||
| } | ||
|
|
||
| def isLinux() { | ||
| return System.properties['os.name'].toLowerCase().contains('linux') | ||
| return System.properties['os.name'].toLowerCase().contains('linux') | ||
| } | ||
|
|
||
| tasks.build.dependsOn('nativeImage') | ||
| // The graalvm plugin requires we build with Java 11 | ||
| if (project.hasProperty("nativeBuild")) { | ||
| apply plugin: 'org.graalvm.buildtools.native' | ||
|
|
||
| graalvmNative { | ||
| toolchainDetection = true | ||
| agent { | ||
| enabled = true | ||
| defaultMode = "standard" | ||
| metadataCopy { | ||
| outputDirectories.add("src/main/resources/META-INF/native-image/io.temporal/temporal-test-server") | ||
| mergeWithExisting = false | ||
| } | ||
|
|
||
| } | ||
| binaries { | ||
| main { | ||
| mainClass = application.getMainClass().get() | ||
| sharedLibrary = false | ||
| // Signal handling so that ^C actually stops the process | ||
| buildArgs.add("--install-exit-handlers") | ||
| // If we're on linux, static link everything but libc. Otherwise link | ||
| // everything dynamically (note the '-' rather than '+' in front of | ||
| // StaticExecutable) | ||
| buildArgs.add(isLinux() ? "-H:+StaticExecutableWithDynamicLibC": "-H:-StaticExecutable") | ||
|
Comment on lines
+120
to
+123
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suspect this may change a tad when we do #2402, specifically that I guess we'll add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| buildArgs.add("-H:+UnlockExperimentalVMOptions") | ||
| buildArgs.add("-O4") | ||
|
|
||
| runtimeArgs.add("7233") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you help me understand this a bit? Does it mean that this is the default arg if not provided? https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html is not very clear to me. (this is my only blocking concern/comment)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It sets the arg for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So can you confirm this has no affect on the final binary and that the final binary still requires a port and uses that port?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct |
||
| } | ||
| } | ||
| binaries.all { | ||
| verbose = true | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,3 @@ | |
| ] | ||
| } | ||
| ] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,113 @@ | ||
| [ | ||
| ] | ||
| { | ||
| "interfaces":["io.temporal.client.WorkflowClient"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.serviceclient.OperatorServiceStubs"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.serviceclient.TestServiceStubs"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.serviceclient.WorkflowServiceStubs"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.DescribeWorkflowExecutionTest$TestDescribeActivity","io.temporal.internal.sync.AsyncInternal$AsyncMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.DescribeWorkflowExecutionTest$TestDescribeWorkflow","io.temporal.internal.sync.StubMarker","io.temporal.internal.sync.AsyncInternal$AsyncMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestActivities$ActivityReturnsString","io.temporal.internal.sync.AsyncInternal$AsyncMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestWorkflows$PrimitiveChildWorkflow","io.temporal.internal.sync.StubMarker","io.temporal.internal.sync.AsyncInternal$AsyncMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestWorkflows$PrimitiveWorkflow","io.temporal.internal.sync.StubMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestWorkflows$WorkflowReturnsString","io.temporal.internal.sync.StubMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestWorkflows$WorkflowTakesBool","io.temporal.internal.sync.StubMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestWorkflows$WorkflowWithSignal","io.temporal.internal.sync.StubMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.common.TestWorkflows$WorkflowWithUpdate","io.temporal.internal.sync.StubMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["io.temporal.testserver.functional.timeskipping.SleepingActivity","io.temporal.internal.sync.AsyncInternal$AsyncMarker"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.method.MethodDescription$InDefinedShape$AbstractBase$Executable"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.method.ParameterDescription$ForLoadedParameter$Parameter"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.method.ParameterList$ForLoadedExecutable$Executable"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDefinition$Sort$AnnotatedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$ForLoadedType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedExecutableExceptionType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedExecutableParameterType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedField$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedMethodReturnType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForComponentType$AnnotatedParameterizedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForTypeArgument$AnnotatedParameterizedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForWildcardUpperBoundType$AnnotatedWildcardType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfClassDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfDirectMethodHandleDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfDirectMethodHandleDesc$ForKind"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfDynamicConstantDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfMethodHandleDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfMethodTypeDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaModule$Module"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaModule$Resolver"] | ||
| } | ||
| ] |
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.
Can I get confirmation that we believe the release artifact files will have the same name, just with arm ones now? So
temporal-test-server_<version>_linux_arm64.tar.gzandtemporal-test-server_<version>_maxOS_arm64.tar.gzwill now be present?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.
Yep