-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
perl-convert-binary-c: add aarch64/arm64 build #51107
perl-convert-binary-c: add aarch64/arm64 build #51107
Conversation
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
📝 WalkthroughWalkthroughThe pull request introduces modifications to two files: Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@BiocondaBot please fetch artifacts |
Package(s) built are ready for inspection:
Docker image(s) built:
|
LGTM! |
@BiocondaBot please add label |
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
recipes/perl-convert-binary-c/build.sh (1)
15-15
: Great optimization with parallel make!The addition of
-j ${CPU_COUNT}
to themake
command enables parallel execution, which can significantly speed up the build process, especially on multi-core systems. This is an excellent optimization.For added robustness, consider adding a fallback in case
${CPU_COUNT}
is not set:- make -j ${CPU_COUNT} + make -j ${CPU_COUNT:-1}This ensures the build will proceed even if
${CPU_COUNT}
is not defined, defaulting to single-threaded execution in such cases.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/perl-convert-binary-c/build.sh (2 hunks)
- recipes/perl-convert-binary-c/meta.yaml (2 hunks)
🔇 Additional comments (6)
recipes/perl-convert-binary-c/build.sh (2)
3-3
: Excellent addition ofset -xe
!This change enhances the script's robustness and debuggability:
-x
enables debugging by printing each command before execution.-e
ensures the script exits immediately if any command fails, preventing cascading errors.These options are particularly beneficial in a build context, making it easier to identify and diagnose issues.
Line range hint
1-22
: Overall, the build script is well-structured and follows best practices.The script appropriately handles both Build.PL and Makefile.PL scenarios, which is common for Perl module builds. The unchanged parts of the script, including the conditional logic and the final chmod command, are correct and necessary.
The chmod command at the end is particularly important as it ensures the
ccconfig
binary is executable after installation.To ensure the build script is compatible with the package structure, let's verify the presence of either
Build.PL
orMakefile.PL
:✅ Verification successful
Build Script Verification Successful
The presence of
Build.PL
orMakefile.PL
was confirmed as expected, ensuring that the build script can function correctly in either scenario.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the presence of Build.PL or Makefile.PL if fd -t f -e PL '^(Build|Makefile)\.PL$' recipes/perl-convert-binary-c; then echo "Build.PL or Makefile.PL found as expected." else echo "Warning: Neither Build.PL nor Makefile.PL found in the package directory." fiLength of output: 165
recipes/perl-convert-binary-c/meta.yaml (4)
14-14
: LGTM: Build number increment is appropriate.The build number has been correctly incremented from 0 to 1. This is the expected practice when modifying a package without changing its version, especially when adding support for new platforms.
Line range hint
1-40
: Summary: Changes look good, verification recommended.The modifications to add aarch64/arm64 build support are appropriate and well-implemented. The build number has been correctly incremented, and the additional platforms have been specified in the 'extra' section. The existing configuration, including the 'run_exports' section, aligns well with the PR objectives and Bioconda guidelines.
To ensure a smooth integration of these changes, please:
- Verify that the build system recognizes the new platforms as suggested.
- Confirm the availability of all dependencies for the ARM64 architectures.
- If possible, perform test builds on the new architectures to catch any unforeseen issues.
Once these verifications are complete, this PR should be ready for merging.
Line range hint
1-35
: Verify dependencies for new architectures.The existing configuration looks good, particularly:
- The 'run_exports' section is correctly implemented, which helps maintain ABI compatibility as mentioned in the PR description.
- The package version remains at 0.85, which is appropriate when adding new platform support without changing the underlying code.
However, it's important to ensure that all dependencies, especially those in the 'build' and 'host' sections, are available and function correctly on the new ARM64 architectures (linux-aarch64 and osx-arm64).
To verify the availability of dependencies, you can run:
#!/bin/bash # Description: Check availability of dependencies for new architectures # Test: Verify availability of build and host dependencies for ARM64 platforms for dep in make perl; do echo "Checking $dep for linux-aarch64:" conda search --platform linux-aarch64 $dep echo "Checking $dep for osx-arm64:" conda search --platform osx-arm64 $dep done # Note: Replace 'gcc' with the appropriate compiler package for ARM64 if different echo "Checking C++ compiler for linux-aarch64:" conda search --platform linux-aarch64 gcc echo "Checking C++ compiler for osx-arm64:" conda search --platform osx-arm64 clangxxThis script will help ensure that all necessary dependencies are available for the new architectures. If any dependencies are missing, they may need to be built or sourced for these platforms before this package can be successfully built.
37-40
: LGTM: Additional platforms correctly specified.The addition of 'linux-aarch64' and 'osx-arm64' to the 'additional-platforms' list is correct and aligns with the PR objective of adding aarch64/arm64 build support. This change will enable the package to be built for these ARM64 architectures on both Linux and macOS.
To ensure the build process recognizes these new platforms, you can run the following command:
This command should output build paths for all supported platforms, including the newly added ARM64 architectures.
✅ Verification successful
LGTM: Additional platforms correctly specified.
The addition of 'linux-aarch64' and 'osx-arm64' to the 'additional-platforms' list is correct and aligns with the PR objective of adding aarch64/arm64 build support. This change will enable the package to be built for these ARM64 architectures on both Linux and macOS.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the additional platforms are recognized in the build process # Test: Check if the additional platforms are listed in the build matrix conda build --variant-config-files .ci_support/linux_64_.yaml .ci_support/osx_64_.yaml .ci_support/osx_arm64_.yaml .ci_support/linux_aarch64_.yaml recipes/perl-convert-binary-c --outputLength of output: 1203
Script:
#!/bin/bash # Description: Check if conda is installed and available in the PATH which conda # If conda is available, attempt to verify the build matrix again if [ $? -eq 0 ]; then echo "Conda is installed. Retrying build verification..." conda build --variant-config-files .ci_support/linux_64_.yaml .ci_support/osx_64_.yaml .ci_support/osx_arm64_.yaml .ci_support/linux_aarch64_.yaml recipes/perl-convert-binary-c --output else echo "Conda is not installed. Skipping build verification." fiLength of output: 221
Script:
#!/bin/bash # Description: Verify that 'linux-aarch64' and 'osx-arm64' are listed under 'additional-platforms' in meta.yaml # Define the file to check FILE="recipes/perl-convert-binary-c/meta.yaml" # Check if the file exists if [ ! -f "$FILE" ]; then echo "File $FILE does not exist." exit 1 fi # Check for 'additional-platforms' section grep -A 2 "additional-platforms:" "$FILE" | grep -q "linux-aarch64" && grep -A 2 "additional-platforms:" "$FILE" | grep -q "osx-arm64" if [ $? -eq 0 ]; then echo "Both 'linux-aarch64' and 'osx-arm64' are correctly listed under 'additional-platforms'." exit 0 else echo "One or both of the platforms ('linux-aarch64', 'osx-arm64') are missing from 'additional-platforms'." exit 1 fiLength of output: 525
Describe your pull request here
Please read the guidelines for Bioconda recipes before opening a pull request (PR).
General instructions
@BiocondaBot please add label
command.@bioconda/core
in a comment.Instructions for avoiding API, ABI, and CLI breakage issues
Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify
run_exports
(see here for the rationale and comprehensive explanation).Add a
run_exports
section like this:with
...
being one of:{{ pin_subpackage("myrecipe", max_pin="x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin="x.x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin=None) }}
while replacing
"myrecipe"
with eithername
if aname|lower
variable is defined in your recipe or with the lowercase name of the package in quotes.Bot commands for PR management
Please use the following BiocondaBot commands:
Everyone has access to the following BiocondaBot commands, which can be given in a comment:
@BiocondaBot please update
@BiocondaBot please add label
please review & merge
label.@BiocondaBot please fetch artifacts
You can use this to test packages locally.
Note that the
@BiocondaBot please merge
command is now depreciated. Please just squash and merge instead.Also, the bot watches for comments from non-members that include
@bioconda/<team>
and will automatically re-post them to notify the addressed<team>
.Summary by CodeRabbit
perl-convert-binary-c
package, allowing for parallel execution.linux-aarch64
andosx-arm64
.meta.yaml
file for better readability.0
to1
.