From 0579754ba98d317d761abfe5bd5621484a88437b Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Mon, 1 Aug 2022 14:07:49 -0700 Subject: [PATCH 1/3] Add rust-version - 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. --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ Cargo.toml | 1 + MSRV.md | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85a8649e..1d548b08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,3 +118,29 @@ jobs: run: cargo install --locked wasm-bindgen-cli just - name: Just build run: just build ${{ matrix.example }} + + # See https://github.com/parasyte/pixels-ci-rust-version + rust-version: + name: Rust-Version + name: WASM + runs-on: ubuntu-latest + needs: [checks, lints] + strategy: + matrix: + rust: + - 1.56 + steps: + - name: Checkout sources + uses: actions/checkout@v3 + with: + repository: https://github.com/parasyte/pixels-ci-rust-version.git + - 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 diff --git a/Cargo.toml b/Cargo.toml index 00486df1..5c21d067 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ description = "A tiny library providing a GPU-powered pixel frame buffer." version = "0.9.0" authors = ["Jay Oster "] edition = "2021" +rust-version = "1.56" repository = "https://github.com/parasyte/pixels" readme = "README.md" keywords = ["pixels", "2D", "GPU", "framebuffer"] diff --git a/MSRV.md b/MSRV.md index e1e73791..72076ba2 100644 --- a/MSRV.md +++ b/MSRV.md @@ -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 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. From 7c2fd6bdb1f00170754453584abf82b65e3665aa Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Mon, 1 Aug 2022 14:36:41 -0700 Subject: [PATCH 2/3] Fix syntax error --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d548b08..4561f35b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,6 @@ jobs: # See https://github.com/parasyte/pixels-ci-rust-version rust-version: name: Rust-Version - name: WASM runs-on: ubuntu-latest needs: [checks, lints] strategy: From 4fec6ae529869bff22291574ab047cde25c9af04 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Mon, 1 Aug 2022 14:44:29 -0700 Subject: [PATCH 3/3] Fix repo reference - Update all actions to checkout/v3 - Include minor version number for consistency --- .github/workflows/ci.yml | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4561f35b..b6cb89ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - 1.60.0 steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Update apt repos run: sudo apt-get -y update - name: Install dependencies @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Update apt repos run: sudo apt-get -y update - name: Install dependencies @@ -76,7 +76,7 @@ jobs: - 1.60.0 steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Update apt repos run: sudo apt-get -y update - name: Install dependencies @@ -102,7 +102,7 @@ jobs: - minimal-web steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Update apt repos run: sudo apt-get -y update - name: Install dependencies @@ -127,12 +127,12 @@ jobs: strategy: matrix: rust: - - 1.56 + - 1.56.0 steps: - name: Checkout sources uses: actions/checkout@v3 with: - repository: https://github.com/parasyte/pixels-ci-rust-version.git + repository: parasyte/pixels-ci-rust-version - name: Install toolchain uses: actions-rs/toolchain@v1 with: diff --git a/Cargo.toml b/Cargo.toml index 5c21d067..0f5f2bab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "A tiny library providing a GPU-powered pixel frame buffer." version = "0.9.0" authors = ["Jay Oster "] edition = "2021" -rust-version = "1.56" +rust-version = "1.56.0" repository = "https://github.com/parasyte/pixels" readme = "README.md" keywords = ["pixels", "2D", "GPU", "framebuffer"]