Skip to content

Commit 43dd31e

Browse files
committed
ci: Run cargo-semver-checks
This should eventually be able to replace the `.txt` files.
1 parent ea6f07f commit 43dd31e

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ jobs:
6767
run: |
6868
set -eux
6969
[ "${{ matrix.toolchain }}" = "1.63.0" ] && echo 'RUSTFLAGS=' >> "$GITHUB_ENV" || true
70-
70+
7171
- name: Setup Rust toolchain
7272
run: ./ci/install-rust.sh
7373

74+
- name: Install semver-checks
75+
uses: taiki-e/install-action@cargo-semver-checks
76+
if: matrix.toolchain == 'stable'
77+
7478
# FIXME(ci): These `du` statements are temporary for debugging cache
7579
- name: Target size before restoring cache
7680
run: du -sh target | sort -k 2 || true

ci/verify-build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ set -eux
1111

1212
rust="$TOOLCHAIN"
1313
filter="${FILTER:-}"
14+
host_target=$(rustc -vV | awk '/^host/ { print $2 }')
1415

1516
case "$(uname -s)" in
1617
Linux*) os=linux ;;
@@ -25,6 +26,7 @@ esac
2526
echo "Testing Rust $rust on $os"
2627

2728
if [ "$TOOLCHAIN" = "nightly" ] ; then
29+
# For build-std
2830
rustup component add rust-src
2931
fi
3032

@@ -108,6 +110,13 @@ test_target() {
108110
$cmd --no-default-features
109111
done
110112
fi
113+
114+
# FIXME(semver): can't pass `--target` to `cargo-semver-checks`
115+
if [ "$rust" = "stable" ] && [ "$target" = "$host_target" ]; then
116+
# Run semver checks on the stable channel
117+
cargo semver-checks --only-explicit-features \
118+
--features std,extra_traits
119+
fi
111120
}
112121

113122
freebsd_versions="\

0 commit comments

Comments
 (0)