lsd/.travis.yml

123 lines
3.6 KiB
YAML
Raw Normal View History

2018-11-26 12:19:40 +00:00
language: rust
2018-12-05 10:30:05 +00:00
cache: cargo
2018-12-06 20:48:21 +00:00
sudo: required
2018-12-05 10:30:05 +00:00
2018-11-26 12:19:40 +00:00
matrix:
allow_failures:
include:
# Stable channel.
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: stable
env: TARGET=i686-unknown-linux-gnu
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
# Beta channel.
- os: linux
rust: beta
env: TARGET=x86_64-unknown-linux-gnu
# Disabled to reduce total CI time
# - os: linux
# rust: beta
# env: TARGET=i686-unknown-linux-gnu
# - os: osx
# rust: beta
# env: TARGET=x86_64-apple-darwin
# Nightly channel.
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-gnu
# Disabled to reduce total CI time
# - os: linux
# rust: nightly
# env: TARGET=i686-unknown-linux-gnu
# - os: osx
# rust: nightly
# env: TARGET=x86_64-apple-darwin
# Minimum Rust supported channel.
- os: linux
rust: 1.30.1
env: TARGET=x86_64-unknown-linux-gnu
- os: linux
rust: 1.30.1
env: TARGET=i686-unknown-linux-gnu
- os: osx
rust: 1.30.1
env: TARGET=x86_64-apple-darwin
# Code formatting check
- os: linux
rust: stable
# skip the global install step
install:
- rustup component add clippy-preview
script:
- cargo clippy
addons:
apt:
packages:
# needed for i686-unknown-linux-gnu target
- gcc-multilib
2018-12-06 20:48:21 +00:00
- 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=lsd
install:
# prevent target re-add error from rustup
- if [[ $TRAVIS_OS_NAME = linux && $HOST != $TARGET ]]; then rustup target add $TARGET; fi
2018-12-05 10:30:05 +00:00
script:
# Incorporate TARGET env var to the build and test process
- cargo build --target $TARGET --verbose
- cargo test --target $TARGET --verbose
before_deploy:
- bash deploy/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
2018-12-06 22:18:05 +00:00
# - encrypt it using: `travis encrypt --org API_KEY_HERE`
# - paste the output below
api_key:
2018-12-06 22:21:25 +00:00
secure: "UwCwgVFYe5jALDxZL9d9VQFnCV/1BTpGwwWXS5fOC17OkGD277RIhgMChzJXmHALBJ7o2Jm7ZUxYViEp3/Mk8NlzvMi7sM3wkGaAF0/aAiqsYcxbSyP74j8htjaEDOO99JR9Wp3l74Y52daO4eqlSy3+ZeXIoPVSI9JJlNC1Mhs6bcUvzwCTaCUIU3wc1y9ST4RJizKkSBbtE+OH9CERYZoa1vmDvfAE9BidTu1Fx4kQo0TMpBeFA7+/KAk9BORvGE/97CJ8SdT53oNBozcYluv61pDRcn+Ek6AR7Kh3Z/HJvP6ZWquMygh1G7bVcYZPrSqqB3nTN8t08UZhWMw7QIzqZXd9YuK2WRKVLJaLfbHjm+tkmnaDZpi1OJMMevvdGPuSRTk2rJ/40dAG10sVWd4Ryq9ysLXfsQ2rpqCQdewnrutj9e2X3obO1YDCJzNiONKq+RNiibKWcMf0Rn0B/jFPDdZmPlkJ4M+CVl4mR3vaDMBlPzQkvXmtkWvqkdPn9xrr0CiuItZqEuHcFKtt1mo7MPsgz8FiZ3SzeQ0lYwW5XCsNCEiPWy9l1S/YFNTzpvSyyN3Wtliem5qoCmYVMi3c0mzLGVgTGnO6M1AGme4vD0dptnbov27utWd6sp8PCrxIG4itQxnbTsEYoDQ3EYUBQZX/I3EC0E9fFsmOhzA="
# 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
2018-12-06 22:03:38 +00:00
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 != ""
repo: Peltoche/lsd
notifications:
email:
on_success: never