aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Greig <adam@adamgreig.com> 2020-04-03 12:36:15 +0100
committerGravatar Adam Greig <adam@adamgreig.com> 2020-04-04 18:46:43 +0100
commit107950df6d2e7e219c61a1694dfe9ccc9d3d2ddd (patch)
treefc47d398550919ac922188618f3b545fd2f0cbe5
parent3222d51668485401f365891745f4148f10400d2f (diff)
downloadcortex-m-107950df6d2e7e219c61a1694dfe9ccc9d3d2ddd.tar.gz
cortex-m-107950df6d2e7e219c61a1694dfe9ccc9d3d2ddd.tar.zst
cortex-m-107950df6d2e7e219c61a1694dfe9ccc9d3d2ddd.zip
Add testing linker=arm-none-eabi-gcc and MSRV to CI
-rw-r--r--cortex-m-rt/.travis.yml33
-rwxr-xr-xcortex-m-rt/ci/script.sh26
2 files changed, 47 insertions, 12 deletions
diff --git a/cortex-m-rt/.travis.yml b/cortex-m-rt/.travis.yml
index 9bb1fc2..2e4be47 100644
--- a/cortex-m-rt/.travis.yml
+++ b/cortex-m-rt/.travis.yml
@@ -4,53 +4,62 @@ matrix:
allow_failures:
- rust: nightly
include:
+ # MSRV 1.32.0 #############################################################
+ - env: TARGET=x86_64-unknown-linux-gnu
+ rust: 1.32.0
+
+ - env: TARGET=thumbv6m-none-eabi
+ rust: 1.32.0
+
+ - env: TARGET=thumbv7m-none-eabi
+ rust: 1.32.0
+
+ - env: TARGET=thumbv7em-none-eabi
+ rust: 1.32.0
+
+ - env: TARGET=thumbv7em-none-eabihf
+ rust: 1.32.0
+
+ - env: TARGET=thumbv8m.main-none-eabi
+ rust: 1.32.0
+
+ # Stable ##################################################################
- env: TARGET=x86_64-unknown-linux-gnu
rust: stable
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv6m-none-eabi
rust: stable
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv7m-none-eabi
rust: stable
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv7em-none-eabi
rust: stable
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv7em-none-eabihf
rust: stable
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv8m.main-none-eabi
rust: stable
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
+ # Nightly #################################################################
- env: TARGET=x86_64-unknown-linux-gnu
rust: nightly
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv6m-none-eabi
rust: nightly
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv7m-none-eabi
rust: nightly
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv7em-none-eabi
rust: nightly
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv7em-none-eabihf
rust: nightly
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
- env: TARGET=thumbv8m.main-none-eabi
rust: nightly
- if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
before_install: set -e
diff --git a/cortex-m-rt/ci/script.sh b/cortex-m-rt/ci/script.sh
index 69262f6..ee4cd2c 100755
--- a/cortex-m-rt/ci/script.sh
+++ b/cortex-m-rt/ci/script.sh
@@ -57,6 +57,28 @@ main() {
cargo rustc --target "$TARGET" --example device --features device --release -- \
-C linker=arm-none-eabi-ld
+ # linking with GNU GCC
+ for ex in "${examples[@]}"; do
+ cargo rustc --target "$TARGET" --example "$ex" -- \
+ -C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
+
+ cargo rustc --target "$TARGET" --example "$ex" --release -- \
+ -C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
+ done
+ for ex in "${fail_examples[@]}"; do
+ ! cargo rustc --target "$TARGET" --example "$ex" -- \
+ -C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
+
+ ! cargo rustc --target "$TARGET" --example "$ex" --release -- \
+ -C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
+ done
+
+ cargo rustc --target "$TARGET" --example device --features device -- \
+ -C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
+
+ cargo rustc --target "$TARGET" --example device --features device --release -- \
+ -C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
+
# linking with rustc's LLD
for ex in "${examples[@]}"; do
cargo rustc --target "$TARGET" --example "$ex"
@@ -77,6 +99,10 @@ main() {
env RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" cargo run --target "$TARGET" --example qemu | grep "x = 42"
env RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" cargo run --target "$TARGET" --example qemu --release | grep "x = 42"
+ # linking with GNU GCC
+ env RUSTFLAGS="-C linker=arm-none-eabi-gcc -C link-arg=-Tlink.x -Clink-arg=-nostartfiles" cargo run --target "$TARGET" --example qemu | grep "x = 42"
+ env RUSTFLAGS="-C linker=arm-none-eabi-gcc -C link-arg=-Tlink.x -Clink-arg=-nostartfiles" cargo run --target "$TARGET" --example qemu --release | grep "x = 42"
+
# linking with rustc's LLD
cargo run --target "$TARGET" --example qemu | grep "x = 42"
cargo run --target "$TARGET" --example qemu --release | grep "x = 42"