-
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
bambamc: add aarch64/arm64 builds #51067
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces modifications to the 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 (
|
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 (2)
recipes/bambamc/build.sh (1)
7-7
: Great optimization for parallel compilation!The addition of
-j ${CPU_COUNT}
to themake
command enables parallel compilation, which can significantly speed up the build process, especially on multi-core systems.Consider adding a fallback for
CPU_COUNT
to ensure the script works even if the variable is not set:-make -j ${CPU_COUNT} +make -j ${CPU_COUNT:-1}This change ensures that if
CPU_COUNT
is not set, the build will default to using a single core, maintaining compatibility with all environments.recipes/bambamc/meta.yaml (1)
35-38
: LGTM: Additional platform support added correctly.The 'extra' section has been added to specify support for 'linux-aarch64' and 'osx-arm64' platforms, which aligns with the PR objective. This is the correct approach to extend platform support in Conda recipes.
Consider adding a comment explaining the purpose of these additional platforms for better maintainability. For example:
extra: additional-platforms: # Support for ARM64 architecture on Linux and macOS - linux-aarch64 - osx-arm64
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/bambamc/build.sh (1 hunks)
- recipes/bambamc/meta.yaml (2 hunks)
🔇 Additional comments (4)
recipes/bambamc/build.sh (2)
3-3
: Excellent addition for improved error handling and debugging!The
set -xe
command enhances the script's robustness:
-e
ensures the script exits immediately if any command fails, preventing cascading errors.-x
enables debug mode, which prints each command before execution, aiding in troubleshooting.This change aligns with best practices for shell scripting in build environments.
Line range hint
1-9
: Clarification needed on aarch64/arm64 supportThe PR objectives mention adding aarch64/arm64 builds, but there are no explicit changes in this script related to these architectures. While the current changes improve the build process, they don't directly address the stated objective.
Could you please clarify how the aarch64/arm64 support is being implemented? Is it handled in the recipe's meta.yaml file or through Conda's build matrix?
To verify the aarch64/arm64 support, we can check the meta.yaml file:
This will help us understand how the aarch64/arm64 support is configured in the recipe.
✅ Verification successful
aarch64/arm64 support confirmed in
meta.yaml
The
meta.yaml
includes additional platforms forlinux-aarch64
andosx-arm64
, ensuring aarch64/arm64 builds are supported as per the PR objectives.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if meta.yaml exists and search for aarch64/arm64 related entries if [ -f recipes/bambamc/meta.yaml ]; then echo "Contents of meta.yaml:" cat recipes/bambamc/meta.yaml echo "Searching for aarch64/arm64 related entries:" grep -i 'aarch64\|arm64' recipes/bambamc/meta.yaml else echo "meta.yaml file not found in the expected location." fiLength of output: 1090
recipes/bambamc/meta.yaml (2)
10-10
: LGTM: Build number increment is correct.The build number has been properly incremented from 7 to 8. This is the correct approach when updating a package without changing its version number.
Line range hint
1-38
: Verify build and functionality on new platforms.The package has been updated to version '0.0.50' with corresponding changes to the source URL and MD5 checksum. While the build and runtime dependencies remain unchanged, it's crucial to ensure that the package builds and functions correctly on the newly added platforms (linux-aarch64 and osx-arm64).
Please run the following script to check if there are any platform-specific build instructions or tests that need to be added:
If the script doesn't find any platform-specific instructions or tests, consider adding them to ensure the package works correctly on the new platforms.
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
f07ac9b
to
373c0c1
Compare
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
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: 3
🧹 Outside diff range and nitpick comments (4)
recipes/bambamc/build.sh (2)
5-6
: Great addition for cross-platform compatibility!Copying newer versions of
config.guess
andconfig.sub
is crucial for supporting builds on newer architectures, particularly macOS ARM64. This change enhances the package's compatibility across different platforms.Consider adding a check to ensure the files exist before copying:
if [ -f "${RECIPE_DIR}/config.guess" ] && [ -f "${RECIPE_DIR}/config.sub" ]; then cp ${RECIPE_DIR}/config.* . else echo "Warning: config.guess or config.sub not found in RECIPE_DIR" fiThis will prevent potential errors if the files are missing and provide a helpful warning.
11-11
: Excellent optimization for build performance!The modification to use
make -j ${CPU_COUNT}
allows the build process to utilize multiple CPU cores, which can significantly reduce compilation time, especially on multi-core systems.Consider adding an upper limit to the number of jobs to prevent potential resource exhaustion on machines with many cores:
make -j $(( ${CPU_COUNT} < 4 ? ${CPU_COUNT} : 4 ))
This will use up to 4 cores or the number of available cores, whichever is less. Adjust the number 4 as appropriate for your build requirements.
recipes/smalt/build.sh (1)
3-3
: Consider the implications of enabling debug modeThe change from
set -ef -o pipefail
toset -xef -o pipefail
enables debug mode (-x
), which prints each command and its arguments as they are executed. While this can be helpful for troubleshooting, it may also expose sensitive information in build logs.Consider whether this level of verbosity is necessary for production builds. If it's intended for debugging purposes only, you might want to make it conditional or remove it before merging.
recipes/bambamc/config.sub (1)
1880-1885
: Review the placement of editor configuration directives.The script includes editor-specific configuration directives at the end:
# Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End:While these lines are helpful for maintaining the
timestamp
, they might not be necessary in the committed script or could interfere with other developers' editor settings. Consider removing them or relocating them to a separate file or comment block to avoid potential confusion.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (5)
- recipes/bambamc/build.sh (1 hunks)
- recipes/bambamc/config.guess (1 hunks)
- recipes/bambamc/config.sub (1 hunks)
- recipes/bambamc/meta.yaml (2 hunks)
- recipes/smalt/build.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- recipes/bambamc/meta.yaml
🔇 Additional comments (7)
recipes/bambamc/build.sh (2)
3-3
: Excellent addition for improved error handling and debugging!The
set -xe
command enhances the script's behavior:
-e
ensures the script exits immediately if any command fails, preventing cascading errors.-x
prints each command before execution, facilitating easier debugging.These improvements will make the build process more robust and easier to troubleshoot if issues arise.
1-12
: Overall script structure looks good!The script maintains a clear and logical flow:
- Setting up the environment
- Preparing configuration files
- Setting environment variables
- Configuring the build
- Compiling the code
- Installing the package
The new changes integrate seamlessly with this structure, enhancing the script's functionality without disrupting its overall flow.
recipes/smalt/build.sh (3)
9-9
: Excellent optimization for build speedThe addition of
-j ${CPU_COUNT}
to themake
command enables parallel compilation, which can significantly speed up the build process on multi-core systems.This is a great optimization, especially for larger projects. Good job!
Line range hint
1-20
: Overall, these changes improve build efficiency and cross-platform compatibilityThe modifications to this build script enhance its functionality in several ways:
- It potentially improves debugging capabilities (though this might need reconsideration for production use).
- It optimizes build speed through parallel compilation.
- It addresses a MacOS-specific issue, improving cross-platform compatibility.
These changes demonstrate attention to both performance and platform-specific considerations, which is commendable. The script now should work more efficiently across different environments.
Line range hint
13-17
: Good fix for MacOS dynamic library loading issueThe modification to set
DYLD_LIBRARY_PATH
for MacOS builds addresses a specific issue with finding the bambamc dynamic library during themake check
process.This is a well-thought-out solution to a platform-specific problem. It ensures that the tests can run successfully on MacOS without affecting other platforms.
Let's verify if this change is consistent with other recipes that might have similar MacOS-specific adjustments:
✅ Verification successful
Verification Confirmed: Consistent DYLD_LIBRARY_PATH Adjustments Across Recipes
The modification in
recipes/smalt/build.sh
aligns with similar adjustments in other build scripts, ensuring consistent handling of MacOS dynamic library loading issues.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for similar MacOS-specific DYLD_LIBRARY_PATH adjustments in other recipes # Test: Search for similar patterns in other build.sh files rg --type sh 'DYLD_LIBRARY_PATH=\$\{PREFIX\}/lib' recipesLength of output: 548
recipes/bambamc/config.sub (1)
62-62
: Confirm the use of legacy command substitution for compatibility.The script uses backticks
`...`
for command substitution:me=`echo "$0" | sed -e 's,.*/,,'`
While the modern syntax
$(...)
is generally preferred for readability and nesting, the use of backticks here is intentional to maintain compatibility with older, pre-POSIX shells, as noted in the comments on lines 55-61. No changes are necessary unless there's a specific requirement to support only POSIX-compliant shells.recipes/bambamc/config.guess (1)
1-1700
: LGTM:config.guess
Script AdditionThe
config.guess
script has been correctly added and is up-to-date. It includes comprehensive system detection, covering a wide range of architectures, includingaarch64/arm64
, which aligns with the PR objectives to add builds for these architectures. The script follows best practices for shell scripting and includes proper licensing information.
The CircleCI check is not listed for some reason but it passed for both Linux and OSX - https://app.circleci.com/pipelines/github/bioconda/bioconda-recipes?branch=pull%2F51067 |
@BiocondaBot please fetch artifacts |
Package(s) built are ready for inspection:
Docker image(s) built:
|
LGTM! |
@BiocondaBot please add label |
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
New Features
linux-aarch64
andosx-arm64
.config.guess
andconfig.sub
scripts for better system detection and configuration validation.Bug Fixes
Documentation
meta.yaml
to reflect new versioning and platform support.