2017-01-31 11:09:37 -06:00
|
|
|
#!/bin/bash
|
2017-01-31 11:17:33 -06:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
|
|
|
|
channel() {
|
|
|
|
if [ -n "${TRAVIS}" ]; then
|
|
|
|
if [ "${TRAVIS_RUST_VERSION}" = "${CHANNEL}" ]; then
|
|
|
|
pwd
|
|
|
|
(set -x; cargo "$@")
|
|
|
|
fi
|
2017-03-27 11:15:22 -05:00
|
|
|
elif [ -n "${APPVEYOR}" ]; then
|
|
|
|
if [ "${APPVEYOR_RUST_CHANNEL}" = "${CHANNEL}" ]; then
|
|
|
|
pwd
|
|
|
|
(set -x; cargo "$@")
|
|
|
|
fi
|
2017-01-31 11:09:37 -06:00
|
|
|
else
|
2017-01-31 11:17:33 -06:00
|
|
|
pwd
|
|
|
|
(set -x; cargo "+${CHANNEL}" "$@")
|
2017-01-31 11:09:37 -06:00
|
|
|
fi
|
2017-01-31 11:17:33 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ -n "${CLIPPY}" ]; then
|
2017-02-01 02:38:02 -06:00
|
|
|
# cached installation will not work on a later nightly
|
|
|
|
if [ -n "${TRAVIS}" ] && ! cargo install clippy --debug --force; then
|
|
|
|
echo "COULD NOT COMPILE CLIPPY, IGNORING CLIPPY TESTS"
|
|
|
|
exit
|
2017-01-31 11:17:33 -06:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$DIR/serde"
|
|
|
|
cargo clippy --features unstable-testing -- -Dclippy
|
|
|
|
|
|
|
|
cd "$DIR/serde_derive"
|
|
|
|
cargo clippy --features unstable-testing -- -Dclippy
|
|
|
|
|
|
|
|
cd "$DIR/test_suite"
|
2017-03-08 23:02:15 -06:00
|
|
|
cargo clippy --features unstable -- -Dclippy
|
2017-01-31 11:17:33 -06:00
|
|
|
|
|
|
|
cd "$DIR/test_suite/no_std"
|
|
|
|
cargo clippy -- -Dclippy
|
2017-01-31 11:09:37 -06:00
|
|
|
else
|
2017-01-31 11:17:33 -06:00
|
|
|
CHANNEL=nightly
|
|
|
|
cargo clean
|
|
|
|
cd "$DIR/serde"
|
|
|
|
channel build
|
|
|
|
channel build --no-default-features
|
|
|
|
channel build --no-default-features --features alloc
|
|
|
|
channel build --no-default-features --features collections
|
|
|
|
channel test --features unstable-testing
|
|
|
|
cd "$DIR/test_suite/deps"
|
|
|
|
channel build
|
|
|
|
cd "$DIR/test_suite"
|
2017-03-08 23:02:15 -06:00
|
|
|
channel test --features unstable
|
2017-01-31 11:17:33 -06:00
|
|
|
cd "$DIR/test_suite/no_std"
|
|
|
|
channel build
|
|
|
|
|
|
|
|
CHANNEL=beta
|
|
|
|
cargo clean
|
|
|
|
cd "$DIR/serde"
|
|
|
|
channel build
|
|
|
|
cd "$DIR/test_suite"
|
|
|
|
channel test
|
|
|
|
|
|
|
|
CHANNEL=stable
|
|
|
|
cargo clean
|
|
|
|
cd "$DIR/serde"
|
|
|
|
channel build
|
|
|
|
channel build --no-default-features
|
|
|
|
|
|
|
|
CHANNEL=1.13.0
|
|
|
|
cargo clean
|
|
|
|
cd "$DIR/serde"
|
|
|
|
channel build
|
|
|
|
channel build --no-default-features
|
|
|
|
fi
|