summaryrefslogtreecommitdiff
path: root/ci/script.sh
diff options
context:
space:
mode:
authorZac Berkowitz <zac.berkowitz@gmail.com>2017-02-25 02:21:41 +0000
committerBryant Mairs <bryant@mai.rs>2017-04-09 07:41:58 -0700
commitee2bff1cc42f5cd8371c10d8d9228fe1c0261023 (patch)
tree4369a054854a6cf74f9e05461cf0967d1b3e9c0d /ci/script.sh
parent52963abcdddae0ee2684c33a1f451b8a3cf0406b (diff)
downloadnix-ee2bff1cc42f5cd8371c10d8d9228fe1c0261023.zip
Added ci templates from `trust` v0.1.1
Diffstat (limited to 'ci/script.sh')
-rw-r--r--ci/script.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/ci/script.sh b/ci/script.sh
new file mode 100644
index 00000000..de1f77c5
--- /dev/null
+++ b/ci/script.sh
@@ -0,0 +1,24 @@
+# This script takes care of testing your crate
+
+set -ex
+
+# TODO This is the "test phase", tweak it as you see fit
+main() {
+ cross build --target $TARGET
+ cross build --target $TARGET --release
+
+ if [ -n $DISABLE_TESTS ]; then
+ return
+ fi
+
+ cross test --target $TARGET
+ cross test --target $TARGET --release
+
+ cross run --target $TARGET
+ cross run --target $TARGET --release
+}
+
+# we don't run the "test phase" when doing deploys
+if [ -z $TRAVIS_TAG ]; then
+ main
+fi