csrs/.travis.yml
2020-08-20 21:39:58 +07:00

67 lines
2.0 KiB
YAML

os:
- linux
language: rust
rust:
- stable
cache:
- apt
matrix:
include:
- env:
- NAME=csrs
- TARGET=arm-unknown-linux-gnueabihf
- LINKER=arm-linux-gnueabihf-gcc
- PACKAGE=$NAME-rpi2.tar.gz
addons:
apt:
packages: &1
- gcc-arm-linux-gnueabihf
- libc6-armhf-cross
- libc6-dev-armhf-cross
- env:
- NAME=csrs
- TARGET=armv7-unknown-linux-gnueabihf
- LINKER=arm-linux-gnueabihf-gcc
- PACKAGE=$NAME-rpi3.tar.gz
addons:
apt:
packages: *1
- env:
- NAME=csrs
- TARGET=i686-unknown-linux-gnu
- PACKAGE=$NAME-i686.tar.gz
addons:
apt:
packages:
- gcc-multilib
- env:
- NAME=csrs
- TARGET=x86_64-unknown-linux-gnu
- PACKAGE=$NAME-x86_64.tar.gz
install:
- export PATH="$PATH:$HOME/.cargo/bin"
- rustup target add $TARGET || true
- |
if [ -n "$LINKER" ]; then
mkdir -p ~/.cargo
echo >> ~/.cargo/config
echo "[target.$TARGET]" >> ~/.cargo/config
echo "linker = \"$LINKER\"" >> ~/.cargo/config
fi
script:
- |
if [ $TARGET = "x86_64-unknown-linux-gnu" ]; then
cargo test
fi
- cargo build --target $TARGET --verbose --release
before_deploy:
- tar -czf $PACKAGE -C target/$TARGET/release/ $NAME
deploy:
provider: releases
api_key:
secure: s+12tcnhr8MxZzawRXpIunuq1CPdlnSTjHiwHcrSinTVn2qJLVrbn0I8mXji2J7hW84MuGF8Y/yp7ikKjSF4nm8CQPBTZdWFy7b7wjRknGDr9gZwJFbelEjMBSVh4WAXYOywYR3yA4i2jsFpCLJ3xIa2LFIFBYlYajCNnKOqrNquDDJ1LwKc4wG0ZUSnVpElL15TyoFSJOuRRIyDLn9WDt3NiJlgv4cnXPSgCRMpftWQGtQbZBmU+wTl2+83jZ54LzIw1XrZ2k1dGdjdcGECQ1bsHnVHg0xce7EcslKeExI/kHqceH7V2YL116luuRZlsALZQw1Pj8A49ydKMZiXVLL1QVvM6+qBDuKobBlI0rhx2BJhO936K/6WuVGgrqLSrYOC3oWbRXEIIvc0IH9SFQw3N638eghnRNRORty+Hww3qVorzfvuoHkSjO1mLqSyf0dgZ3rdzm4MijxUZgORwBIENCXwNThwJ2v2fodIq+hk855ZzXQfRWPloriDFjiaDXgt8cHOWq5SF9rAK9hEpqoPS4WlmXVVcAVhC/TC4edjuN1GRIu5aImRm9yFgg573ABLhHitQxB/VutRdVh5beq2cAHYBSIvS2zDm0CwslIdmTIuD/QFhXI58bVgbrEt+Cm4lTzVFDmPDAi1CnKY8asOT5DB+DM6l61dcDC+d7o=
file: "${PACKAGE}"
skip_cleanup: true
on:
tags: true
repo: CUBETIQ/csrs