From 579b322858f0dbab642d122cf71268db624f6230 Mon Sep 17 00:00:00 2001 From: Joseph Guhlin Date: Mon, 25 Nov 2024 16:53:18 +1300 Subject: [PATCH] Fix macos-13 ci, add additional android tests --- .github/workflows/build-test-rust-minimap2-sys.yml | 4 +++- .github/workflows/build-test-rust-minimap2.yaml | 14 ++++++++++++++ README.md | 3 ++- src/lib.rs | 5 ++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-rust-minimap2-sys.yml b/.github/workflows/build-test-rust-minimap2-sys.yml index 24cd37a..24f7b3d 100644 --- a/.github/workflows/build-test-rust-minimap2-sys.yml +++ b/.github/workflows/build-test-rust-minimap2-sys.yml @@ -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 diff --git a/.github/workflows/build-test-rust-minimap2.yaml b/.github/workflows/build-test-rust-minimap2.yaml index 2b606a9..84bc618 100644 --- a/.github/workflows/build-test-rust-minimap2.yaml +++ b/.github/workflows/build-test-rust-minimap2.yaml @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 93aaa68..4657bca 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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. diff --git a/src/lib.rs b/src/lib.rs index 6cac12c..cb6b637 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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()); @@ -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());