blob: 1b1f5138838099438b93abda7364bbc540a9e073 (
plain)
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
78
79
80
81
82
83
84
85
|
language: rust
dist: xenial
# According to https://docs.travis-ci.com/user/customizing-the-build#rows-that-are-allowed-to-fail,
# these empty arrays are actually required.
rust: []
env: []
addons:
apt:
packages:
- mingw-w64
- upx
- musl
- musl-dev
- musl-tools
matrix:
allow_failures:
- rust: stable
env: []
- rust: beta
env: []
include:
- rust: stable
env: []
- rust: beta
env: []
- rust: nightly
env: []
- rust: nightly
env:
- TARGET=x86_64-unknown-linux-musl
- BIN_NAME=miniserve
- PROPER_NAME=miniserve-linux-x86_64
os: linux
- rust: nightly
env:
- TARGET=x86_64-pc-windows-gnu
- BIN_NAME=miniserve.exe
- PROPER_NAME=miniserve-win-x86_64.exe
- RUSTFLAGS="-C linker=x86_64-w64-mingw32-gcc"
os: linux
- rust: nightly
env:
- TARGET=x86_64-apple-darwin
- BIN_NAME=miniserve
- PROPER_NAME=miniserve-osx-x86_64
os: osx
- rust: nightly-2019-09-25
env:
- CLIPPY=true
before_install:
- rustup self update
- rustup update
install:
# On Apple, the default target is already the right one.
- if [[ -n $TARGET && $TARGET != "x86_64-apple-darwin" ]]; then rustup target add $TARGET; fi
- if [[ -n $CLIPPY ]]; then rustup component add clippy; fi
script:
# If this is a normal, non-deployment build...
- if [[ -z $TARGET && -z $CLIPPY ]]; then cargo build && RUST_BACKTRACE=1 cargo test; fi
- if [[ -n $CLIPPY ]]; then cargo clippy -- --deny clippy::all; fi
- if [[ -n $TARGET ]]; then cargo build --release --locked --target $TARGET; fi
before_deploy:
# If this is a binary deployment...
- if [[ -n $TARGET ]]; then cp -a target/$TARGET/release/$BIN_NAME $PROPER_NAME && strip $PROPER_NAME; fi
- # Run upx on the binary if this is a deployment for Linux or Windows
- if [[ $TARGET = "x86_64-pc-windows-gnu" ]]; then upx $PROPER_NAME; fi
- if [[ $TARGET = "x86_64-unknown-linux-musl" ]]; then upx $PROPER_NAME; fi
deploy:
- provider: releases
api_key:
secure: "3lixPJV+e4/iAPKh0nwi6sPxO9OAO3y6h0+lreoi18hj9p8b7uoOXlYFG910BkVi15oCevPvXFDZ/pObqmCfWGX6Ahc5Lh/HTvIZH95kSAYlw/AUhBSKLohT/QXwmzUwaAwffQ0iIagrrBDb8BwMBkzqDmWAM1zuF+fMMfZ+iWB3yUN+QvzU6jYR9msfJSL2tNtgV1eFh7N+Xj277dMkZgkNgea3WwYL/USqaUDIsK5irBszETeg+n6yz2ERsp6SRpJrpZEhDqLaAQfu3pSoyNVP77vQb+q2MixZbYS3Zdq4w3p0LR9qAjFd8Ts38/ki/gGIEdmcO7FT6P1VUFzr+iW9nK49/rbYgw+TMWW+/pQJF6C7I89szsp5m4MUPnxesu/9NVyxrsYPuevgGh5IoB29eYBMoFETEK0XabCD/BAXnHvBbJxAOsZttU0MtjJWa0EelUSkZjaODEZVfGr7Z9I/Ji765QeFLJ4FDovJB056IOIhbAgIcqi9ItanJxsrLTI29BNB/zaMn+WY0s8HvLPanHaEKXg6cuhm8ptvM9nUlcDEx7zpirNV/OHP5/QRasMCpMHE20U7aRakKK+fpCskC78kjeU2fq7iZZp8fv2yocOqeWpX//clYhtuWs878I3MGkjpSxgI2I6nLisx+r/bWJvg1DZf7txW/CYyWIY="
file: $PROPER_NAME
skip_cleanup: true
on:
branch: master
tags: true
condition: $TRAVIS_RUST_VERSION = nightly && -n $TARGET
|