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
# - encrypt it using: `travis encrypt API_KEY_HERE`
# - paste the output below
api_key:
secure: YLFnIMgd75NEL57rEz1Q44EJF62cS56INpflBsh6qC02YbLsSZj46ZfjHIY8MQKFaJZ4UOfZDU6Ae5Z84mVEgniGN5pzMCkNm792ht4e8vZseO+lrwYM4w6xvVoZ4P8uB9SmkidMKUxgpdRPYh9S+m6xEsYVSXqlgiNwAgZ/e/sxvZvg1Y+EQtOLZQ+Egmbj8AAFO8HxFO/QaP1dcgc/FFZVqlsjbqUr17aP1Y98tjjXlDB9ik7SDfv5fIVxplINTCokEtRHeL0Zz0xB8oQtcugC0lH9SQYe7h3ap42m9UqzaamWanZ5XDP7sVjDhAiPCFwK9rIGyWzeBqNQfeJ1R6UtkE8B74M5HfXuxCXjAsTGoK0E6vbU71pUY/tMJxMVxIutrHbWsOFh7Gpa/3f6823LW6blDUBHGH8MkKgL+oYpStO0Qq32RzOPcLgboa1WpFWQ8DcOIRzLDTdOVL3b6Wb/8SAHe/IIKFgjZvz2DTnacL/1NJeTtyc+Dz0H/zXbnxf+fAMmMs+tyxzaTFA/fzvODNtMKekZsvUr2eYdwnz2YtvsCzn62Oe51foPrBu5SJzxcPmwq0Xz417F4czT7gpPXaTbgJZ0Mmpz+PEXta7EOukQ1NPjMsYMfE05t3rSDQunthj6OZV31NBAoKHF29JvwjTjG/5e9lfY5oFWuew=
# 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