Skip to content

Commit ee85659

Browse files
authored
Merge branch 'master' into master
2 parents 61b391f + d7adb08 commit ee85659

23 files changed

+701
-329
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+

.github/workflows/conventional-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
title-format:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: amannn/action-semantic-pull-request@v3.4.0
14+
- uses: amannn/action-semantic-pull-request@v5.5.3
1515
env:
1616
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-please.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,34 @@ jobs:
1010
if: github.repository_owner == 'rust-bio'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
with:
1515
submodules: recursive
1616

17-
- uses: GoogleCloudPlatform/release-please-action@v3
17+
- uses: GoogleCloudPlatform/release-please-action@v4
1818
id: release_main
1919
with:
2020
release-type: rust
2121
package-name: rust-htslib
2222
bump-minor-pre-major: true
2323

2424
- name: Install stable toolchain
25-
uses: actions-rs/toolchain@v1
25+
uses: dtolnay/rust-toolchain@stable
2626
if: ${{ steps.release_main.outputs.release_created }}
2727
with:
2828
toolchain: stable
29-
override: true
3029

3130
- name: Install system dependencies
3231
if: ${{ steps.release_main.outputs.release_created }}
3332
run: |
3433
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
3534
36-
- uses: Swatinem/rust-cache@v1.3.0
35+
- uses: Swatinem/rust-cache@v2
3736
if: ${{ steps.release_main.outputs.release_created }}
3837

3938
- name: Publish rust-htslib
4039
if: ${{ steps.release_main.outputs.release_created }}
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: publish
44-
args: --token ${{ secrets.CRATES_IO_TOKEN }}
40+
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
4541

4642
# - uses: katyo/publish-crates@v1
4743
# if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }}

.github/workflows/rust.yml

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,116 +8,113 @@ on:
88

99
jobs:
1010
Formatting:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515

1616
- name: Install stable toolchain
17-
uses: actions-rs/toolchain@v1.0.6
17+
uses: dtolnay/rust-toolchain@stable
1818
with:
1919
toolchain: stable
20-
override: true
2120
components: rustfmt
2221

2322
- name: Check format
2423
run: cargo fmt -- --check
2524

2625
Linting:
27-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-22.04
2827
steps:
2928
- name: Checkout repository
30-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
3130
with:
3231
submodules: recursive
3332

3433
- name: Install stable toolchain
35-
uses: actions-rs/toolchain@v1.0.6
34+
uses: dtolnay/rust-toolchain@stable
3635
with:
3736
toolchain: stable
38-
override: true
3937
components: clippy
4038

4139
- name: Lint with clippy
42-
uses: actions-rs/clippy-check@v1
43-
with:
44-
token: ${{ secrets.GITHUB_TOKEN }}
40+
run: RUSTFLAGS="-Dwarnings" cargo clippy --all-features --all-targets -- -Dclippy::all -Dunused_imports
4541

4642
Testing:
4743
needs: Formatting
48-
runs-on: ubuntu-latest
44+
strategy:
45+
matrix:
46+
os: [ubuntu-22.04, ubuntu-22.04-arm]
47+
runs-on: ${{ matrix.os }}
4948
steps:
5049
- name: Checkout repository
51-
uses: actions/checkout@v2
50+
uses: actions/checkout@v4
5251
with:
5352
submodules: recursive
5453

5554
- name: Install nightly toolchain
56-
uses: actions-rs/toolchain@v1.0.6
55+
uses: dtolnay/rust-toolchain@stable
5756
with:
5857
toolchain: nightly
59-
override: true
6058

6159
- name: Install system dependencies
6260
run: |
6361
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
6462
65-
- uses: Swatinem/rust-cache@v1.3.0
63+
- uses: Swatinem/rust-cache@v2
6664

6765
- name: Run cargo-tarpaulin
68-
uses: actions-rs/[email protected]
69-
with:
70-
# TODO: update to latest tarpaulin once artefact download is fixed: https://github.com/actions-rs/tarpaulin/pull/23
71-
version: "0.22.0"
72-
args: "--all-features --run-types Tests,Doctests --out Lcov -- --test-threads 1"
66+
run: |
67+
set -x
68+
cargo install cargo-tarpaulin
69+
cargo tarpaulin --all-features --tests --doc --out Lcov -- --test-threads 1
7370
7471
- name: Upload coverage
75-
uses: coverallsapp/github-action@v1
72+
uses: coverallsapp/github-action@v2
7673
with:
7774
github-token: ${{ secrets.GITHUB_TOKEN }}
7875
path-to-lcov: ./lcov.info
7976

8077
Testing-Features:
8178
needs: Formatting
82-
runs-on: ubuntu-latest
8379
strategy:
8480
matrix:
81+
os: [ubuntu-22.04, ubuntu-22.04-arm]
8582
target:
8683
- no-default-features
8784
- all-features
8885
include:
8986
- target: no-default-features
9087
args: --no-default-features
91-
use_cross: false
9288
- target: all-features
89+
os: ubuntu-22.04
9390
args: --all-features
9491
toolchain_target: x86_64-unknown-linux-musl
95-
use_cross: false
92+
- target: all-features
93+
os: ubuntu-22.04-arm
94+
args: --all-features
95+
toolchain_target: aarch64-unknown-linux-musl
96+
runs-on: ${{ matrix.os }}
9697

9798
steps:
9899
- name: Checkout repository
99-
uses: actions/checkout@v2
100+
uses: actions/checkout@v4
100101
with:
101102
submodules: recursive
102103

103104
- name: Install stable toolchain
104-
uses: actions-rs/toolchain@v1.0.6
105+
uses: dtolnay/rust-toolchain@stable
105106
with:
106107
toolchain: stable
107-
override: true
108108

109109
- name: Install system dependencies
110110
run: |
111111
sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev
112112
113-
- uses: Swatinem/rust-cache@v1.3.0
113+
- uses: Swatinem/rust-cache@v2
114114

115115
- name: Test
116-
uses: actions-rs/cargo@v1
117-
with:
118-
command: test
119-
args: ${{ matrix.args }}
120-
use-cross: ${{ matrix.use_cross }}
116+
run: |
117+
cargo test ${{ matrix.args }}
121118
122119
Testing-MacOS:
123120
needs: Formatting
@@ -150,27 +147,23 @@ jobs:
150147

151148
steps:
152149
- name: Checkout repository
153-
uses: actions/checkout@v2
150+
uses: actions/checkout@v4
154151
with:
155152
submodules: recursive
156153

157154
- name: Install stable toolchain
158-
uses: actions-rs/toolchain@v1.0.6
155+
uses: dtolnay/rust-toolchain@stable
159156
with:
160157
toolchain: ${{ matrix.toolchain }}
161-
target: ${{ matrix.toolchain_target }}
158+
targets: ${{ matrix.toolchain_target }}
162159
override: true
163-
default: ${{ matrix.default }}
164160

165161
- name: Install htslib dependencies
166162
run: brew install bzip2 zlib xz curl-openssl
167163

168164
- name: Test
169-
uses: actions-rs/[email protected]
170-
with:
171-
use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
172-
command: test
173-
args: --release --all-features --verbose ${{ matrix.aux_args }}
165+
run: |
166+
cargo test --release --all-features --verbose ${{ matrix.aux_args }}
174167
# Testing-OSX-MUSL-BigSur:
175168
# needs: Formatting
176169
# runs-on: macOS-11.0

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.50.0](https://github.com/rust-bio/rust-htslib/compare/v0.49.0...v0.50.0) (2025-07-09)
6+
7+
8+
### Features
9+
10+
* Add bam::Record::set_cigar ([#477](https://github.com/rust-bio/rust-htslib/issues/477)) ([f1bb470](https://github.com/rust-bio/rust-htslib/commit/f1bb470d836e3cd8affae000f0fc14308f156c88))
11+
* Allow for non-diploid genotypes ([#476](https://github.com/rust-bio/rust-htslib/issues/476)) ([1c22ac5](https://github.com/rust-bio/rust-htslib/commit/1c22ac598edaa9fc1be354b857dc8f8f5c892984))
12+
13+
14+
### Bug Fixes
15+
16+
* clippy and fmt after merging PR [#466](https://github.com/rust-bio/rust-htslib/issues/466) and [#467](https://github.com/rust-bio/rust-htslib/issues/467) ([141e01c](https://github.com/rust-bio/rust-htslib/commit/141e01c74aa3d087f4c2e7fe380d06b1e272865b))
17+
18+
## [0.49.0](https://github.com/rust-bio/rust-htslib/compare/v0.48.0...v0.49.0) (2024-12-02)
19+
20+
21+
### Features
22+
23+
* move empty_record to header ([#453](https://github.com/rust-bio/rust-htslib/issues/453)) ([797965c](https://github.com/rust-bio/rust-htslib/commit/797965c5ab815112b1a2a1bcdb32716c1bc1f92a))
24+
25+
26+
### Bug Fixes
27+
28+
* memory leak in faidx when fetching sequences ([#455](https://github.com/rust-bio/rust-htslib/issues/455)) ([d9fe03a](https://github.com/rust-bio/rust-htslib/commit/d9fe03acfb81278a09a7e6091b9e1c38dd7b6cb4))
29+
530
## [0.48.0](https://github.com/rust-bio/rust-htslib/compare/v0.47.1...v0.48.0) (2024-11-12)
631

732

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "MIT"
99
name = "rust-htslib"
1010
readme = "README.md"
1111
repository = "https://github.com/rust-bio/rust-htslib.git"
12-
version = "0.48.0"
12+
version = "0.50.0"
1313

1414
[package.metadata.release]
1515
pre-release-commit-message = "release version {{version}}"
@@ -21,7 +21,7 @@ bio-types = ">=0.9"
2121
byteorder = "1.3"
2222
custom_derive = "0.1"
2323
derive-new = "0.7"
24-
hts-sys = {version = "2.1.4", default-features = false, features = ["bindgen"]}
24+
hts-sys = {version = "2.2.0", default-features = false, features = ["bindgen"]}
2525
ieee754 = "0.2"
2626
lazy_static = "1.4"
2727
libc = "0.2"
@@ -30,8 +30,8 @@ newtype_derive = "0.1"
3030
regex = "1.3"
3131
serde = {version = "^1", optional = true, features = ["derive"]}
3232
serde_bytes = {version = "0.11", optional = true}
33-
thiserror = "2"
34-
url = "2.1"
33+
thiserror = {version = "^2" }
34+
url = "2.5"
3535

3636
[features]
3737
bindgen = ["hts-sys/bindgen"]

src/bam/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ mod tests {
182182

183183
#[test]
184184
fn test_buffer() {
185-
let reader = bam::IndexedReader::from_path(&"test/test.bam").unwrap();
185+
let reader = bam::IndexedReader::from_path("test/test.bam").unwrap();
186186
let mut buffer = RecordBuffer::new(reader, false);
187187

188188
buffer.fetch(b"CHROMOSOME_I", 1, 5).unwrap();

src/bam/ext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//// Copyright 2019 Johannes Köster and Florian Finkernagel.
1+
// Copyright 2019 Johannes Köster and Florian Finkernagel.
22
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
33
// This file may not be copied, modified, or distributed
44
// except according to those terms.

src/bam/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ mod tests {
165165
fn test_push_tag() {
166166
let mut record = HeaderRecord::new(b"HD");
167167
record.push_tag(b"X1", 0);
168-
record.push_tag(b"X2", &0);
168+
record.push_tag(b"X2", 0);
169169

170170
let x = "x".to_string();
171171
record.push_tag(b"X3", x.as_str());

0 commit comments

Comments
 (0)