Skip to content

Commit

Permalink
chore: set MSRV to 1.74 and enforce it in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
art049 committed Sep 6, 2024
1 parent 6903770 commit 0cbca01
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 13 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ jobs:
with:
extra_args: --all-files

msrv-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-msrv
- name: Check cospeed MSRV
run: cargo msrv --path crates/codspeed verify -- cargo check --all-features --config codspeed=true
- name: Check bencher_compat MSRV
run: cargo msrv --path crates/bencher_compat verify -- cargo check --all-features --config codspeed=true
- name: Check criterion_compat MSRV
run: cargo msrv --path crates/criterion_compat verify -- cargo check --all-features --config codspeed=true

tests:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/bencher_compat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "codspeed-bencher-compat"
version = "2.7.0"
rust-version = "1.74" # MSRV
edition = "2021"
description = "Bencher compatibility layer for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand Down
2 changes: 1 addition & 1 deletion crates/bencher_compat/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(codspeed)");
println!("cargo:rustc-check-cfg=cfg(codspeed)");
}
1 change: 1 addition & 0 deletions crates/codspeed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "codspeed"
version = "2.7.0"
rust-version = "1.74" # MSRV
edition = "2021"
description = "Core instrumentation library for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand Down
3 changes: 2 additions & 1 deletion crates/criterion_compat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "codspeed-criterion-compat"
version = "2.7.0"
rust-version = "1.74" # MSRV
edition = "2021"
description = "Criterion.rs compatibility layer for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand All @@ -20,7 +21,7 @@ criterion = { version = "0.5.1", default-features = false }
codspeed = { path = "../codspeed", version = "=2.7.0" }
colored = "2.1.0"

futures = { version = "0.3", default_features = false, optional = true }
futures = { version = "0.3", default-features = false, optional = true }
smol = { version = "2.0", default-features = false, optional = true }
tokio = { version = "1.39", default-features = false, features = [
"rt",
Expand Down
2 changes: 1 addition & 1 deletion crates/criterion_compat/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fn main() {
println!("cargo::rustc-check-cfg=cfg(codspeed)");
println!("cargo:rustc-check-cfg=cfg(codspeed)");
}

0 comments on commit 0cbca01

Please sign in to comment.