From 62fc0a2d24e676a1f24bba56ce8a515e04b8f5c3 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Wed, 13 Mar 2024 21:04:55 +0100 Subject: [PATCH] Separate build and test CI jobs Our dev dependencies have updated their minimum supported Rust version (MSRV), so we now only check that the library builds on Rust 1.56. Tests are run on multiple Rust versions, as usual. The MSRV is now also documented in the Cargo.toml file. --- .github/workflows/build.yml | 17 ++++++++++++++++- Cargo.toml | 1 + 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d5fa7b..f146f93 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,6 @@ jobs: strategy: matrix: rust: - - 1.56 - stable - nightly os: @@ -47,6 +46,22 @@ jobs: if: matrix.rust == 'nightly' run: cargo check --all-targets + msrv: + name: Build MSRV + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Rust + run: rustup default 1.56 + + - uses: Swatinem/rust-cache@v2 + + - name: Build + run: cargo build + build-documentation: name: Build documentation runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 2258d7d..ae043c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ keywords = ["random", "text", "markov", "typography"] categories = ["text-processing"] license = "MIT" edition = "2021" +rust-version = "1.56" [dependencies] rand = {version = "0.8.5", default-features = false, features = ["alloc"]}