Skip to content

Commit

Permalink
Support all cross-supported targets.
Browse files Browse the repository at this point in the history
Adds Android, iOS, Linux/ARM, Linux/ARM/musl, and Windows. Bare-metal
thumb targets are listed, because they are supported by cross, but they
aren't enabled by default as they don't support std and will likely not
but used by most projects.

Because of a bug in musl on the `*-musleabi*` targets, the hello.c test
case has been reduced to use unistd and write() instead of printf().
  • Loading branch information
Susurrus committed Jun 30, 2017
1 parent 44cd52d commit 02bb838
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,30 @@ matrix:
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
# don't need
include:
# Android
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
- env: TARGET=arm-linux-androideabi DISABLE_TESTS=1
- env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
- env: TARGET=i686-linux-android DISABLE_TESTS=1

# iOS
- env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=armv7-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=i386-apple-ios DISABLE_TESTS=1
os: osx
- env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
os: osx

# Linux
- env: TARGET=aarch64-unknown-linux-gnu
- env: TARGET=arm-unknown-linux-gnueabi
- env: TARGET=arm-unknown-linux-musleabi
- env: TARGET=armv7-unknown-linux-gnueabihf
- env: TARGET=armv7-unknown-linux-musleabihf
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=i686-unknown-linux-musl
- env: TARGET=mips-unknown-linux-gnu
Expand All @@ -45,6 +66,16 @@ matrix:
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1

# Windows
- env: TARGET=x86_64-pc-windows-gnu

# Bare metal
# These targets don't support std and as such are likely not suitable for
# most crates.
# - env: TARGET=thumbv6m-none-eabi
# - env: TARGET=thumbv7em-none-eabi
# - env: TARGET=thumbv7em-none-eabihf
# - env: TARGET=thumbv7m-none-eabi

# Testing other channels
- env: TARGET=x86_64-unknown-linux-gnu
Expand Down
4 changes: 2 additions & 2 deletions hello.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include <unistd.h>

void hello() {
printf("Hello, world!\n");
write(0, "Hello, world!\n", 14);
}

0 comments on commit 02bb838

Please # to comment.