Skip to content

Commit 107950d

Browse files
committed
Add testing linker=arm-none-eabi-gcc and MSRV to CI
1 parent 3222d51 commit 107950d

File tree

2 files changed

+47
-12
lines changed

2 files changed

+47
-12
lines changed

cortex-m-rt/.travis.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,62 @@ matrix:
44
allow_failures:
55
- rust: nightly
66
include:
7+
# MSRV 1.32.0 #############################################################
8+
- env: TARGET=x86_64-unknown-linux-gnu
9+
rust: 1.32.0
10+
11+
- env: TARGET=thumbv6m-none-eabi
12+
rust: 1.32.0
13+
14+
- env: TARGET=thumbv7m-none-eabi
15+
rust: 1.32.0
16+
17+
- env: TARGET=thumbv7em-none-eabi
18+
rust: 1.32.0
19+
20+
- env: TARGET=thumbv7em-none-eabihf
21+
rust: 1.32.0
22+
23+
- env: TARGET=thumbv8m.main-none-eabi
24+
rust: 1.32.0
25+
26+
# Stable ##################################################################
727
- env: TARGET=x86_64-unknown-linux-gnu
828
rust: stable
9-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
1029

1130
- env: TARGET=thumbv6m-none-eabi
1231
rust: stable
13-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
1432

1533
- env: TARGET=thumbv7m-none-eabi
1634
rust: stable
17-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
1835

1936
- env: TARGET=thumbv7em-none-eabi
2037
rust: stable
21-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
2238

2339
- env: TARGET=thumbv7em-none-eabihf
2440
rust: stable
25-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
2641

2742
- env: TARGET=thumbv8m.main-none-eabi
2843
rust: stable
29-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
3044

45+
# Nightly #################################################################
3146
- env: TARGET=x86_64-unknown-linux-gnu
3247
rust: nightly
33-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
3448

3549
- env: TARGET=thumbv6m-none-eabi
3650
rust: nightly
37-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
3851

3952
- env: TARGET=thumbv7m-none-eabi
4053
rust: nightly
41-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
4254

4355
- env: TARGET=thumbv7em-none-eabi
4456
rust: nightly
45-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
4657

4758
- env: TARGET=thumbv7em-none-eabihf
4859
rust: nightly
49-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
5060

5161
- env: TARGET=thumbv8m.main-none-eabi
5262
rust: nightly
53-
if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master)
5463

5564
before_install: set -e
5665

cortex-m-rt/ci/script.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,28 @@ main() {
5757
cargo rustc --target "$TARGET" --example device --features device --release -- \
5858
-C linker=arm-none-eabi-ld
5959

60+
# linking with GNU GCC
61+
for ex in "${examples[@]}"; do
62+
cargo rustc --target "$TARGET" --example "$ex" -- \
63+
-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
64+
65+
cargo rustc --target "$TARGET" --example "$ex" --release -- \
66+
-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
67+
done
68+
for ex in "${fail_examples[@]}"; do
69+
! cargo rustc --target "$TARGET" --example "$ex" -- \
70+
-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
71+
72+
! cargo rustc --target "$TARGET" --example "$ex" --release -- \
73+
-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
74+
done
75+
76+
cargo rustc --target "$TARGET" --example device --features device -- \
77+
-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
78+
79+
cargo rustc --target "$TARGET" --example device --features device --release -- \
80+
-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles
81+
6082
# linking with rustc's LLD
6183
for ex in "${examples[@]}"; do
6284
cargo rustc --target "$TARGET" --example "$ex"
@@ -77,6 +99,10 @@ main() {
7799
env RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" cargo run --target "$TARGET" --example qemu | grep "x = 42"
78100
env RUSTFLAGS="-C linker=arm-none-eabi-ld -C link-arg=-Tlink.x" cargo run --target "$TARGET" --example qemu --release | grep "x = 42"
79101

102+
# linking with GNU GCC
103+
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"
104+
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"
105+
80106
# linking with rustc's LLD
81107
cargo run --target "$TARGET" --example qemu | grep "x = 42"
82108
cargo run --target "$TARGET" --example qemu --release | grep "x = 42"

0 commit comments

Comments
 (0)