-
Notifications
You must be signed in to change notification settings - Fork 284
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
[Build] support building targets for platform and arch inputs #776
Conversation
Codecov Report
@@ Coverage Diff @@
## main #776 +/- ##
==========================================
+ Coverage 91.29% 91.33% +0.03%
==========================================
Files 75 75
Lines 1999 2019 +20
==========================================
+ Hits 1825 1844 +19
- Misses 174 175 +1
Continue to review full report at Codecov.
|
This comment: #763 (comment)
I actually added defaults to a branch: Please don't review that draft PR fully but just want to say if we absolutely wanted defaults we can go for it. However, it would require to pass the arm64 in the OpenSearch Jenkinsfile, and it actually builds successfully without defaults. I ran through this in a pipeline of my own that doesn't publish and I got It successful because then it defaults to the OS plat and arch: https://github.com/opensearch-project/opensearch-build/blob/main/src/build_workflow/build_target.py#L36. |
script { manifest = readYaml(file: 'artifacts/manifest.yml') } | ||
def artifactPath = "${manifest.build.version}/${BUILD_NUMBER}/${manifest.build.architecture}"; | ||
def artifactPath = "${manifest.build.version}/${BUILD_NUMBER}/${manifest.build.platform}-${manifest.build.architecture}"; |
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.
highlighting updated s3 path.
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.
You've got a race with #765 which cleans this all up
SUPPORTED_PLATFORMS = [ | ||
"linux" | ||
] | ||
SUPPORTED_ARCHITECTURES = [ |
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.
highlighting these proposed arches.
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.
This LGTM! Let's fix the list of architectures.
src/build_workflow/build_args.py
Outdated
] | ||
SUPPORTED_ARCHITECTURES = [ | ||
"x64", | ||
"x86_64", |
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.
Are x64 and x86_64 a dup here? I never know which one we pass from where, I think the two here should be x64
and arm64
, since this is what we return from current_architecture
.
Adding `platform` and `arch` as a build argument to be passed to the build target. This enables cross-platform cross-arch builds, for example, we can build linux x64 on a linux ARM64 machine. We would want to do this because some of the libraries that are required for building (not for runtime) are not available for certain operating systems. Also updated the OpenSearch Dashboards Jenkinsfile to pass the platform and arch. Issue resolved: opensearch-project#739 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
9240eae
to
04533cb
Compare
script { manifest = readYaml(file: 'artifacts/manifest.yml') } | ||
def artifactPath = "${manifest.build.version}/${BUILD_NUMBER}/${manifest.build.architecture}"; | ||
def artifactPath = "${manifest.build.version}/${BUILD_NUMBER}/${manifest.build.platform}-${manifest.build.architecture}"; |
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.
You've got a race with #765 which cleans this all up
Description
Adding
platform
andarch
as a build argument to be passed tothe build target. This enables cross-platform cross-arch builds,
for example, we can build linux x64 on a linux ARM64 machine.
We would want to do this because some of the libraries that are
required for building (not for runtime) are not available for
certain operating systems.
Also updated the OpenSearch Dashboards Jenkinsfile to pass the
platform and arch.
Signed-off-by: Kawika Avilla kavilla414@gmail.com
Issues Resolved
#739
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.