mirror of
https://github.com/sharkdp/bat
synced 2024-11-14 16:17:20 +00:00
77 lines
2.7 KiB
YAML
77 lines
2.7 KiB
YAML
language: rust
|
|
cache: cargo
|
|
matrix:
|
|
include:
|
|
# Stable channel.
|
|
- os: linux
|
|
rust: stable
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
|
- os: osx
|
|
rust: stable
|
|
env: TARGET=x86_64-apple-darwin
|
|
|
|
# Minimum Rust supported channel.
|
|
- os: linux
|
|
rust: 1.22.1
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
|
- os: osx
|
|
rust: 1.22.1
|
|
env: TARGET=x86_64-apple-darwin
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
# needed for i686-unknown-linux-gnu target
|
|
- gcc-multilib
|
|
# 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=bat
|
|
|
|
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: "GZL8nYk+/MZGEqejpP0UMMGVmwUEdxiF9CflFIGccu+/tznDyHnHOpyJmbH3M5IKWIxa7xFgqOE8pHuD4oQXt4mzyJGB0KMKKEFLW7ckbTYKya5bw0heKznaqGnS0Yz+vpfqYR25eiPFYCz7mDsGsCzH5QZqt3cdn9MDQGu1D0IaxPjuBNH3T9kBblR0ifBd3Diy0JYhiVcMSI3V1rkel18F1yBHO2GQ95hkWxVgjANQnefq5+zdzbx4ki539ewYENShA8N0w6ULJVY9LmWRWJIp90ggOD3JCH6Nz/fBpYBqwfABO6Dr7Csw7IRm7pM4IVkFZS1taiDYFX9thxZh3UTmI4YYtSTPxH9NGV47kxPipbf4vAXFwW+1VcHKMpBzz+5IVsHnk1Pfx9/GZsXbqXM3PUWCStec36Xtqh5vQapDKEg9khkEs4b1X7/E73gvpRuQl9gbnyufSVWgDsXIWqM+0aDbqQz1FpLmVxz6eij0cB9vR+8kbNoe/CEPHPO9ZllvAHseukOeHPzSBd8rILORXaaGmQausXz2wWgSsffUSYz4705P8joI0zFCfmkHjL+kA1ZUx5SxLCc1ID7CFFZChhAxHoPL7xc21snswwr8QeheERdwvuzKNaerBGZEw8dmMMx98YkjftIj65DDySr2mRZuufBQeQpmMhFyIT4="
|
|
# 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
|