From eb910aa7ae8513b386bdab414195c264a25fd801 Mon Sep 17 00:00:00 2001 From: Joseph Guhlin Date: Thu, 8 Aug 2024 12:45:47 +1200 Subject: [PATCH 1/3] Remove Circle CI --- .circleci/config.yml | 62 -------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e58e67b..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference -version: 2.1 - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - coverage: - machine: true - steps: - - checkout - - run: git submodule sync --recursive - - run: git submodule update --init --recursive - - run: docker run --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin /bin/bash -c "apt-get update; apt-get install zlib1g-dev cmake -y; cargo build; cargo tarpaulin --out Xml; cd minimap2-sys; cargo tarpaulin" - - run: bash <(curl -s https://codecov.io/bash) - - test-linux: - docker: - - image: cimg/rust:1.77.2 - steps: - - checkout - - run: sudo apt update - - run: sudo apt install clang libclang-dev zlib1g-dev -y - - run: git submodule sync --recursive - - run: git submodule update --init --recursive - - restore_cache: - key: project-cache - #- run: cargo install grcov - #- run: cargo --version - #- run: bash .scripts/grcov.bash - - run: cargo build - - run: cargo build --features htslib - - run: cargo build --features simde - - run: cargo build --features htslib,simde - - run: cargo build --features static - - run: cargo build --features static,htslib - - run: cargo build --features static,htslib,simde - - save_cache: - key: project-cache - paths: - - "~/.cargo" - - run: cargo test - - run: cargo test --features htslib - - run: cargo test --features simde - - run: cd minimap2-sys - - run: cargo test - - run: cargo test --features simde - - run: cargo test --features static - - run: cargo test --features static,simde - - run: cargo test --features static - - run: cd .. - - store_artifacts: - path: ./build - -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows -workflows: - minimap2-test: - jobs: - - test-linux - - coverage - From 92c53aea5071d5ecfda4de58d8becbc32a730980 Mon Sep 17 00:00:00 2001 From: Joseph Guhlin Date: Thu, 8 Aug 2024 13:01:38 +1200 Subject: [PATCH 2/3] Better zlib handling --- Cargo.toml | 4 ++-- minimap2-sys/build.rs | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3b2519e..dad80e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,8 +36,8 @@ simdutf8 = {version = "0.1", optional = true} needletail = { version = "0.5", optional = true, default-features = false} # Dep for development -# minimap2-sys = { path = "./minimap2-sys" } -minimap2-sys = "0.1.19" +minimap2-sys = { path = "./minimap2-sys" } +# minimap2-sys = "0.1.19" rust-htslib = { version = "0.47", default-features = false, optional = true } [dev-dependencies] diff --git a/minimap2-sys/build.rs b/minimap2-sys/build.rs index e030a53..4fe4c2a 100644 --- a/minimap2-sys/build.rs +++ b/minimap2-sys/build.rs @@ -134,13 +134,27 @@ fn compile() { cc.flag("-DHAVE_KALLOC"); cc.flag("-lm"); + cc.flag("-lz"); cc.flag("-lpthread"); #[cfg(feature = "static")] cc.static_flag(true); if let Some(include) = std::env::var_os("DEP_Z_INCLUDE") { + println!("-------------FOUND ZLIB INCLUDE: {:?}", include); cc.include(include); + // Use env DEP_Z_ROOT to find the library + if let Some(lib) = std::env::var_os("DEP_Z_ROOT") { + let lib = lib.to_str().unwrap(); + println!("cargo:rustc-link-search=native={}", lib); + println!("cargo:rustc-link-lib=static=z"); + + } + } + + // Debugging, print out the entire environment + for (key, value) in std::env::vars() { + println!("{}: {}", key, value); } if let Ok(lib) = pkg_config::find_library("zlib") { From 9acb3e0f1a7fcc6e915df3cec9dc924166e44506 Mon Sep 17 00:00:00 2001 From: Joseph Guhlin Date: Thu, 8 Aug 2024 13:04:56 +1200 Subject: [PATCH 3/3] Remove mm2-fast tests --- .github/workflows/build-test-rust-minimap2-sys.yml | 2 -- .github/workflows/build-test-rust-minimap2.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/build-test-rust-minimap2-sys.yml b/.github/workflows/build-test-rust-minimap2-sys.yml index 212dcec..392067e 100644 --- a/.github/workflows/build-test-rust-minimap2-sys.yml +++ b/.github/workflows/build-test-rust-minimap2-sys.yml @@ -30,7 +30,5 @@ jobs: - run: cd minimap2-sys - name: Run minimap2-sys tests run: cargo test - - name: Run minimap2-sys mm2-fast tests - run: cargo test --features mm2-fast - name: Run minimap2-sys simde tests run: cargo test --features simde diff --git a/.github/workflows/build-test-rust-minimap2.yaml b/.github/workflows/build-test-rust-minimap2.yaml index be353d7..7385732 100644 --- a/.github/workflows/build-test-rust-minimap2.yaml +++ b/.github/workflows/build-test-rust-minimap2.yaml @@ -38,8 +38,6 @@ jobs: run: cargo test --verbose - name: Run tests htslib run: cargo test --features htslib - - name: Run tests mm2-fast - run: cargo test --features mm2-fast - name: Run tests simde run: cargo test --features simde