From ee2bff1cc42f5cd8371c10d8d9228fe1c0261023 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Sat, 25 Feb 2017 02:21:41 +0000 Subject: Added ci templates from `trust` v0.1.1 --- ci/script.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ci/script.sh (limited to 'ci/script.sh') 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 -- cgit v1.2.3 From c1dd0331044907e371da0f80d0df8ce4c271b597 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Sat, 25 Feb 2017 21:00:36 +0000 Subject: Fixed ci/script.sh to run tests when desired. --- ci/script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci/script.sh') diff --git a/ci/script.sh b/ci/script.sh index de1f77c5..ddd7f936 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -7,7 +7,7 @@ main() { cross build --target $TARGET cross build --target $TARGET --release - if [ -n $DISABLE_TESTS ]; then + if [ ! -z $DISABLE_TESTS ]; then return fi -- cgit v1.2.3 From 1e84da2acf1c80cfeb4e7510c2b48337d0858920 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Sat, 25 Feb 2017 21:18:53 +0000 Subject: Removed 'cargo run' directives from ci script. --- ci/script.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ci/script.sh') diff --git a/ci/script.sh b/ci/script.sh index ddd7f936..260fb073 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -2,8 +2,8 @@ set -ex -# TODO This is the "test phase", tweak it as you see fit main() { + # Build debug and release targets cross build --target $TARGET cross build --target $TARGET --release @@ -11,11 +11,13 @@ main() { return fi + # Run tests on debug and release targets. cross test --target $TARGET cross test --target $TARGET --release - cross run --target $TARGET - cross run --target $TARGET --release + # nix is a library -- no run target + # cross run --target $TARGET + # cross run --target $TARGET --release } # we don't run the "test phase" when doing deploys -- cgit v1.2.3 From 22c37c25f9ea479fe84e613d3059f1a4099af5fc Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Sun, 26 Feb 2017 15:48:49 +0000 Subject: Removed commented `cargo run` targets in CI --- ci/script.sh | 4 ---- 1 file changed, 4 deletions(-) (limited to 'ci/script.sh') diff --git a/ci/script.sh b/ci/script.sh index 260fb073..39c3aeec 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -14,10 +14,6 @@ main() { # Run tests on debug and release targets. cross test --target $TARGET cross test --target $TARGET --release - - # nix is a library -- no run target - # cross run --target $TARGET - # cross run --target $TARGET --release } # we don't run the "test phase" when doing deploys -- cgit v1.2.3