From a2c2a6d6d32d00590430a2fb5be1384bd9c3a467 Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Thu, 19 Dec 2024 14:15:39 +0100 Subject: [PATCH] build: Make MSRV explicit Add `rust-version` to `Cargo.toml`. Verify this MSRV by adding a CI check that builds using that rust compiler version. The current MSRV is 1.61. Trying to build with 1.60 results in: ``` error: package `syn v2.0.90` cannot be built because it requires rustc 1.61 or newer, while the currently active rustc version is 1.60.0 ``` --- .github/workflows/ci.yml | 9 +++++++++ Cargo.toml | 1 + 2 files changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e502937..043a08f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,3 +41,12 @@ jobs: run: taplo lint - name: taplo fmt run: taplo fmt --check --diff + + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/install-action@cargo-hack + - uses: Swatinem/rust-cache@v2 + - name: check with all-features + run: cargo hack --rust-version --no-private --no-dev-deps check --all-features diff --git a/Cargo.toml b/Cargo.toml index bdff566..f0ac947 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ documentation = "https://docs.rs/graphql-parser" version = "0.4.1" authors = ["Paul Colomiets "] edition = "2018" +rust-version = "1.61" [dependencies] combine = "4.6.6"