Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ env:
- CRATE_NAME=minrs

# default job
- TARGET=x86_64-unknown-linux-gnu
- TARGET_DEFAULT_LINUX=x86_64-unknown-linux-gnu
- TARGET_DEFAULT_OSX=x86_64-apple-darwin
- TARGET="$TARGET_DEFAULT_LINUX"

matrix:
# TODO These are all the build jobs. Adjust as necessary. Comment out what you
Expand All @@ -25,13 +27,13 @@ matrix:
# Linux
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=i686-unknown-linux-musl
# - env: TARGET=x86_64-unknown-linux-gnu # this is the default job
# - env: TARGET="$TARGET_DEFAULT_LINUX"
- env: TARGET=x86_64-unknown-linux-musl

# OSX
- env: TARGET=i686-apple-darwin
os: osx
- env: TARGET=x86_64-apple-darwin
- env: TARGET="$TARGET_DEFAULT_OSX"
os: osx

# *BSD
Expand All @@ -52,18 +54,31 @@ matrix:
- env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1

# Testing other channels
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET="$TARGET_DEFAULT_LINUX"
rust: nightly
- env: TARGET=x86_64-apple-darwin
- env: TARGET="$TARGET_DEFAULT_OSX"
os: osx
rust: nightly
- env: TARGET=i686-apple-darwin
os: osx
rust: nightly
- env: TARGET=aarch64-apple-ios
os: osx
rust: nightly
- env: TARGET=arm-linux-androideabi
rust: nightly
- env: TARGET=wasm32-unknown-emscripten
rust: nightly
- env: TARGET=asmjs-unknown-emscripten
rust: nightly

allow_failures:
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
- env: TARGET=i686-apple-darwin
- env: TARGET=aarch64-apple-ios
- env: TARGET=arm-linux-androideabi
- env: TARGET=wasm32-unknown-emscripten
- env: TARGET=asmjs-unknown-emscripten

install:
- set -e
Expand Down
21 changes: 16 additions & 5 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,30 @@ main() {

local target=
if [ $TRAVIS_OS_NAME = linux ]; then
target=x86_64-unknown-linux-gnu
target=$TARGET_DEFAULT_LINUX
else
target=x86_64-apple-darwin
target=$TARGET_DEFAULT_OSX
fi

# TODO At some point you'll probably want to use a newer release of `cross`,
# simply change the argument to `--tag`.
local tag="$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross | cut -d/ -f3 | tail -n1)"
echo cross version: $tag
curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- \
--force \
--git japaric/cross \
--tag v0.1.4 \
--tag $tag \
--target $target

echo $TARGET
echo $TARGET_DEFAULT_LINUX
echo $TARGET_DEFAULT_OSX
export PATH="$HOME/.cargo/bin:$PATH"
which rustup || true
whereis rustup || true
rustup --version || true
if [ $TARGET = $TARGET_DEFAULT ] || [ $TARGET = ]; then
rustup target add $TARGET
fi
}

main