-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml.unused
77 lines (72 loc) · 2.06 KB
/
.travis.yml.unused
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
services:
- docker
language: rust
rust:
- stable
cache: cargo
# All Rust build architectures are defined here
matrix:
include:
- env: DEBUG=debug CROSS=cross TARGET=x86_64-unknown-linux-gnu
os: linux
- env: DEBUG=debug TARGET=i686-apple-darwin
os: osx
osx_image: xcode10
- env: DEBUG=debug TARGET=x86_64-apple-darwin
os: osx
osx_image: xcode10
- env: TARGET=x86_64-pc-windows-msvc
os: windows
- env: DEBUG=debug CROSS=cross TARGET=armv7-unknown-linux-gnueabihf
os: linux
addons:
apt:
packages:
- gcc-arm-linux-gnueabihf
# part shamelessly borrowed from https://github.com/Enet4/nifti-rs/blob/438538bfffa2347ece5a09c2a37c0c407ec6fbee/.travis.yml
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- rustup target add $TARGET || true
- if [ ! -z "$CROSS" ]; then
cargo install cross --force;
export CARGO_CMD="cross";
else
export CARGO_CMD=cargo;
fi
# This is the script that will be run on each matrix element
script:
- |
if [ $TARGET = "x86_64-unknown-linux-gnu" ]; then
echo "Running on $TARGET, so running tests!"
cargo test
fi
- if [ ! -z "$DEBUG" ]; then
$CARGO_CMD build --target $TARGET --verbose
fi
- $CARGO_CMD build --target $TARGET --verbose --release
- mkdir -p target/executable
- ls -la target/${TARGET}
- cp target/${TARGET}/debug/rrss2imap target/executable/rrss2imap-${TARGET}-debug
- cp target/${TARGET}/release/rrss2imap target/executable/rrss2imap-${TARGET}
- ls -la target/executable
# Once the Rust packages are built, here they are deployed
deploy:
provider: releases
api_key: ${GITHUB_OAUTH}
file_glob: true
file: target/executable/*
skip_cleanup: true
overwrite: true
# This way, the release is not directly visible
draft: true
verbose: 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/"