From cf424ab5b273a5f9c40475488cad3258dcd56598 Mon Sep 17 00:00:00 2001 From: "Lu, Wangshan" Date: Thu, 22 May 2025 19:06:58 +0800 Subject: [PATCH 1/3] Support rust-version in Cargo.toml --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++ .github/workflows/rust.yml | 15 ------------- Cargo.toml | 3 ++- README.md | 2 +- 4 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..60ea4a8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + pull_request: + +jobs: + # ──────────────────── MSRV ──────────────────── + msrv: + name: MSRV (${{ steps.msrv.outputs.rust }}) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 # ← @v4 is the current tag + + # Grab the value after `rust-version = "` (first match only) + - name: Extract MSRV from Cargo.toml + id: msrv + run: | + echo "rust=$(grep -m1 '^rust-version' Cargo.toml | cut -d '"' -f2)" >> "$GITHUB_OUTPUT" + + - name: Install ${{ steps.msrv.outputs.rust }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ steps.msrv.outputs.rust }} + override: true + profile: minimal # a bit quicker; omit for full std docs + + - run: cargo build --all-features --verbose + - run: cargo test --all-features --verbose + + # ──────────────────── STABLE ──────────────────── + stable: + name: Stable + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - run: cargo build --all-features --verbose + - run: cargo test --all-features --verbose diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 97fc421..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Rust - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/Cargo.toml b/Cargo.toml index 6cbb58e..025550d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastlog" -version = "0.2.1" +version = "0.3.0" authors = ["Wangshan Lu "] license = "MIT/Apache-2.0" readme = "README.md" @@ -10,6 +10,7 @@ A high performance asynchronous logger """ keywords = ["async", "fastlog", "log"] edition = "2018" +rust-version = "1.56.0" [dependencies] crossbeam-channel = "0.4.4" diff --git a/README.md b/README.md index a133d65..acb59d2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Currently this is still a work in progress. ## Usage -Fastlog requires a minimum rustc version of 1.32.0. +Fastlog requires a minimum rustc version of 1.56.0. To use fastlog, first add this to your `Cargo.toml`; From ba331ad5957a5fea70e0f84f25b9d552474f4ba9 Mon Sep 17 00:00:00 2001 From: "Lu, Wangshan" Date: Thu, 22 May 2025 19:13:01 +0800 Subject: [PATCH 2/3] Fix ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60ea4a8..17f00b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: # ──────────────────── MSRV ──────────────────── msrv: - name: MSRV (${{ steps.msrv.outputs.rust }}) + name: MSRV runs-on: ubuntu-latest steps: From c112b515e78253b048ce13338d92271cc7717993 Mon Sep 17 00:00:00 2001 From: "Lu, Wangshan" Date: Thu, 22 May 2025 19:19:02 +0800 Subject: [PATCH 3/3] Upgrade msrv to 1.85.0 to fix min compilation --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 025550d..fd5cd2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ A high performance asynchronous logger """ keywords = ["async", "fastlog", "log"] edition = "2018" -rust-version = "1.56.0" +rust-version = "1.85.0" [dependencies] crossbeam-channel = "0.4.4" diff --git a/README.md b/README.md index acb59d2..9404259 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Currently this is still a work in progress. ## Usage -Fastlog requires a minimum rustc version of 1.56.0. +Fastlog requires a minimum rustc version of 1.85.0. To use fastlog, first add this to your `Cargo.toml`;