2017-05-12 13:41:26 +02:00
|
|
|
language: rust
|
2017-10-11 19:11:19 +02:00
|
|
|
cache: cargo
|
2017-06-05 11:51:05 +02:00
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- rust: nightly
|
2017-06-12 22:05:34 +02:00
|
|
|
include:
|
2017-10-11 19:11:19 +02:00
|
|
|
# Stable channel.
|
|
|
|
- os: linux
|
|
|
|
rust: stable
|
2017-10-19 06:47:35 +02:00
|
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
- os: linux
|
|
|
|
rust: stable
|
|
|
|
env: TARGET=x86_64-unknown-linux-musl
|
|
|
|
- os: linux
|
|
|
|
rust: stable
|
|
|
|
env: TARGET=i686-unknown-linux-gnu
|
|
|
|
- os: linux
|
|
|
|
rust: stable
|
|
|
|
env: TARGET=i686-unknown-linux-musl
|
|
|
|
- os: osx
|
|
|
|
rust: stable
|
|
|
|
env: TARGET=x86_64-apple-darwin
|
|
|
|
|
2017-10-11 19:11:19 +02:00
|
|
|
# Beta channel.
|
|
|
|
- os: linux
|
|
|
|
rust: beta
|
2017-10-19 06:47:35 +02:00
|
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
2017-10-20 08:41:53 +02:00
|
|
|
# Disabled to reduce total CI time
|
|
|
|
# - os: linux
|
|
|
|
# rust: beta
|
|
|
|
# env: TARGET=x86_64-unknown-linux-musl
|
|
|
|
# - os: linux
|
|
|
|
# rust: beta
|
|
|
|
# env: TARGET=i686-unknown-linux-gnu
|
|
|
|
# - os: linux
|
|
|
|
# rust: beta
|
|
|
|
# env: TARGET=i686-unknown-linux-musl
|
|
|
|
# - os: osx
|
|
|
|
# rust: beta
|
|
|
|
# env: TARGET=x86_64-apple-darwin
|
2017-10-19 06:47:35 +02:00
|
|
|
|
2017-06-12 22:05:34 +02:00
|
|
|
# Nightly channel.
|
2017-10-11 19:11:19 +02:00
|
|
|
- os: linux
|
|
|
|
rust: nightly
|
2017-10-19 06:47:35 +02:00
|
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
2017-10-20 08:41:53 +02:00
|
|
|
# Disabled to reduce total CI time
|
|
|
|
# - os: linux
|
|
|
|
# rust: nightly
|
|
|
|
# env: TARGET=x86_64-unknown-linux-musl
|
|
|
|
# - os: linux
|
|
|
|
# rust: nightly
|
|
|
|
# env: TARGET=i686-unknown-linux-gnu
|
|
|
|
# - os: linux
|
|
|
|
# rust: nightly
|
|
|
|
# env: TARGET=i686-unknown-linux-musl
|
|
|
|
# - os: osx
|
|
|
|
# rust: nightly
|
|
|
|
# env: TARGET=x86_64-apple-darwin
|
2017-10-19 06:47:35 +02:00
|
|
|
|
2017-06-12 22:05:34 +02:00
|
|
|
# Minimum Rust supported channel.
|
|
|
|
- os: linux
|
2017-10-14 19:14:18 +02:00
|
|
|
rust: 1.19.0
|
2017-06-12 22:05:34 +02:00
|
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
- os: linux
|
2017-10-14 19:14:18 +02:00
|
|
|
rust: 1.19.0
|
2017-06-12 22:05:34 +02:00
|
|
|
env: TARGET=x86_64-unknown-linux-musl
|
2017-10-19 06:47:35 +02:00
|
|
|
- os: linux
|
|
|
|
rust: 1.19.0
|
|
|
|
env: TARGET=i686-unknown-linux-gnu
|
|
|
|
- os: linux
|
|
|
|
rust: 1.19.0
|
|
|
|
env: TARGET=i686-unknown-linux-musl
|
2017-10-07 21:30:57 +02:00
|
|
|
- os: osx
|
2017-10-14 19:14:18 +02:00
|
|
|
rust: 1.19.0
|
2017-10-07 21:30:57 +02:00
|
|
|
env: TARGET=x86_64-apple-darwin
|
2017-06-12 22:05:34 +02:00
|
|
|
|
2017-10-19 06:47:35 +02:00
|
|
|
# Code formatting check
|
|
|
|
- os: linux
|
|
|
|
rust: stable
|
|
|
|
# skip the global install step
|
2017-10-21 05:21:56 +02:00
|
|
|
install:
|
|
|
|
- which cargo-install-update || cargo install cargo-update
|
|
|
|
- cargo install-update rustfmt
|
2017-10-19 06:47:35 +02:00
|
|
|
script: cargo fmt -- --write-mode=diff
|
|
|
|
- os: linux
|
|
|
|
rust: nightly
|
|
|
|
# skip the global install step
|
2017-10-21 05:21:56 +02:00
|
|
|
install:
|
|
|
|
- which cargo-install-update || cargo install cargo-update
|
|
|
|
- cargo install-update rustfmt-nightly
|
2017-10-19 06:47:35 +02:00
|
|
|
script: cargo fmt -- --write-mode=diff
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
# needed for i686-unknown-linux-gnu target
|
|
|
|
- gcc-multilib
|
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
# Default target on travis-ci.
|
|
|
|
# Used as conditional check in the install stage
|
|
|
|
- HOST=x86_64-unknown-linux-gnu
|
2017-10-23 07:41:28 +02:00
|
|
|
# Used on the deployment script
|
|
|
|
- PROJECT_NAME=fd
|
2017-10-19 06:47:35 +02:00
|
|
|
|
|
|
|
install:
|
|
|
|
# prevent target re-add error from rustup
|
|
|
|
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
|
|
|
|
|
|
|
|
script:
|
|
|
|
# Incorporate TARGET env var to the build and test process
|
|
|
|
- cargo build --target $TARGET --verbose
|
|
|
|
- cargo test --target $TARGET --verbose
|
|
|
|
|
2017-10-23 07:41:28 +02:00
|
|
|
before_deploy:
|
|
|
|
- bash ci/before_deploy.bash
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
# NOTE updating the `api_key.secure`
|
|
|
|
# - go to: https://github.com/settings/tokens/new
|
|
|
|
# - generate new token using `public_repo` scope
|
|
|
|
# - encrypt it using: `travis encrypt API_KEY_HERE`
|
|
|
|
# - paste the output below
|
|
|
|
api_key:
|
|
|
|
secure: "KG1FCRt4ZbKM1LatEje3cI6hsADBaHhwibcahvHbYiZI0Pvj7Wnz4+rMt4su1F7XKe06BewUqAcW+6QqhXDvDvK1PaRgjAIysVxaUhyM/BncbK1MPK/pUnB1Bhk420vmuI/A/ikunqNg0mn2ZFWyD6K1SGakMRmvHncCgeHIKFpgpsnS9g9z+q6zPj02HvkrujlnqBlCcgQIHbHlnTIk0H++skE09exUNACj63TSGdru4j01m7GQqZikRE6u7oYfESpZl68v1BS0SDgj8YVmkvJ6G441YvPFsluh+lrF3W4ruArQH8Eew1V4IRtmWFSqKwnQSiMSTlRfcLmb3VI7n22vOpDb2UK7NGamkeDTk89hSxvMM5fVtZGHSaziRPgRixAoJ2hmOxuwh0hXMGcQ+cSWuXS2yCLXGw2lp7yh4Dys2MlDJyC3dgJKIErUQWGPjNqPjMqRf2rctrLZgUCec35DCqlnPE0MBFvzkt2fputiVFyeqYf8h1froafb5xx5UGDvFpBFpAwU8QiaQa79CPEGMFj/QL3boWuCQBd9obUgjke4PFnXHQOC8J4YBzGoIJPcfxNuRWpK43uASMZpLjZvS+FZg2xDw/7K6HB/f/Bmql1VT8Hcj2cLfu5RlfLSk2HBtNr1tM+YOGxMGYtWsgRoDyFt0UIkvAHIl42nfb0="
|
|
|
|
# for uploading multiple files
|
|
|
|
file_glob: true
|
|
|
|
# NOTE explanation on each env variable
|
|
|
|
# - PROJECT_NAME: name of the project, set on the `env.global` above
|
|
|
|
# - TRAVIS_TAG: tag name that the build is being deployed for, usually the version number
|
|
|
|
# - TARGET: target triple of the build
|
|
|
|
file: $PROJECT_NAME-$TRAVIS_TAG-$TARGET.*
|
|
|
|
# don't delete artifacts from previous stage
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
# deploy only if we push a tag
|
|
|
|
tags: true
|
|
|
|
# deploy only on stable channel that has TARGET env variable sets
|
|
|
|
condition: $TRAVIS_RUST_VERSION = stable && $TARGET != ""
|
|
|
|
|
2017-06-12 22:05:34 +02:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|