This repository has been archived by the owner on Nov 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
72 lines (63 loc) · 2.18 KB
/
.travis.yml
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
dist: xenial
language: rust
rust: stable
branches:
only:
- master
- /^v\d+\.\d+\.\d+.*$/
env:
global:
- NAME=vape
# linux upx only
- UPX_VER=3.95
before_install:
# add targets not present by default in travis's rustup
- case "$TARGET" in
x86_64-unknown-linux-gnu|x86_64-apple-darwin) ;;
*) rustup target add $TARGET ;;
esac
# install upx
- case "$TRAVIS_OS_NAME" in
"linux")
wget -qO - "https://github.com/upx/upx/releases/download/v${UPX_VER}/upx-${UPX_VER}-amd64_linux.tar.xz" | unxz | tar xf - ;
sudo install -m755 "upx-${UPX_VER}-amd64_linux/upx" /usr/local/bin ;;
"osx")
brew update ;
brew install upx ;;
*) ;;
esac
install:
- cargo build
script:
- cargo test --verbose
after_success:
# static builds
- cargo build --release --target "$TARGET" --verbose
- case "$TRAVIS_OS_NAME" in
"linux")
strip --strip-all "target/${TARGET}/release/${NAME}" ;;
"osx")
strip "target/${TARGET}/release/${NAME}" ;;
*) ;;
esac
- upx --best "target/${TARGET}/release/${NAME}"
- mv -v "target/${TARGET}/release/${NAME}" "${NAME}-${TARGET}"
matrix:
include:
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-musl
- env: TARGET=x86_64-apple-darwin
os: osx
osx_image: xcode11.2
deploy:
provider: releases
api_key:
secure: "MQvkAqJpB84CO9DW7h7OIcZh4lSev5BG9InszQ2Em1bFvd56hLTGUchgoanxHJIoZ2ULDqRhAlubQsaWg57cKrCRO7qsYtvzkbKOU5PkWAFZcgbZ8KUv/fXUf3nHmziilsnMnMjcXquU40v8zALbwwPK0JCFlY0Ozs4JdS5kYtXt88J370XjS3+jzh+bDYBTNZHtisCYM0Q55SFeG8MrBwcfe1SI1ap6TSk+gWbNtfLLYT5y7g07L06DWKiA9GRJ8m56Hf+Blwgmgkc91EMXXMghqyoswdOyyhTzFePJG3qHwEhM8aLH3/5BsCgZ7fycMqpQ+7kwoIdntYUhJMd7KME+f4j2WffOL525SEqeTmwlRtTO19cRJmXHX4Ttv9vj+SqhgsaouCgFRVe0mngSKE4YiUrQAXkgyd9OYafnl9J9Zs8Oh42vMN9UIWFpL4bL9OQGUPHAbSsMZPAXvrjRdorjBpvCn8jDQyGvzy/w+aQwYNiB+rfTfOszoyhdBSou5mOZsBUrd0vWDuMwcKnJo9msnd1Fef/uyi3owbYExC1Xpf3iFyAqoNRg0bbjChn+n3MgCirESZ16FPpxJ2fBwDqUzCXVrHjHGQadGoQoDlhsYnY2quCauYLZvxl9M5yLOf07BcCqyPOJuhVrPm3R/7bOTlcJh4eLj6XY6lLeznA="
file_glob: true
file: $NAME-*
skip_cleanup: true
on:
tags: true
notifications:
email:
on_success: never