services:
- docker
language: rust
rust:
- stable
cache: cargo
# All Rust build architectures are defined here
matrix:
include:
- env: TARGET=x86_64-unknown-linux-gnu
os: linux
- env: TARGET=i686-apple-darwin
os: osx
osx_image: xcode10
- env: TARGET=x86_64-apple-darwin
os: osx
osx_image: xcode10
- env: TARGET=x86_64-pc-windows-msvc
os: windows
- env: TARGET=armv7-unknown-linux-gnueabihf
os: linux
addons:
apt:
packages:
- gcc-arm-linux-gnueabihf
install:
- export PATH="$PATH:$HOME/.cargo/bin"
- rustup target add $TARGET || true
# This is th script that will be run on each matrix element
script:
- |
if [ $TARGET = "x86_64-unknown-linux-gnu" ]; then
cargo test
fi
- |
if [ $TARGET = "x86_64-pc-windows-msvc" ]; then
cargo build --target $TARGET --verbose --release
elif [ $TARGET = "i686-apple-darwin" ]; then
cargo build --target $TARGET --verbose --release
elif [ $TARGET = "x86_64-apple-darwin" ]; then
cargo build --target $TARGET --verbose --release
else
cross build --target $TARGET --verbose --release
fi
before_deploy:
- mkdir -p target/executable
- cp target/release/rrss2imap target/executable/rrss2imap-${TARGET}
# Once the Rust packages are built, here they are deployed
deploy:
provider: releases
api_key:
secure: H+nkik3V7FtxBSRl5XeQe4Cw47sZO9cQKS0OL7IVaEVF7NM2SGUTW7t26O2C/FR35tdDkb7lQd0MFQTu2azPrHpFLbdFkQdvr7iBoHBtWb9T+WV0Xyv32H/1w6I1A0cp6VSH4UCWFjuV68OzXIbmRJgcQJ1TJPxNFY+2hddx8Z4RXIggqTnfImsplrVT7wB8xWotzyv8KD1kMa7XaoDQHXODEcQnBfc3dU7JcAP0wH/+2IG69mxEQQvDvfOY0yizCi3eqY4DiBcD8ECtySmrcgnt+l7KiPoTSKKbKn2s6qAnUjPvvRYIDyxtGEnSwPDmwUUbqqhZiUoC94Ic+d8zTJjti2qW63VX9FQn7PTbm3MawTY8PCh9aY4OlVgSbO31gvFNwlIABqKGlK7+9vt9Dc6L6thCVtGlorhockeMvq2u2iJBTB6VmobSplIk+O3YyWcvnKsnSPbSSxjDozS8MnX0qm26756X2yWmn79TYto8DIMK0XAZBzyO2NJRuFOoLw9MIT1TeWhIPASIhRA60Fl7fueUn8u3fodODoAEp6GYCiMufRxiwc7Lp8QQmpTis6uV0q0dQBD/1mpypLQsZQU247UT6CfPWOE7X6X12ai93+w1/NBjSttgW5IxET2fCZX5Qj10g4yQ2Zi7U7/bcIAAS2dmA6vAHj6MBNV/2zo=
file_glob: true
file: target/executable/*
skip_cleanup: true
overwrite: true
# This way, the release is not directly visible
draft: true
# Release name on body
name: "$TRAVIS_TAG"
# Body is created by git journal !
# body: "$JOURNAL"
on:
repo: Riduidel/rrss2imap
tags: true
branches:
except:
- "/^untagged/"