diff options
Diffstat (limited to 'ci/script.sh')
-rw-r--r-- | ci/script.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ci/script.sh b/ci/script.sh new file mode 100644 index 0000000..6c3703f --- /dev/null +++ b/ci/script.sh @@ -0,0 +1,24 @@ +# This script takes care of testing your crate + +set -ex + +main() { + local features="--features reqwest/native-tls-vendored" + if [[ $TARGET =~ .*-freebsd ]]; then + features="--features reqwest/rustls-tls" + fi + + cross build $features --target $TARGET + cross build $features --target $TARGET --release + + if [ ! -z $DISABLE_TESTS ]; then + return + fi + + cross test $features --target $TARGET +} + +# we don't run the "test phase" when doing deploys +if [ -z $TRAVIS_TAG ]; then + main +fi |