serde/travis.sh

91 lines
2.0 KiB
Bash
Raw Normal View History

#!/bin/bash
2017-01-31 09:17:33 -08: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
elif [ -n "${APPVEYOR}" ]; then
if [ "${APPVEYOR_RUST_CHANNEL}" = "${CHANNEL}" ]; then
pwd
(set -x; cargo "$@")
fi
else
2017-01-31 09:17:33 -08:00
pwd
(set -x; cargo "+${CHANNEL}" "$@")
fi
2017-01-31 09:17:33 -08:00
}
if [ -n "${CLIPPY}" ]; then
2017-02-01 00:38:02 -08: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 09:17:33 -08:00
fi
cd "$DIR/serde"
2017-04-10 17:01:11 -07:00
cargo clippy --features 'rc unstable' -- -Dclippy
2017-01-31 09:17:33 -08:00
cd "$DIR/serde_derive"
cargo clippy -- -Dclippy
2017-01-31 09:17:33 -08:00
2017-11-06 22:28:58 -08:00
cd "$DIR/serde_test"
cargo clippy -- -Dclippy
2017-01-31 09:17:33 -08:00
cd "$DIR/test_suite"
2017-03-08 21:02:15 -08:00
cargo clippy --features unstable -- -Dclippy
2017-01-31 09:17:33 -08:00
cd "$DIR/test_suite/no_std"
cargo clippy -- -Dclippy
else
2017-01-31 09:17:33 -08:00
CHANNEL=nightly
cd "$DIR"
2017-01-31 09:17:33 -08:00
cargo clean
cd "$DIR/serde"
channel build
channel build --no-default-features
channel build --no-default-features --features alloc
2017-04-10 17:01:11 -07:00
channel test --features 'rc unstable'
2017-01-31 09:17:33 -08:00
cd "$DIR/test_suite/deps"
channel build
cd "$DIR/test_suite"
2017-03-08 21:02:15 -08:00
channel test --features unstable
channel build --tests --features proc-macro2/nightly
2017-08-15 21:58:52 -07:00
if [ -z "${APPVEYOR}" ]; then
cd "$DIR/test_suite/no_std"
channel build
fi
2017-01-31 09:17:33 -08:00
CHANNEL=beta
cd "$DIR"
2017-01-31 09:17:33 -08:00
cargo clean
cd "$DIR/serde"
2017-04-10 17:01:11 -07:00
channel build --features rc
2017-01-31 09:17:33 -08:00
cd "$DIR/test_suite"
channel test
CHANNEL=stable
cd "$DIR"
2017-01-31 09:17:33 -08:00
cargo clean
cd "$DIR/serde"
2017-04-10 17:01:11 -07:00
channel build --features rc
2017-01-31 09:17:33 -08:00
channel build --no-default-features
2017-04-10 19:41:32 -07:00
cd "$DIR/serde_test"
channel build
2017-04-19 14:45:06 -07:00
channel test
2017-01-31 09:17:33 -08:00
CHANNEL=1.13.0
cd "$DIR"
2017-01-31 09:17:33 -08:00
cargo clean
cd "$DIR/serde"
2017-04-10 17:01:11 -07:00
channel build --features rc
2017-01-31 09:17:33 -08:00
channel build --no-default-features
2017-04-10 19:41:32 -07:00
cd "$DIR/serde_test"
channel build
2017-01-31 09:17:33 -08:00
fi