Skip to content

Commit

Permalink
Bump the MSRV to 1.64.0 (tikv#204)
Browse files Browse the repository at this point in the history
* Bump the MSRV to 1.64.0

Signed-off-by: hi-rustin <[email protected]>

* Update toolchain

Signed-off-by: hi-rustin <[email protected]>

* Remove useless mv

Signed-off-by: hi-rustin <[email protected]>

---------

Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 authored Mar 21, 2023
1 parent 1f4ef09 commit 5fac2a2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 30 deletions.
46 changes: 17 additions & 29 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: 1.56.1
toolchain: 1.64.0
override: true
components: rustfmt, clippy

- name: Install protobuf compiler
run: sudo apt-get install -y protobuf-compiler

Expand All @@ -35,12 +35,6 @@ jobs:
- name: Remove pre-generated prost files to force regeneration
run: rm proto/*.rs

- name: Specify dependency version for old Rust
run: |
cp Cargo.toml Cargo.toml.bak
sed -i "s|inferno = { version = \"0.11\"|inferno = { version = \"=0.11.1\"|g" ./Cargo.toml
sed -i "s|criterion = \"0.4\"|criterion = \"=0.3.0\"\ncsv = \"=1.1.0\"|g" Cargo.toml
- name: Run cargo clippy prost
uses: actions-rs/[email protected]
with:
Expand All @@ -55,22 +49,22 @@ jobs:

- name: Check if the prost file committed to git is up-to-date
run: |
mv Cargo.toml.bak Cargo.toml
git diff --no-ext-diff --exit-code
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
toolchain: [stable, nightly, 1.56.1]
target: [
x86_64-unknown-linux-gnu,
aarch64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
x86_64-apple-darwin,
aarch64-apple-darwin,
]
toolchain: [stable, nightly, 1.64.0]
target:
[
x86_64-unknown-linux-gnu,
aarch64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
x86_64-apple-darwin,
aarch64-apple-darwin,
]
exclude:
- os: ubuntu-latest
target: x86_64-apple-darwin
Expand All @@ -97,13 +91,6 @@ jobs:
target: ${{ matrix.target }}
override: true

- name: Specify dependency version for old Rust
if: ${{ matrix.toolchain == '1.56.1' }}
run: |
# sed -i is not compatible with Mac OS
mv Cargo.toml Cargo.toml.bak
sed "s|inferno = { version = \"0.11\"|inferno = { version = \"=0.11.1\"|g" Cargo.toml.bak > ./Cargo.toml
- name: Run cargo build prost
uses: actions-rs/[email protected]
with:
Expand All @@ -129,11 +116,12 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
toolchain: [stable, nightly]
target: [
x86_64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
x86_64-apple-darwin,
]
target:
[
x86_64-unknown-linux-gnu,
x86_64-unknown-linux-musl,
x86_64-apple-darwin,
]
exclude:
- os: ubuntu-latest
target: x86_64-apple-darwin
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ description = "An internal perf tools for rust programs."
repository = "https://github.com/tikv/pprof-rs"
documentation = "https://docs.rs/pprof/"
readme = "README.md"
rust-version = "1.64.0" # MSRV

[features]
default = ["cpp"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Unit tests have been added to guarantee there is no `malloc` in sample functions

## Minimum Supported Rust Version

Rust 1.56 or higher.
Rust 1.64 or higher.

Minimum supported Rust version can be changed in the future, but it will be done with a minor version bump.

Expand Down

0 comments on commit 5fac2a2

Please sign in to comment.