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

Build bindash on osx #51661

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion recipes/bindash/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
#!/bin/bash

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

mkdir release && pushd release
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 operations.

The pushd command should handle potential failures to prevent silent build errors.

Apply this diff to add error handling:

-mkdir release && pushd release
+mkdir release || exit 1
+pushd release || 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 release && pushd release
mkdir release || exit 1
pushd release || exit 1
🧰 Tools
🪛 Shellcheck

[warning] 7-7: Use 'pushd ... || exit' or 'pushd ... || return' in case pushd fails.

(SC2164)

cmake -DCMAKE_BUILD_TYPE=Release ..

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

cmake -S .. -B . -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -O3 -std=c++14 -I${PREFIX}/include" \
"${CONFIG_ARGS}"

make VERBOSE=1 -j ${CPU_COUNT}

install -d $PREFIX/bin
install bindash $PREFIX/bin
popd
12 changes: 6 additions & 6 deletions recipes/bindash/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ source:
sha256: 6e4bf36fd04195ed0738ea8bf835eca1e400b5ce6eef3902bdf0673955d15166

build:
skip: True # [osx]
number: 2
number: 3
run_exports:
- {{ pin_subpackage('bindash', max_pin="x") }}

Expand All @@ -25,7 +24,6 @@ requirements:
- libgomp # [linux]
- llvm-openmp # [osx]
run:
- zlib
- libgomp # [linux]
- llvm-openmp # [osx]

Expand All @@ -34,16 +32,18 @@ test:
- bindash --help 2>&1 | grep sketch

about:
home: https://github.com/zhaoxiaofei/bindash
license: Apache-2.0
home: "https://github.com/zhaoxiaofei/bindash"
license: "Apache-2.0"
Comment on lines +35 to +36
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

Update documentation URLs to point to the original repository

The verification shows that jianshu93/bindash is a fork of zhaoxiaofei/bindash (the original repository). For consistency and long-term maintainability, all URLs should point to the original repository since:

  • zhaoxiaofei/bindash is the parent repository
  • jianshu93/bindash is marked as a fork
  • The README exists in both repositories

Please update the doc_url to point to the original repository: "https://github.com/zhaoxiaofei/bindash/blob/v2.3/README.md"

🔗 Analysis chain

Verify repository relationships and documentation links

The URLs point to different repositories:

  • home/dev_url: "zhaoxiaofei/bindash"
  • doc_url: "jianshu93/bindash"

This could lead to documentation inconsistencies or broken links if the repositories get out of sync.

Also applies to: 40-41

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify repository relationships and README existence

# Check if both repositories exist and their relationship
gh repo view zhaoxiaofei/bindash --json parent,isFork,defaultBranchRef
gh repo view jianshu93/bindash --json parent,isFork,defaultBranchRef

# Verify README existence at the specified version
gh api repos/jianshu93/bindash/contents/README.md?ref=v2.3 --jq '.sha'

Length of output: 506

license_family: APACHE
license_file: LICENSE
summary: "Fast and precise comparison of genomes and metagenomes (in the order of terabytes) on a typical personal laptop."
dev_url: https://github.com/zhaoxiaofei/bindash
dev_url: "https://github.com/zhaoxiaofei/bindash"
doc_url: "https://github.com/jianshu93/bindash/blob/v{{ version }}/README.md"

extra:
additional-platforms:
- linux-aarch64
- osx-arm64
identifiers:
- doi:10.1093/bioinformatics/bty651
- doi:10.1101/2024.03.13.584875
Expand Down