Skip to content

Commit

Permalink
Fix macos-13 ci, add additional android tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jguhlin committed Nov 25, 2024
1 parent 4d3be0b commit 579b322
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-test-rust-minimap2-sys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ jobs:
test-macos-13:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- run: cd minimap2-sys
- name: Run minimap2-sys tests
run: cargo test
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build-test-rust-minimap2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,17 @@ jobs:
run: cargo test --features htslib
- name: Run tests simde
run: cargo test --features simde

test-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Rust Cross
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- run: cargo install cross --git https://github.com/cross-rs/cross
- name: Run minimap2 tests on Android aarch64
run: cross test --target aarch64-linux-android
- name: Run minimap2 tests on Android x86_64
run: cross test --target x86_64-linux-android
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Contributors to this release: @mbhall88 @rob-p @Sam-Sims @charlesgregory @PB-DB
+ FIX: Cigar string missing softclip operation (@Sam-Sims)

### Other Changes
+ Experimental Android support, solves [#66](https://github.com/jguhlin/minimap2-rs/issues/66)
+ Add ergonomic functions n_seq and get_seq.
+ Better docs on applying presets, solves [#84](https://github.com/jguhlin/minimap2-rs/issues/84)
+ Better detection of target arch c_char's and ptr's, solves [#82](https://github.com/jguhlin/minimap2-rs/issues/82)
+ Support for M1 Mac compilation and addition of github workflows to test it, solving [#81](https://github.com/jguhlin/minimap2-rs/issues/81)
Expand All @@ -202,6 +202,7 @@ Contributors to this release: @mbhall88 @rob-p @Sam-Sims @charlesgregory @PB-DB
+ Add Send + Sync to Aligner, along with unit test @PB-DB
+ Only use rust-htslib/curl when curl feature is enabled @PB-DB
+ Mark bam::Record objects as supplementary @PB-DB
+ Experimental Android support, solves [#66](https://github.com/jguhlin/minimap2-rs/issues/66)

### 0.1.20 minimap2 2.28
+ Fix htslib errors. No update to -sys crate needed.
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ impl Aligner {
aligner
}

/// Get the number of sequences in the index
/// Returns the number of sequences in the index
pub fn n_seq(&self) -> u32 {
unsafe {
let idx = Arc::as_ptr(self.idx.as_ref().unwrap());
Expand All @@ -348,6 +348,9 @@ impl Aligner {
}

/// Get sequences direct from the index
///
/// Returns a reference to the sequence at the given index
/// Remainds valid as long as the aligner is valid
pub fn get_seq<'aln>(&'aln self, i: usize) -> Option<&'aln mm_idx_seq_t> {
unsafe {
let idx = Arc::as_ptr(self.idx.as_ref().unwrap());
Expand Down

0 comments on commit 579b322

Please sign in to comment.