-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
60 lines (52 loc) · 2.09 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
language: rust
sudo: false
# Cache `cargo install`ed tools, but don't cache the project's `target`
# directory (which ends up over-caching and filling all disk space!)
cache:
directories:
- /home/travis/.cargo
GH_TOKEN: &GH_TOKEN
secure: iUc9sB4kLaln3M4wTQsM6vyQ/asXLf3f2CSUgjC2dpD4ahtrDhcbJZBH6xADn9xhcjDf786mvbHFos2p1P1hSnxodMYTQR4NUJrbIIbswF1yEk8uPda2EYA4GIlHw1KP20fo/oEXJHI1z0ORvnDoI+4WCQ7aFlHjhLN0qmnuXwT1zAvEAxoGQz8cHjfPCme6q2Sru3ya/p5pUG9KjrtNXymd2R04HV6L1YZHPzVHWj2LiURvIh3foaKsNOGV3JKU8jRMrK01SgeSBmYFykvl8E1Nw27ySstdJbr/m2q2ExOPg9IMAx29K3AxTXlYjidWsZX1RhF7nlYOpTv7tXjp1LuT5Or/Jz+EFnl8FK2Xk4Hd4RPlZVEqcgH+y4sH9cfjcpKdGsMm6Bct+cIbaE+WdytztscjxXGQs/s1OpLnYEyW7lAB/VKlWtdr5OiM5mJw1gPn3bja8U7RfiStgZR/xSPW14gO5OAhs9dZKDDXWdwdbvouocaschnI0nSBEOBB7Hq322hg6VtdXRAmO12rCfge25HaHJO/UQez4fmgYklh7SJXSCa5jqIVHKEE233XqRYndNNhP+H8Ox+3Y3MLq6MgFaa0C2tK+JbP/Dmr6+8VnuVHR6rorH1l7YcI3wqWJKp61WR1vqMC6LTtQSn7ysKuT19Dbcnrpd83ovCSTEo=
DEPLOY_TO_GITHUB: &DEPLOY_TO_GITHUB
before_deploy:
- git config --local user.name "Harrison Bachrach"
- git config --local user.email "harrison.bachrach@gmail.com"
- name="ruut-$TRAVIS_TAG-$TARGET"
- mkdir $name
- cp target/$TARGET/release/ruut $name/
- cp README.md LICENSE $name/
- tar czvf $name.tar.gz $name
deploy:
provider: releases
api_key: *GH_TOKEN
file: ruut-$TRAVIS_TAG-$TARGET.tar.gz
skip_cleanup: true
on:
branch: master
tags: true
matrix:
include:
- name: Tests
env: RUST_BACKTRACE=1
rust: stable
script:
- cargo test --locked
- rustup component add rustfmt
- cargo fmt --version
- cargo fmt --all -- --check
- name: Linux Binary
env: TARGET=x86_64-unknown-linux-musl
rust: stable
before_script: rustup target add $TARGET
script: cargo build --release --target $TARGET --locked
<<: *DEPLOY_TO_GITHUB
- name: macOS Binary
env: MACOSX_DEPLOYMENT_TARGET=10.7 TARGET=x86_64-apple-darwin
os: osx
rust: stable
script: cargo build --release --target $TARGET --locked
install: true
<<: *DEPLOY_TO_GITHUB
notifications:
email:
on_success: never