Skip to content

Commit 46f226c

Browse files
authored
Fix #148 (#149)
* check minimal versions with cargo-minimal-versions * move benchmark to last step of CI * Only allow patch updates to the sys crate Use the `~` version specifier, which only allows changes in the last digit of the version. Additionally, force use of version `4.1.1`+, as `4.1.0` incorrectly claimed the library version in the c code * correct minimal cc version
1 parent 006f76b commit 46f226c

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ updates:
77
- package-ecosystem: "cargo"
88
directory: "/"
99
schedule:
10-
interval: "weekly"
10+
interval: "monthly"

.github/workflows/rust.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ jobs:
2525
targets: ${{ matrix.target }}
2626
components: 'rustfmt, clippy'
2727

28+
- name: Install cargo tools
29+
uses: taiki-e/install-action@v2
30+
with:
31+
tool: cargo-hack,cargo-minimal-versions
32+
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'
33+
2834
- uses: actions/checkout@v4
2935

3036
- name: Install LLVM
@@ -47,14 +53,18 @@ jobs:
4753
- name: Test
4854
run: cargo +${{ matrix.rust }} test --no-default-features --features "${{ matrix.cargo_features }}"
4955

50-
- name: Benchmark
51-
run: cargo +${{ matrix.rust }} bench --no-default-features --features "${{ matrix.cargo_features }}"
52-
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'
53-
5456
- name: Minimal versions
55-
run: cargo +${{ matrix.rust }} -Zdirect-minimal-versions test --no-default-features --features "${{ matrix.cargo_features }}"
57+
# cargo-minimal-versions won't detach the path deps if we're using dev dependencies
58+
# so we won't catch the case where we compile but fail tests because of path dependencies
59+
run: |
60+
cargo +${{ matrix.rust }} minimal-versions check --detach-path-deps --direct --workspace
61+
cargo +${{ matrix.rust }} minimal-versions test --direct --workspace
5662
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'
5763

5864
- name: Updated versions
5965
run: cargo update && cargo +${{ matrix.rust }} test --no-default-features --features "${{ matrix.cargo_features }}"
6066
if: matrix.rust == 'stable' && matrix.cargo_features == 'default'
67+
68+
- name: Benchmark
69+
run: cargo +${{ matrix.rust }} bench --no-default-features --features "${{ matrix.cargo_features }}"
70+
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'

croaring-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ doctest = false
2020
[dependencies]
2121

2222
[build-dependencies]
23-
cc = "1"
23+
cc = "1.1"

croaring/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "croaring"
3-
version = "2.0.2"
3+
version = "2.0.3"
44
edition = "2021"
55
authors = ["croaring-rs developers"]
66
license = "Apache-2.0"
@@ -25,7 +25,7 @@ roaring = "0.10"
2525
criterion = { version = "0.5", features = ["html_reports"] }
2626

2727
[dependencies]
28-
ffi = { package = "croaring-sys", path = "../croaring-sys", version = "4.1.0" }
28+
ffi = { package = "croaring-sys", path = "../croaring-sys", version = "~4.1.1" }
2929

3030
[[bench]]
3131
name = "benches"

0 commit comments

Comments
 (0)