Use stable Rust with cargo-semver-checks>=0.12.

This commit is contained in:
Predrag Gruevski 2022-09-28 19:16:55 +00:00 committed by Predrag Gruevski
parent a1d8af322f
commit 4cc566bb04

View file

@ -1,7 +1,7 @@
name: 'cargo-semver-checks' name: 'cargo-semver-checks'
description: 'Ensure the public API in your Rust crate follows semantic versioning' description: 'Ensure the public API in your Rust crate follows semantic versioning'
branding: branding:
icon: 'check-circle' icon: 'check-circle'
color: 'green' color: 'green'
inputs: inputs:
crate-name: crate-name:
@ -22,7 +22,7 @@ runs:
- name: Install rust - name: Install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: nightly toolchain: stable
profile: minimal profile: minimal
- name: Build rustdoc and check it - name: Build rustdoc and check it
shell: bash shell: bash
@ -64,7 +64,7 @@ runs:
export COMPARISON_TAG="${{ inputs.version-tag-prefix }}$("$GITHUB_ACTION_PATH/find_comparison_version.sh" "$PACKAGE_NAME")" export COMPARISON_TAG="${{ inputs.version-tag-prefix }}$("$GITHUB_ACTION_PATH/find_comparison_version.sh" "$PACKAGE_NAME")"
git fetch --depth=1 origin "+refs/tags/$COMPARISON_TAG:refs/tags/$COMPARISON_TAG" git fetch --depth=1 origin "+refs/tags/$COMPARISON_TAG:refs/tags/$COMPARISON_TAG"
git checkout "$COMPARISON_TAG" git checkout "$COMPARISON_TAG"
cargo +nightly rustdoc $RUSTDOC_EARLY_FLAGS -- $RUSTDOC_LATE_FLAGS RUSTC_BOOTSTRAP=1 cargo rustdoc $RUSTDOC_EARLY_FLAGS -- $RUSTDOC_LATE_FLAGS
mv "$(cargo metadata --format-version 1 | jq -r .target_directory)/doc/$PACKAGE_NAME_WITH_UNDERSCORES.json" /tmp/baseline.json mv "$(cargo metadata --format-version 1 | jq -r .target_directory)/doc/$PACKAGE_NAME_WITH_UNDERSCORES.json" /tmp/baseline.json
# Return to the original git sha. # Return to the original git sha.
@ -72,7 +72,7 @@ runs:
# Build rustdoc JSON for the current version, and move it to /tmp/ # Build rustdoc JSON for the current version, and move it to /tmp/
# so it doesn't get overwritten by the baseline build. # so it doesn't get overwritten by the baseline build.
cargo +nightly rustdoc $RUSTDOC_EARLY_FLAGS -- $RUSTDOC_LATE_FLAGS RUSTC_BOOTSTRAP=1 cargo rustdoc $RUSTDOC_EARLY_FLAGS -- $RUSTDOC_LATE_FLAGS
mv "$(cargo metadata --format-version 1 | jq -r .target_directory)/doc/$PACKAGE_NAME_WITH_UNDERSCORES.json" /tmp/current.json mv "$(cargo metadata --format-version 1 | jq -r .target_directory)/doc/$PACKAGE_NAME_WITH_UNDERSCORES.json" /tmp/current.json
# Check for semver violations. # Check for semver violations.