Skip to content

Commit

Permalink
Change circleci script
Browse files Browse the repository at this point in the history
  • Loading branch information
jguhlin committed Jan 20, 2023
1 parent e823b35 commit 9c88a1a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
18 changes: 12 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,23 @@ jobs:
- checkout
- restore_cache:
key: project-cache
- run: cargo install grcov
- run: cargo --version
- run: bash .scripts/grcov.bash
- run: curl -Os https://uploader.codecov.io/latest/linux/codecov
- run: chmod +x codecov
- run: ./codecov
#- run: cargo install grcov
#- run: cargo --version
#- run: bash .scripts/grcov.bash
- run: cargo install cargo-tarpaulin
- run: cargo build
- run: cargo build --features htslib
- run: cargo build --features mm2-fast
- run: cargo build --features simde
- run: cargo build --features htslib,mm2-fast,simde
- save_cache:
key: project-cache
paths:
- "~/.cargo"
- "./target"
- run: cargo tarpaulin --out Xml
- run: cargo tarpaulin --out Xml -r minimap2-sys
- run: bash <(curl -s https://codecov.io/bash)
- run: cargo test
- run: cargo test --features htslib
- run: cargo test --features mm2-fast
Expand Down
6 changes: 5 additions & 1 deletion .scripts/grcov.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ export RUSTDOCFLAGS="-Cpanic=abort"
export LLVM_PROFILE_FILE="sfasta-%p-%m.profraw"

mkdir -p target/coverage
mkdir -p minimap2-sys/target/coverage

cargo test --features htslib,mm2-fast,simde,map-file
cd minimap2-sys
cargo test --features mm2-fast,simde
cd ..

#grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o ./target/debug/coverage/
grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
# grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
#genhtml -o ./target/debug/coverage/ --show-details --highlight --ignore-errors source --legend ./target/debug/lcov.info
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ let mut aligner = Aligner::builder()
The following crate features are available:
* `mm2-fast` - Replace minimap2 with [mm2-fast](https://github.com/bwa-mem2/mm2-fast). This is likely not portable.
* `htslib` - Support output of bam/sam files using htslib.
* `map-file` - Convenience function for mapping an entire file. Caution, this is single-threaded.
* `simde` - Compile minimap2 / mm2-fast with [simd-everywhere](https://github.com/simd-everywhere/simde) support.
* `map-file` - *Default* - Convenience function for mapping an entire file. Caution, this is single-threaded.

Map-file is a *default* feature and enabled unless otherwise specified.

## Building for MUSL
Follow these [instructions](https://github.com/rust-cross/rust-musl-cross#prebuilt-images).
Expand All @@ -118,6 +120,12 @@ rust-musl-builder cargo build --release

Please note minimap2 is only tested for x86_64. Other platforms may work, please open an issue if minimap2 compiles but minimap2-rs does not.

### Features tested with MUSL
* `mm2-fast` - **Fail**
* `htslib` - **Success**
* `simde` - **Success**


# Want feedback
* Many fields are i32 / i8 to mimic the C environment, but would it make more sense to convert to u32 / u8 / usize?
* Let me know pain points
Expand Down

0 comments on commit 9c88a1a

Please sign in to comment.