File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,14 @@ jobs:
6666 run : |
6767 set -eux
6868 [ "${{ matrix.toolchain }}" = "1.63.0" ] && echo 'RUSTFLAGS=' >> "$GITHUB_ENV" || true
69-
69+
7070 - name : Setup Rust toolchain
7171 run : ./ci/install-rust.sh
7272
73+ - name : Install semver-checks
74+ uses : taiki-e/install-action@cargo-semver-checks
75+ if : matrix.toolchain == 'stable'
76+
7377 # FIXME(ci): These `du` statements are temporary for debugging cache
7478 - name : Target size before restoring cache
7579 run : du -sh target | sort -k 2 || true
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ set -eux
1111
1212rust=" $TOOLCHAIN "
1313filter=" ${FILTER:- } "
14+ host_target=$( rustc -vV | awk ' /^host/ { print $2 }' )
1415
1516case " $( uname -s) " in
1617 Linux* ) os=linux ;;
2526echo " Testing Rust $rust on $os "
2627
2728if [ " $TOOLCHAIN " = " nightly" ] ; then
29+ # For build-std
2830 rustup component add rust-src
2931fi
3032
@@ -107,6 +109,13 @@ test_target() {
107109 $cmd --no-default-features
108110 done
109111 fi
112+
113+ # FIXME(semver): can't pass `--target` to `cargo-semver-checks`
114+ if [ " $rust " = " stable" ] && [ " $target " = " $host_target " ]; then
115+ # Run semver checks on the stable channel
116+ cargo semver-checks --only-explicit-features \
117+ --features std,extra_traits
118+ fi
110119}
111120
112121freebsd_versions=" \
Original file line number Diff line number Diff line change @@ -875,7 +875,7 @@ impl TestGenerator {
875875 let name = format ! ( "lib{stem}.a" ) ;
876876
877877 cfg. try_compile ( & name)
878- . context ( format ! ( "failed to compile `{}`" , name ) )
878+ . context ( format ! ( "failed to compile `{name }`" ) )
879879 . map ( |_| out)
880880 }
881881
You can’t perform that action at this time.
0 commit comments