From c8df71adf0407050b2b0fd358c22fae6e2dc9ebf Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 15 Feb 2019 20:16:45 +0100 Subject: ci: test the nightly feature --- ci/script.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'ci') diff --git a/ci/script.sh b/ci/script.sh index 4b9cd22..9bba8b3 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -33,6 +33,11 @@ arm_example() { main() { local T=$TARGET + local nightly="" + + if [ $TRAVIS_RUST_VERSION = nightly ]; then + nightly="nightly" + fi mkdir -p ci/builds @@ -41,12 +46,12 @@ main() { case $TRAVIS_RUST_VERSION in nightly*) # TODO how to run a subset of these tests when timer-queue is disabled? - cargo test --features timer-queue --test compiletest --target $T + cargo test --features "$nightly,timer-queue" --test compiletest --target $T esac cargo check --target $T if [ $TARGET != thumbv6m-none-eabi ]; then - cargo check --features timer-queue --target $T + cargo check --features "$nightly,timer-queue" --target $T fi if [ $TRAVIS_RUST_VERSION != nightly ]; then @@ -76,9 +81,9 @@ main() { return fi - cargo check --target $T --examples + cargo check --features "$nightly" --target $T --examples if [ $TARGET != thumbv6m-none-eabi ]; then - cargo check --features timer-queue --target $T --examples + cargo check --features "$nightly,timer-queue" --target $T --examples fi # run-pass tests @@ -115,13 +120,13 @@ main() { fi if [ $ex != types ]; then - arm_example "run" $ex "debug" "" "1" - arm_example "run" $ex "release" "" "1" + arm_example "run" $ex "debug" "$nightly" "1" + arm_example "run" $ex "release" "$nightly" "1" fi if [ $TARGET != thumbv6m-none-eabi ]; then - arm_example "run" $ex "debug" "timer-queue" "1" - arm_example "run" $ex "release" "timer-queue" "1" + arm_example "run" $ex "debug" "$nightly,timer-queue" "1" + arm_example "run" $ex "release" "$nightly,timer-queue" "1" fi done @@ -139,16 +144,16 @@ main() { fi if [ $ex != types ]; then - arm_example "build" $ex "debug" "" "2" + arm_example "build" $ex "debug" "$nightly" "2" cmp ci/builds/${ex}_debug_1.hex ci/builds/${ex}_debug_2.hex - arm_example "build" $ex "release" "" "2" + arm_example "build" $ex "release" "$nightly" "2" cmp ci/builds/${ex}_release_1.hex ci/builds/${ex}_release_2.hex fi if [ $TARGET != thumbv6m-none-eabi ]; then - arm_example "build" $ex "debug" "timer-queue" "2" + arm_example "build" $ex "debug" "$nightly,timer-queue" "2" cmp ci/builds/${ex}_timer-queue_debug_1.hex ci/builds/${ex}_timer-queue_debug_2.hex - arm_example "build" $ex "release" "timer-queue" "2" + arm_example "build" $ex "release" "$nightly,timer-queue" "2" cmp ci/builds/${ex}_timer-queue_release_1.hex ci/builds/${ex}_timer-queue_release_2.hex fi done -- cgit v1.2.3 From fe70817653db4f53c3069fb733b73f06ddedfbcf Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 15 Feb 2019 20:37:06 +0100 Subject: ci: report the size of built examples --- ci/script.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ci') diff --git a/ci/script.sh b/ci/script.sh index 9bba8b3..93b4461 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -130,6 +130,7 @@ main() { fi done + local built=() cargo clean for ex in ${exs[@]}; do if [ $ex = ramfunc ] && [ $T = thumbv6m-none-eabi ]; then @@ -148,6 +149,8 @@ main() { cmp ci/builds/${ex}_debug_1.hex ci/builds/${ex}_debug_2.hex arm_example "build" $ex "release" "$nightly" "2" cmp ci/builds/${ex}_release_1.hex ci/builds/${ex}_release_2.hex + + built+=( $ex ) fi if [ $TARGET != thumbv6m-none-eabi ]; then @@ -157,6 +160,8 @@ main() { cmp ci/builds/${ex}_timer-queue_release_1.hex ci/builds/${ex}_timer-queue_release_2.hex fi done + + ( cd target/$TARGET/release/examples/ && size ${built[@]} ) esac } -- cgit v1.2.3 From c6f9b2c0aa62fa3ceed6ac58928af15d9e3a58a2 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 23 Feb 2019 20:35:54 +0100 Subject: fix ci --- ci/script.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ci') diff --git a/ci/script.sh b/ci/script.sh index 93b4461..5cc79fb 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -146,18 +146,22 @@ main() { if [ $ex != types ]; then arm_example "build" $ex "debug" "$nightly" "2" - cmp ci/builds/${ex}_debug_1.hex ci/builds/${ex}_debug_2.hex + cmp ci/builds/${ex}_${nightly/nightly/nightly_}debug_1.hex \ + ci/builds/${ex}_${nightly/nightly/nightly_}debug_2.hex arm_example "build" $ex "release" "$nightly" "2" - cmp ci/builds/${ex}_release_1.hex ci/builds/${ex}_release_2.hex + cmp ci/builds/${ex}_${nightly/nightly/nightly_}release_1.hex \ + ci/builds/${ex}_${nightly/nightly/nightly_}release_2.hex built+=( $ex ) fi if [ $TARGET != thumbv6m-none-eabi ]; then arm_example "build" $ex "debug" "$nightly,timer-queue" "2" - cmp ci/builds/${ex}_timer-queue_debug_1.hex ci/builds/${ex}_timer-queue_debug_2.hex + cmp ci/builds/${ex}_${nightly}_timer-queue_debug_1.hex \ + ci/builds/${ex}_${nightly}_timer-queue_debug_2.hex arm_example "build" $ex "release" "$nightly,timer-queue" "2" - cmp ci/builds/${ex}_timer-queue_release_1.hex ci/builds/${ex}_timer-queue_release_2.hex + cmp ci/builds/${ex}_${nightly}_timer-queue_release_1.hex \ + ci/builds/${ex}_${nightly}_timer-queue_release_2.hex fi done -- cgit v1.2.3