diff options
author | Sam Tay <sam.chong.tay@gmail.com> | 2020-06-25 02:10:48 -0700 |
---|---|---|
committer | Sam Tay <sam.chong.tay@gmail.com> | 2020-06-25 02:23:23 -0700 |
commit | 1c90502a3c4f735a7546a1147b100946f1a5af01 (patch) | |
tree | c932a54055229911f120fcc15e54d266bfae849f /ci/script.sh | |
parent | 3216d47824f3f15e11a60132b2c559fc4796d59c (diff) |
Add CI courtesy of trust & cross
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 |