diff options
Diffstat (limited to 'cortex-m-rt/ci')
-rw-r--r-- | cortex-m-rt/ci/install.sh | 9 | ||||
-rw-r--r-- | cortex-m-rt/ci/script.sh | 34 |
2 files changed, 43 insertions, 0 deletions
diff --git a/cortex-m-rt/ci/install.sh b/cortex-m-rt/ci/install.sh new file mode 100644 index 0000000..3c41921 --- /dev/null +++ b/cortex-m-rt/ci/install.sh @@ -0,0 +1,9 @@ +set -euxo pipefail + +main() { + if [ $TARGET != x86_64-unknown-linux-gnu ]; then + rustup target add $TARGET + fi +} + +main diff --git a/cortex-m-rt/ci/script.sh b/cortex-m-rt/ci/script.sh new file mode 100644 index 0000000..221386d --- /dev/null +++ b/cortex-m-rt/ci/script.sh @@ -0,0 +1,34 @@ +set -euxo pipefail + +main() { + cargo check --target $TARGET + + cargo check --target $TARGET --features device + + local examples=( + minimal + main + state + ) + if [ $TRAVIS_RUST_VERSION = nightly ]; then + for ex in "${examples[@]}"; do + cargo rustc --target $TARGET --example $ex -- \ + -C link-arg=-nostartfiles \ + -C link-arg=-Wl,-Tlink.x + + cargo rustc --target $TARGET --example $ex --release -- \ + -C link-arg=-nostartfiles \ + -C link-arg=-Wl,-Tlink.x + done + + cargo rustc --target $TARGET --example device --features device -- \ + -C link-arg=-nostartfiles \ + -C link-arg=-Wl,-Tlink.x + + cargo rustc --target $TARGET --example device --features device --release -- \ + -C link-arg=-nostartfiles \ + -C link-arg=-Wl,-Tlink.x + fi +} + +main |