language: rust cache: cargo matrix: include: # Stable channel. - os: linux rust: stable env: TARGET=x86_64-unknown-linux-gnu - os: linux rust: stable env: TARGET=x86_64-unknown-linux-musl - os: osx rust: stable env: TARGET=x86_64-apple-darwin # Minimum Rust supported channel. - os: linux rust: 1.29.0 env: TARGET=x86_64-unknown-linux-gnu addons: apt: packages: # needed to build deb packages - fakeroot env: global: # Default target on travis-ci. # Used as conditional check in the install stage - HOST=x86_64-unknown-linux-gnu # Used on the deployment script - PROJECT_NAME=diskus 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 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: "eibfoNCoqJEXfOpaCrQHMPSpmmThPitZB0nTWp0B8F5n29XmiMVpRDFz6LkbWt9xosyhlDK0coes+lJ/b4JIV7JVOJ3jhXNynhElVp0nHvhSN3CCzBk65nJjRPCsmyVjKn/Nj7fIwQJJrCxiAOdq+0DZPpl+Ix5GArXYJ3CLxLE/gwnHOkTqgrG612YmQQP68Cu9MsasRJt9SPxxGUsnNdPyfezxTQwu0BwWHzL/J3fa/e2HWFuFx6tD69fqF6k3Yt3i2fXasX1wDGvKLz36ttjsgqGYTAHf5nUFkz4l0O/bSRcrsqxxRjS1UGGa2PFvpPQE6OiV9szJSPEd2wP9OedbcTKybmmYpOHXJV4KpoLsY88aBtuLfMHkE6TfK67Otvp1lw59XHXHB4W3L1fEgB1TP3LW3AjAXlP9buE/a0pxrc85Z9oHasD3s4SgH5mMiaAXwZEiR5GWM1TWc3+hPOQH4K/TCZfM5qkFLcDMBtxfkanx6Yts4EKojA6T0O8Gh27AAYW/0mEdOjNnoOY6A8jengluZBrAxdW+hekgVMMHXFtXG2JohAQpEgYYKX1TOybslipeMzXDysdmouxjRK3Bi4ccjVDkSjfg020x8JVQCg7UQBfu6V2m/8Y0dfmczVmDOJkcwFnPaK/OQ9uub/bwLaa41G0Fjcxc+/FVb8c=" # 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.* - $PROJECT_NAME*.deb # 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 != "" notifications: email: on_success: never