diff --git a/ci.sh b/ci.sh new file mode 100644 index 00000000..7638e308 --- /dev/null +++ b/ci.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# A script to run a simplified version of the checks done by CI. +# +# Usage +# +# ```sh +# . ./ci.sh +# ``` + +echo "Running 'cargo fmt -- --check'" +RUSTFLAGS=-Dwarnings cargo +nightly fmt --all -- --check + +echo "Running 'cargo clippy'" +RUSTFLAGS=-Dwarnings cargo +nightly clippy --all --all-features + +echo "Running 'cargo test'" +RUSTFLAGS=-Dwarnings cargo +nightly test --all --all-features + +echo "Running 'cargo doc'" +RUSTDOCFLAGS=-Dwarnings cargo +nightly doc --no-deps --all --all-features + +echo "Running 'compiletest'" +. ./compiletest.sh diff --git a/compiletest.sh b/compiletest.sh index c1226e1c..5c9de854 100644 --- a/compiletest.sh +++ b/compiletest.sh @@ -1,5 +1,11 @@ #!/bin/bash -# A script to run compile tests with the same condition that pin-project executes with CI. +# A script to run compile tests with the same condition of the checks done by CI. +# +# Usage +# +# ```sh +# . ./compiletest.sh +# ``` -rm -rf target/debug/deps/libpin_project* && RUSTFLAGS='--cfg compiletest --cfg pin_project_show_unpin_struct' cargo test -p pin-project --all-features --test compiletest +rm -rf target/debug/deps/libpin_project* && RUSTFLAGS='--cfg compiletest --cfg pin_project_show_unpin_struct' cargo +nightly test -p pin-project --all-features --test compiletest