From 7e18da63fa2679894d0c511983d6d43eb638f4cb Mon Sep 17 00:00:00 2001 From: Iban Eguia Moraza Date: Sun, 24 Sep 2023 01:56:50 +0200 Subject: [PATCH] Added MSRV check (#3291) * Added MSRV check * Added Rust version check from Cargo.toml * Update rust.yml Co-authored-by: Kevin <46825870+nekevss@users.noreply.github.com> --------- Co-authored-by: Kevin <46825870+nekevss@users.noreply.github.com> --- .github/workflows/rust.yml | 18 ++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 02dc41596d..4ee2dc6460 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -66,6 +66,24 @@ jobs: - name: Test docs run: cargo test --doc --profile ci --features intl + msrv: + name: Minimum supported Rust version + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + # Get the rust_version from the Cargo.toml + - name: Get rust_version + id: rust_version + run: echo "rust_version=$(grep '^rust-version' Cargo.toml | cut -d' ' -f3 | tr -d '"')" >> $GITHUB_OUTPUT + - uses: actions-rs/toolchain@v1.0.7 + with: + toolchain: ${{ steps.rust_version.outputs.rust_version }} + override: true + profile: minimal + - name: Check compilation + run: cargo check --all-features --all-targets + misc: name: Misc runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 7bdf9123fc..541539ae2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ [workspace.package] edition = "2021" version = "0.17.0" -rust-version = "1.71" +rust-version = "1.71.0" authors = ["boa-dev"] repository = "https://github.com/boa-dev/boa" license = "Unlicense OR MIT"