Skip to content

Commit

Permalink
Add MSRV check to CI (#20)
Browse files Browse the repository at this point in the history
* Add MSRV job to CI

* Update CI

* Add MSRV note to README
FreezyLemon authored Apr 9, 2024
1 parent 88a5703 commit a27b39f
Showing 4 changed files with 1,134 additions and 8 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -7,16 +7,29 @@ on:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
build:
msrv:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
# rust-version from Cargo.toml
- name: Install Rust 1.65.0
uses: dtolnay/rust-toolchain@1.65.0
- name: Use predefined lockfile
run: mv Cargo.lock.MSRV Cargo.lock
- name: Build
run: cargo check --locked

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
- name: Build
run: cargo build
- name: Run tests
run: cargo test
1,106 changes: 1,106 additions & 0 deletions Cargo.lock.MSRV

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,14 +2,16 @@
name = "ssimulacra2"
version = "0.4.0"
edition = "2021"
rust-version = "1.65.0"
description = "Rust implementation of the SSIMULACRA2 metric"
repository = "https://github.com/rust-av/ssimulacra2"
homepage = "https://github.com/rust-av/ssimulacra2"
documentation = "https://docs.rs/ssimulacra2"
exclude = ["test_data"]
license = "BSD-2-Clause"

# When changing MSRV: Also update README and .github/workflows/rust.yml
rust-version = "1.65.0"

[features]
default = ["rayon"]

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,3 +5,8 @@
[![LICENSE](https://img.shields.io/crates/l/ssimulacra2?style=for-the-badge)](https://github.com/rust-av/ssimulacra2/blob/main/LICENSE)

Rust implementation of the [SSIMULACRA2 metric](https://github.com/cloudinary/ssimulacra2).

## Minimum supported Rust version (MSRV)

This crates requires a Rust version of 1.62.0 or higher. Increases in MSRV will result in a semver PATCH version increase.

0 comments on commit a27b39f

Please sign in to comment.