Skip to content

Commit

Permalink
Fix #148 (#149)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Dr-Emann authored Aug 6, 2024
1 parent 006f76b commit 46f226c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
20 changes: 15 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
targets: ${{ matrix.target }}
components: 'rustfmt, clippy'

- name: Install cargo tools
uses: taiki-e/install-action@v2
with:
tool: cargo-hack,cargo-minimal-versions
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'

- uses: actions/checkout@v4

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

- name: Benchmark
run: cargo +${{ matrix.rust }} bench --no-default-features --features "${{ matrix.cargo_features }}"
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'

- name: Minimal versions
run: cargo +${{ matrix.rust }} -Zdirect-minimal-versions test --no-default-features --features "${{ matrix.cargo_features }}"
# cargo-minimal-versions won't detach the path deps if we're using dev dependencies
# so we won't catch the case where we compile but fail tests because of path dependencies
run: |
cargo +${{ matrix.rust }} minimal-versions check --detach-path-deps --direct --workspace
cargo +${{ matrix.rust }} minimal-versions test --direct --workspace
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'

- name: Updated versions
run: cargo update && cargo +${{ matrix.rust }} test --no-default-features --features "${{ matrix.cargo_features }}"
if: matrix.rust == 'stable' && matrix.cargo_features == 'default'

- name: Benchmark
run: cargo +${{ matrix.rust }} bench --no-default-features --features "${{ matrix.cargo_features }}"
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'
2 changes: 1 addition & 1 deletion croaring-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ doctest = false
[dependencies]

[build-dependencies]
cc = "1"
cc = "1.1"
4 changes: 2 additions & 2 deletions croaring/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "croaring"
version = "2.0.2"
version = "2.0.3"
edition = "2021"
authors = ["croaring-rs developers"]
license = "Apache-2.0"
Expand All @@ -25,7 +25,7 @@ roaring = "0.10"
criterion = { version = "0.5", features = ["html_reports"] }

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

[[bench]]
name = "benches"
Expand Down

0 comments on commit 46f226c

Please sign in to comment.