Skip to content

Commit

Permalink
Add ci.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Sep 8, 2019
1 parent 1d4e7a8 commit a92957c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
24 changes: 24 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
@@ -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
10 changes: 8 additions & 2 deletions compiletest.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a92957c

Please sign in to comment.