diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..17f00b4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + pull_request: + +jobs: + # ──────────────────── MSRV ──────────────────── + msrv: + name: MSRV + 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..fd5cd2d 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.85.0" [dependencies] crossbeam-channel = "0.4.4" diff --git a/README.md b/README.md index a133d65..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.32.0. +Fastlog requires a minimum rustc version of 1.85.0. To use fastlog, first add this to your `Cargo.toml`;