Skip to content
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

Update revbayes to v1.2.4 #52069

Merged
merged 9 commits into from
Nov 12, 2024
Merged

Update revbayes to v1.2.4 #52069

merged 9 commits into from
Nov 12, 2024

Conversation

mencian
Copy link
Contributor

@mencian mencian commented Nov 12, 2024

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @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:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|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 Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
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>.

Copy link
Contributor

coderabbitai bot commented Nov 12, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request includes significant updates to the build.sh script and the meta.yaml file for the revbayes package. In build.sh, the shebang line has been changed to specify the bash interpreter directly, and new environment variables have been introduced to streamline the build process. The script now directly calls the build command with enhanced arguments, and it modifies the handling of binary files, ensuring proper permissions are set before placement in the designated directory. The cleanup process has also been updated to reflect these changes.

In the meta.yaml file, the version number has been updated from "1.0.13" to "1.2.4", and the build number reset to 0. The source URL format has been altered, and the SHA256 checksum has been updated. Dependency requirements have been modified, including an increase in the minimum version of boost-cpp and the addition of OS-specific dependencies. The documentation has been improved with new fields for development and documentation URLs, and the license information has been reformatted and clarified.

Possibly related PRs

  • Rebuild breseq #51221: The changes in the build.sh script for the breseq package involve the addition of environment variable exports similar to the updates made in the build.sh of the main PR, which also introduced new environment variables for the build process.
  • Update diamond recipe #51515: The modifications in the diamond package's build.sh script include updates to the CMake command and environment variables, which align with the changes made in the main PR's build.sh regarding the handling of environment variables and build configurations.
  • Add hmftools-redux 1.0_beta #51151: The build.sh script for the hmftools-redux package introduces a structured installation process, which is conceptually similar to the updates made in the build.sh of the main PR that aims to improve the build process.
  • Update kmer-db #49740: The meta.yaml changes in the kmer-db package include updates to the build script and dependencies, which reflect a similar focus on improving build configurations as seen in the main PR's updates to build.sh.
  • Update meta.yaml for spec2vec #49857: The meta.yaml updates for the spec2vec package include modifications to the build process, which resonate with the enhancements made in the main PR's build.sh script aimed at streamlining the build process.

Suggested labels

please review & merge

Suggested reviewers

  • bgruening
  • adamhospital

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6203c9b and 6734f1a.

📒 Files selected for processing (1)
  • recipes/revbayes/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/revbayes/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (6)
recipes/revbayes/meta.yaml (6)

12-15: LGTM! Good use of run_exports

The build number reset is appropriate for a version bump, and the addition of run_exports with proper pinning will help maintain ABI compatibility.


40-46: LGTM! Improved metadata quality

Good improvements to the metadata section:

  • Updated to SPDX license identifier
  • Added development and documentation URLs
  • Enhanced summary description

9-10: Verify source URL accessibility and checksum

The source URL format has been updated to use the more explicit refs/tags path. Let's verify the URL accessibility and checksum.

#!/bin/bash
# Verify source URL and checksum
URL="https://github.com/revbayes/revbayes/archive/refs/tags/v1.2.4.tar.gz"
echo "Checking URL accessibility..."
curl -sI "$URL" | head -n 1
echo "Verifying checksum..."
curl -sL "$URL" | sha256sum

51-57: Verify osx-arm64 platform compatibility

The recipe now includes osx-arm64 platform support. Please ensure that RevBayes 1.2.4 has been tested on Apple Silicon hardware.

#!/bin/bash
# Search for arm64 related discussions or issues
gh api graphql -f query='
{
  search(query: "repo:revbayes/revbayes arm64 apple silicon m1", type: ISSUE, first: 10) {
    nodes {
      ... on Issue {
        title
        url
        state
      }
    }
  }
}'

24-32: Verify boost-cpp version requirement

The minimum boost-cpp version has been increased from 1.60 to 1.71. Please ensure this is the minimum required version for RevBayes 1.2.4.


1-2: Verify compatibility with major version bump

The version update from 1.0.13 to 1.2.4 represents a significant change. Please ensure there are no breaking changes that could affect downstream dependencies.

✅ Verification successful

Version bump is safe from dependency perspective

No downstream packages depend on revbayes in the bioconda repository, so the version update from 1.0.13 to 1.2.4 poses no risk of breaking other packages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for downstream dependencies that might be affected
gh api graphql -f query='
{
  search(query: "repo:bioconda/bioconda-recipes path:recipes depends revbayes", type: CODE, first: 100) {
    nodes {
      ... on TextMatch {
        fragment
        file {
          path
        }
      }
    }
  }
}'

Length of output: 1264


Script:

#!/bin/bash
# Search for recipes that depend on revbayes
rg --files-with-matches 'depends:\s*revbayes' recipes/

Length of output: 56


Script:

#!/bin/bash
# Search for recipes that have revbayes as a dependency in build or run requirements
rg -l -e '^- revbayes' recipes/requirements/*

Length of output: 112


Script:

#!/bin/bash
# Search for any occurrence of revbayes in all meta.yaml files within recipes/
rg 'revbayes' recipes/**/*.yaml

Length of output: 342942

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (2)
recipes/revbayes/build.sh (1)

20-45: Consider refactoring build configurations to reduce duplication

The MPI and non-MPI build configurations share most of their cmake arguments. Consider extracting common build configuration into a function to improve maintainability.

Example refactor:

build_revbayes() {
    local mpi_enabled=$1
    ./build.sh -mpi ${mpi_enabled} -help2yml true \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_PREFIX_PATH="${PREFIX}" \
        -DCMAKE_CXX_COMPILER="${CXX}" \
        -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
        -boost_root "${PREFIX}" \
        -j "${CPU_COUNT}" \
        "${CONFIG_ARGS}"
}

# Usage:
build_revbayes true   # For MPI
build_revbayes false  # For non-MPI
recipes/revbayes/meta.yaml (1)

35-37: Consider enhancing test coverage

While the basic help command tests are good, consider adding more comprehensive tests to verify functionality.

Consider adding:

  • Version check tests
  • Basic analysis tests with sample data
  • MPI functionality tests
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 98117ae and 2befab9.

📒 Files selected for processing (2)
  • recipes/revbayes/build.sh (1 hunks)
  • recipes/revbayes/meta.yaml (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/revbayes/build.sh

[warning] 9-9: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

🪛 yamllint
recipes/revbayes/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (8)
recipes/revbayes/build.sh (3)

20-30: MPI build configuration is well structured

The build configuration is comprehensive with proper:

  • CMAKE flags for release build
  • Compiler and dependency paths
  • Parallel build support
  • Binary permissions

34-50: Non-MPI build configuration mirrors MPI version appropriately

The build process maintains consistency with the MPI version while properly managing build directories and artifacts. Good practice to clean up build directories between and after builds.


3-6: Environment setup looks good with a note on optimization level

The environment variables are properly configured using conda's PREFIX variable. The -O3 optimization level is appropriate for scientific computing software like RevBayes, but ensure it has been tested thoroughly as it can sometimes lead to numerical precision differences.

✅ Verification successful

No known numerical precision issues found with -O3 optimization

The use of the -O3 optimization level in CXXFLAGS does not conflict with any documented precision requirements in the README.md.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any known numerical precision issues with -O3 for RevBayes
rg -i "precision|accuracy" README.md || echo "No explicit mentions of precision requirements found"

Length of output: 153

recipes/revbayes/meta.yaml (5)

1-2: LGTM! Good use of Jinja2 variables

The version update to 1.2.4 matches the PR objectives, and using variables for name and version follows best practices.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


13-15: LGTM! Good use of run_exports

The build number reset and run_exports configuration are appropriate for version management and ABI compatibility.


24-32: Verify boost-cpp version compatibility

The boost-cpp version requirement has been increased significantly (from 1.60 to 1.71). Let's verify this requirement.

#!/bin/bash
# Search for boost version requirements in the source
rg -i "boost.*1\.71" 
# Check CMake files for boost requirements
fd -e cmake -x cat {} \; | rg -i "boost.*version"

The OS-specific OpenMP dependencies look correct:

  • llvm-openmp for macOS
  • libgomp for Linux

40-58: LGTM! Comprehensive metadata updates

Excellent additions:

  • Clear license specification
  • Development and documentation URLs
  • Biotools and DOI identifiers
  • ARM architecture support
#!/bin/bash
# Check if ARM support is configured in build system
fd -e cmake -x cat {} \; | rg -i "aarch64|arm64"

9-10: Verify SHA256 checksum for the source tarball

The URL format update to use refs/tags is good. Let's verify the SHA256 checksum.

Comment on lines +8 to +14
mkdir -p $PREFIX/bin
cd projects/cmake

if [ ! -d build ]; then
mkdir build
if [[ `uname` == "Darwin" ]]; then
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add error handling for directory navigation

While the platform-specific configuration is well-implemented, the cd command should include error handling to prevent silent failures.

Apply this diff to add error handling:

 mkdir -p $PREFIX/bin
-cd projects/cmake
+cd projects/cmake || exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mkdir -p $PREFIX/bin
cd projects/cmake
if [ ! -d build ]; then
mkdir build
if [[ `uname` == "Darwin" ]]; then
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
mkdir -p $PREFIX/bin
cd projects/cmake || exit 1
if [[ `uname` == "Darwin" ]]; then
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
🧰 Tools
🪛 Shellcheck

[warning] 9-9: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (2)
recipes/revbayes/build.sh (2)

3-5: Consider consolidating compiler flags and adding CXXFLAGS

While the current environment setup is functional, consider consolidating related flags and adding CXXFLAGS for completeness:

 export INCLUDES="-I${PREFIX}/include"
 export LIBPATH="-L${PREFIX}/lib"
-export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
+export LDFLAGS="${LDFLAGS} ${LIBPATH}"
+export CXXFLAGS="${CXXFLAGS} ${INCLUDES}"

47-47: Consider more comprehensive cleanup

The final cleanup could be more thorough to ensure a clean build environment:

-rm -rf build
+# Cleanup all build artifacts
+rm -rf build build-mpi CMakeCache.txt CMakeFiles/
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2befab9 and 6203c9b.

📒 Files selected for processing (1)
  • recipes/revbayes/build.sh (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/revbayes/build.sh

[warning] 8-8: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

🔇 Additional comments (2)
recipes/revbayes/build.sh (2)

7-9: Previous review comment about directory navigation is still applicable

🧰 Tools
🪛 Shellcheck

[warning] 8-8: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


10-14: LGTM! Platform-specific configuration is well implemented

The conditional check uses proper bash syntax and the Darwin-specific configuration correctly handles framework/bundle issues.

Comment on lines +36 to +45
./build.sh -mpi false -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}"

make

cd ..
mkdir -p $PREFIX/bin
mv rb $PREFIX/bin
chmod 0755 rb rb-help2yml
mv rb rb-help2yml $PREFIX/bin/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling for non-MPI build commands

Similar to the MPI build section, add error handling:

-./build.sh -mpi false -help2yml true \
+./build.sh -mpi false -help2yml true \
         -DCMAKE_BUILD_TYPE=Release \
         -DCMAKE_PREFIX_PATH="${PREFIX}" \
         -DCMAKE_CXX_COMPILER="${CXX}" \
         -boost_root "${PREFIX}" \
         -j "${CPU_COUNT}" \
-        "${CONFIG_ARGS}"
+        "${CONFIG_ARGS}" || exit 1

-chmod 0755 rb rb-help2yml
-mv rb rb-help2yml $PREFIX/bin/
+chmod 0755 rb rb-help2yml || exit 1
+mv rb rb-help2yml $PREFIX/bin/ || exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
./build.sh -mpi false -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}"
make
cd ..
mkdir -p $PREFIX/bin
mv rb $PREFIX/bin
chmod 0755 rb rb-help2yml
mv rb rb-help2yml $PREFIX/bin/
./build.sh -mpi false -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}" || exit 1
chmod 0755 rb rb-help2yml || exit 1
mv rb rb-help2yml $PREFIX/bin/ || exit 1

Comment on lines +19 to +28
./build.sh -mpi true -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}"

# If cmake finds a boost version compiled with cmake, it always links to it unless both
# Boost_NO_SYSTEM_PATHS=ON and Boost_NO_BOOST_CMAKE=ON (probably a bug in cmake)
cmake -DCMAKE_PREFIX_PATH=$PREFIX \
-DBOOST_ROOT=$PREFIX \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_NO_BOOST_CMAKE=ON \
.

make

cd ..
mkdir -p $PREFIX/bin
mv rb $PREFIX/bin/rb-mpi
chmod 0755 rb-mpi rb-mpi-help2yml
mv rb-mpi rb-mpi-help2yml $PREFIX/bin/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling for build commands

While the build configuration is comprehensive, consider adding error handling to catch build failures:

-./build.sh -mpi true -help2yml true \
+./build.sh -mpi true -help2yml true \
 	-DCMAKE_BUILD_TYPE=Release \
 	-DCMAKE_PREFIX_PATH="${PREFIX}" \
 	-DCMAKE_CXX_COMPILER="${CXX}" \
 	-boost_root "${PREFIX}" \
 	-j "${CPU_COUNT}" \
-	"${CONFIG_ARGS}"
+	"${CONFIG_ARGS}" || exit 1

-chmod 0755 rb-mpi rb-mpi-help2yml
-mv rb-mpi rb-mpi-help2yml $PREFIX/bin/
+chmod 0755 rb-mpi rb-mpi-help2yml || exit 1
+mv rb-mpi rb-mpi-help2yml $PREFIX/bin/ || exit 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
./build.sh -mpi true -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}"
# If cmake finds a boost version compiled with cmake, it always links to it unless both
# Boost_NO_SYSTEM_PATHS=ON and Boost_NO_BOOST_CMAKE=ON (probably a bug in cmake)
cmake -DCMAKE_PREFIX_PATH=$PREFIX \
-DBOOST_ROOT=$PREFIX \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_NO_BOOST_CMAKE=ON \
.
make
cd ..
mkdir -p $PREFIX/bin
mv rb $PREFIX/bin/rb-mpi
chmod 0755 rb-mpi rb-mpi-help2yml
mv rb-mpi rb-mpi-help2yml $PREFIX/bin/
./build.sh -mpi true -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}" || exit 1
chmod 0755 rb-mpi rb-mpi-help2yml || exit 1
mv rb-mpi rb-mpi-help2yml $PREFIX/bin/ || exit 1

Comment on lines +1 to +47
#!/bin/bash

export INCLUDES="-I${PREFIX}/include"
export LIBPATH="-L${PREFIX}/lib"
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"

mkdir -p $PREFIX/bin
cd projects/cmake

if [ ! -d build ]; then
mkdir build
if [[ `uname` == "Darwin" ]]; then
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
fi

./generate_version_number.sh
mv GitVersion.cpp ../../src/revlanguage/utils/

# MPI version
./regenerate.sh -mpi true

cd build
./build.sh -mpi true -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}"

# If cmake finds a boost version compiled with cmake, it always links to it unless both
# Boost_NO_SYSTEM_PATHS=ON and Boost_NO_BOOST_CMAKE=ON (probably a bug in cmake)
cmake -DCMAKE_PREFIX_PATH=$PREFIX \
-DBOOST_ROOT=$PREFIX \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_NO_BOOST_CMAKE=ON \
.

make

cd ..
mkdir -p $PREFIX/bin
mv rb $PREFIX/bin/rb-mpi
chmod 0755 rb-mpi rb-mpi-help2yml
mv rb-mpi rb-mpi-help2yml $PREFIX/bin/


# Non-mpi version
rm -rf build
mkdir build
rm -rf build-mpi

./regenerate.sh

cd build

# If cmake finds a boost version compiled with cmake, it always links to it unless both
# Boost_NO_SYSTEM_PATHS=ON and Boost_NO_BOOST_CMAKE=ON (probably a bug in cmake)
cmake -DCMAKE_PREFIX_PATH=$PREFIX \
-DBOOST_ROOT=$PREFIX \
-DBoost_NO_SYSTEM_PATHS=ON \
-DBoost_NO_BOOST_CMAKE=ON \
.
./build.sh -mpi false -help2yml true \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-boost_root "${PREFIX}" \
-j "${CPU_COUNT}" \
"${CONFIG_ARGS}"

make

cd ..
mkdir -p $PREFIX/bin
mv rb $PREFIX/bin
chmod 0755 rb rb-help2yml
mv rb rb-help2yml $PREFIX/bin/

rm -rf build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing Boost Dependency and CMake Version Specification

  • boost-cpp is not listed in meta.yaml dependencies.
  • cmake_minimum_required is not specified in CMakeLists.txt.
🔗 Analysis chain

Verify build dependencies and version compatibility

Since this is an update to RevBayes v1.2.4, let's ensure all required dependencies are available and the build process is compatible.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify build dependencies and version compatibility

# Check if meta.yaml exists and contains correct version
if [ -f "../meta.yaml" ]; then
    echo "Checking meta.yaml for version and dependencies..."
    cat "../meta.yaml"
fi

# Check if boost version meets minimum requirement
echo "Checking boost version requirement..."
if [ -f "../meta.yaml" ]; then
    grep "boost-cpp" "../meta.yaml"
fi

# Check for CMake minimum version requirement
echo "Checking CMake version requirement..."
if [ -f "CMakeLists.txt" ]; then
    grep "cmake_minimum_required" "CMakeLists.txt"
fi

Length of output: 249

🧰 Tools
🪛 Shellcheck

[warning] 8-8: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

@mencian mencian added the osx-arm64 Related to adding osx-arm64 support label Nov 12, 2024
@mencian mencian merged commit bd944aa into master Nov 12, 2024
6 checks passed
@mencian mencian deleted the revbayes branch November 12, 2024 23:39
This was referenced Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osx-arm64 Related to adding osx-arm64 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant