From 44cd52dacb610094dd4de26d3dfaa027f1d0c0b1 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Tue, 18 Apr 2017 09:26:25 -0700 Subject: [PATCH 1/2] Consolidate Linux targets --- .travis.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index f10e730..680947e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,8 +19,18 @@ matrix: # don't need include: # Linux + - env: TARGET=aarch64-unknown-linux-gnu + - env: TARGET=armv7-unknown-linux-gnueabihf - env: TARGET=i686-unknown-linux-gnu - env: TARGET=i686-unknown-linux-musl + - env: TARGET=mips-unknown-linux-gnu + - env: TARGET=mips64-unknown-linux-gnuabi64 + - env: TARGET=mips64el-unknown-linux-gnuabi64 + - env: TARGET=mipsel-unknown-linux-gnu + - env: TARGET=powerpc-unknown-linux-gnu + - env: TARGET=powerpc64-unknown-linux-gnu + - env: TARGET=powerpc64le-unknown-linux-gnu + - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1 - env: TARGET=x86_64-unknown-linux-gnu - env: TARGET=x86_64-unknown-linux-musl @@ -35,17 +45,6 @@ matrix: - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 - # Other architectures - - env: TARGET=aarch64-unknown-linux-gnu - - env: TARGET=armv7-unknown-linux-gnueabihf - - env: TARGET=mips-unknown-linux-gnu - - env: TARGET=mips64-unknown-linux-gnuabi64 - - env: TARGET=mips64el-unknown-linux-gnuabi64 - - env: TARGET=mipsel-unknown-linux-gnu - - env: TARGET=powerpc-unknown-linux-gnu - - env: TARGET=powerpc64-unknown-linux-gnu - - env: TARGET=powerpc64le-unknown-linux-gnu - - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1 # Testing other channels - env: TARGET=x86_64-unknown-linux-gnu From 4a9bbf7e59bafe27fdb96f57bc14ca56fee71549 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Tue, 18 Apr 2017 09:27:11 -0700 Subject: [PATCH 2/2] Support all cross-supported targets. Adds Android, iOS, Linux/ARM, 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. I've left off the *linux-musleabi* targets as they are failing with an odd error that is likely due to musl itself. --- .travis.yml | 30 ++++++++++++++++++++++++++++++ README.md | 28 ++++++++++++++++++++++++++++ ci/install.sh | 20 ++++++++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/.travis.yml b/.travis.yml index 680947e..b0a401f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,8 +18,28 @@ 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 + - env: TARGET=x86_64-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=armv7-unknown-linux-gnueabihf - env: TARGET=i686-unknown-linux-gnu - env: TARGET=i686-unknown-linux-musl @@ -45,6 +65,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 diff --git a/README.md b/README.md index aa1bd68..8528f0c 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,32 @@ check if using a newer release (see `ci/install.sh`) would [fix your problem](https://github.com/japaric/cross/blob/master/CHANGELOG.md). +### Android + +- aarch64-linux-android + +- arm-linux-androideabi + +- armv7-linux-androideabi + +- i686-linux-android + +- x86_64-linux-android + +### iOS + +- aarch64-apple-ios + +- armv7-apple-ios + +- armv7s-apple-ios + +- i386-apple-ios + +- x86_64-apple-ios + +### Linux + - `i686-unknown-linux-gnu` - `i686-unknown-linux-musl` @@ -130,6 +156,8 @@ would - `aarch64-unknown-linux-gnu` +- `arm-unknown-linux-gnueabi` + - `armv7-unknown-linux-gnueabihf` - `mips-unknown-linux-gnu` diff --git a/ci/install.sh b/ci/install.sh index 748ad9a..80e18e4 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -10,6 +10,26 @@ main() { sort=gsort # for `sort --sort-version`, from brew's coreutils. fi + # Builds for iOS are done on OSX, but require the specific target to be + # installed. + case $TARGET in + aarch64-apple-ios) + rustup target install aarch64-apple-ios + ;; + armv7-apple-ios) + rustup target install armv7-apple-ios + ;; + armv7s-apple-ios) + rustup target install armv7s-apple-ios + ;; + i386-apple-ios) + rustup target install i386-apple-ios + ;; + x86_64-apple-ios) + rustup target install x86_64-apple-ios + ;; + esac + # This fetches latest stable release local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \ | cut -d/ -f3 \