diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/install.sh | 7 | ||||
-rwxr-xr-x | ci/script.sh | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/ci/install.sh b/ci/install.sh index af4bb776..ccbe3728 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -1,6 +1,11 @@ #!/bin/bash -# Add clippy for linting with nightly builds +# Add clippy for lint validation if [ "$CLIPPY" == "true" ]; then rustup component add clippy fi + +# Add rustfmt for format validation +if [ "$RUSTFMT" == "true" ]; then + rustup component add rustfmt +fi diff --git a/ci/script.sh b/ci/script.sh index c17bbbd2..21991415 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -9,6 +9,12 @@ if [ "$CLIPPY" == "true" ]; then exit fi +# Run clippy rustfmt +if [ "$RUSTFMT" == "true" ]; then + cargo fmt -- --check + exit +fi + # Run test in release mode if a tag is present, to produce an optimized binary if [ -n "$TRAVIS_TAG" ]; then cargo test --release || error=true |