Add rust-version (#295)

- This version is different from the MSRV. It specifies the minimum
  version required to build the crate and its direct dependencies.
- Add a CI step for building the crate alone with the oldest version
  possible.
- See MSRV.md for the policy and minimal version supported by CI,
  including all example code.
- Update all actions to checkout/v3
This commit is contained in:
Jay Oster 2022-08-01 14:59:46 -07:00 committed by GitHub
parent 41063dbf4b
commit 4ee5006481
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 5 deletions

View file

@ -16,7 +16,7 @@ jobs:
- 1.60.0 - 1.60.0
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Update apt repos - name: Update apt repos
run: sudo apt-get -y update run: sudo apt-get -y update
- name: Install dependencies - name: Install dependencies
@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Update apt repos - name: Update apt repos
run: sudo apt-get -y update run: sudo apt-get -y update
- name: Install dependencies - name: Install dependencies
@ -76,7 +76,7 @@ jobs:
- 1.60.0 - 1.60.0
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Update apt repos - name: Update apt repos
run: sudo apt-get -y update run: sudo apt-get -y update
- name: Install dependencies - name: Install dependencies
@ -102,7 +102,7 @@ jobs:
- minimal-web - minimal-web
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Update apt repos - name: Update apt repos
run: sudo apt-get -y update run: sudo apt-get -y update
- name: Install dependencies - name: Install dependencies
@ -118,3 +118,28 @@ jobs:
run: cargo install --locked wasm-bindgen-cli just run: cargo install --locked wasm-bindgen-cli just
- name: Just build - name: Just build
run: just build ${{ matrix.example }} run: just build ${{ matrix.example }}
# See https://github.com/parasyte/pixels-ci-rust-version
rust-version:
name: Rust-Version
runs-on: ubuntu-latest
needs: [checks, lints]
strategy:
matrix:
rust:
- 1.56.0
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
repository: parasyte/pixels-ci-rust-version
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build

View file

@ -4,6 +4,7 @@ description = "A tiny library providing a GPU-powered pixel frame buffer."
version = "0.9.0" version = "0.9.0"
authors = ["Jay Oster <jay@kodewerx.org>"] authors = ["Jay Oster <jay@kodewerx.org>"]
edition = "2021" edition = "2021"
rust-version = "1.56.0"
repository = "https://github.com/parasyte/pixels" repository = "https://github.com/parasyte/pixels"
readme = "README.md" readme = "README.md"
keywords = ["pixels", "2D", "GPU", "framebuffer"] keywords = ["pixels", "2D", "GPU", "framebuffer"]

View file

@ -21,4 +21,4 @@
The table above will be kept up-to-date in lock-step with CI on the main branch in GitHub. It may contain information about unreleased and yanked versions. It is the user's responsibility to consult with the [`pixels` versions page](https://crates.io/crates/pixels/versions) on `crates.io` to verify version status. The table above will be kept up-to-date in lock-step with CI on the main branch in GitHub. It may contain information about unreleased and yanked versions. It is the user's responsibility to consult with the [`pixels` versions page](https://crates.io/crates/pixels/versions) on `crates.io` to verify version status.
The MSRV will be chosen as the minimum version of `rustc` that can successfully pass CI, including documentation, lints, and all examples. For this reason, the minimum version _supported_ may be higher than the minimum version _required_ to compile the `pixels` crate itself. The MSRV will be chosen as the minimum version of `rustc` that can successfully pass CI, including documentation, lints, and all examples. For this reason, the minimum version _supported_ may be higher than the minimum version _required_ to compile the `pixels` crate itself. See `Cargo.toml` for the minimal Rust version required to build the crate alone.