Skip to content

Commit

Permalink
Merge pull request #89 from Susurrus/moar_support
Browse files Browse the repository at this point in the history
Support more cross targets
  • Loading branch information
japaric authored Nov 4, 2017
2 parents 16e199c + 6df66ab commit 0e201d8
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 11 deletions.
51 changes: 40 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,39 @@ 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
- 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

Expand All @@ -35,17 +65,16 @@ 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
# 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
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -130,6 +156,8 @@ would

- `aarch64-unknown-linux-gnu`

- `arm-unknown-linux-gnueabi`

- `armv7-unknown-linux-gnueabihf`

- `mips-unknown-linux-gnu`
Expand Down
20 changes: 20 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 0e201d8

Please sign in to comment.