mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
maint/CICD ~ add 'Cargo.lock' format testing and protection
This commit is contained in:
parent
ce66f3fbdb
commit
daa5868da4
1 changed files with 13 additions and 2 deletions
15
.github/workflows/CICD.yml
vendored
15
.github/workflows/CICD.yml
vendored
|
@ -119,6 +119,12 @@ jobs:
|
||||||
use-tool-cache: true
|
use-tool-cache: true
|
||||||
env:
|
env:
|
||||||
RUSTUP_TOOLCHAIN: stable
|
RUSTUP_TOOLCHAIN: stable
|
||||||
|
- name: Confirm compatible 'Cargo.lock'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Confirm compatible 'Cargo.lock'
|
||||||
|
# * 'Cargo.lock' is required to be in a format that `cargo` of MinSRV can interpret (eg, v1-format for MinSRV < v1.38)
|
||||||
|
cargo fetch --locked --quiet || { echo "::error file=Cargo.lock::Incompatible 'Cargo.lock' format; try \`cargo +${{ env.RUST_MIN_SRV }} update\`" ; exit 1 ; }
|
||||||
- name: Info
|
- name: Info
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -136,9 +142,14 @@ jobs:
|
||||||
cargo-tree tree -V
|
cargo-tree tree -V
|
||||||
## dependencies
|
## dependencies
|
||||||
echo "## dependency list"
|
echo "## dependency list"
|
||||||
cargo fetch --quiet
|
cargo fetch --locked --quiet
|
||||||
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
|
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
|
||||||
RUSTUP_TOOLCHAIN=stable cargo-tree tree --frozen --all --no-dev-dependencies --no-indent --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
|
RUSTUP_TOOLCHAIN=stable cargo-tree tree --frozen --all --no-dev-dependencies --no-indent --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
|
||||||
|
- name: Info
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Info
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
@ -348,7 +359,7 @@ jobs:
|
||||||
cargo-tree tree -V
|
cargo-tree tree -V
|
||||||
## dependencies
|
## dependencies
|
||||||
echo "## dependency list"
|
echo "## dependency list"
|
||||||
cargo fetch --quiet
|
cargo fetch --locked --quiet
|
||||||
cargo-tree tree --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --all --no-dev-dependencies --no-indent | grep -vE "$PWD" | sort --unique
|
cargo-tree tree --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --all --no-dev-dependencies --no-indent | grep -vE "$PWD" | sort --unique
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue