mirror of
https://github.com/sharkdp/bat
synced 2024-11-23 12:23:19 +00:00
Get the MSRV for the build job from the package metadata
Co-authored-by: Martin Nordholts <enselic@gmail.com>
This commit is contained in:
parent
22cc6ffb5a
commit
40abebff8e
1 changed files with 5 additions and 3 deletions
8
.github/workflows/CICD.yml
vendored
8
.github/workflows/CICD.yml
vendored
|
@ -1,7 +1,6 @@
|
||||||
name: CICD
|
name: CICD
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MIN_SUPPORTED_RUST_VERSION: "1.62.0"
|
|
||||||
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
|
CICD_INTERMEDIATES_DIR: "_cicd-intermediates"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
@ -42,10 +41,13 @@ jobs:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
|
- name: Get the MSRV from the package metadata
|
||||||
|
id: msrv
|
||||||
|
run: cargo metadata --no-deps --format-version 1 | jq -r '"version=" + (.packages[] | select(.name = "bat").rust_version)' >> $GITHUB_OUTPUT
|
||||||
|
- name: Install rust toolchain (v${{ steps.msrv.outputs.version }})
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
toolchain: ${{ steps.msrv.outputs.version }}
|
||||||
components: clippy
|
components: clippy
|
||||||
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
||||||
run: cargo clippy --locked --all-targets ${{ env.MSRV_FEATURES }}
|
run: cargo clippy --locked --all-targets ${{ env.MSRV_FEATURES }}
|
||||||
|
|
Loading…
Reference in a new issue