This repository has been archived by the owner on Dec 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
75 lines (68 loc) · 2.77 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
73
74
75
language: rust
# 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
DEPLOY_TO_GITHUB: &DEPLOY_TO_GITHUB
before_deploy:
- git config --local user.name "Jonathon Belotti"
- git config --local user.email "jonathon.i.belotti@gmail.com"
- name="goodreads-sh-$TRAVIS_TAG-$TARGET"
- mkdir $name
- cp target/$TARGET/release/goodreads-sh $name/
- cp README.md LICENSE $name/
- tar czvf $name.tar.gz $name
deploy:
provider: releases
api_key:
secure: "Oym5kx/RGWJJPT6AJ8NyKdDSJFFawNHTyJjdTwiTgiMEtVcb2TB9TOUwY1uNs1o3Hx32oWSpt4dOqlmujfa/EX93EfgbMOE2XEpMDX/mxaCYQ0smlsIyFwn5rYzOC4MgP2mbikTypruQI/NUOtriG13TIRbAFL/2UaPhSsBMQ4eL/N5WFO4w2innVv+B2Q6cukj3uJd7JATnyP65BfUAifEoSeGC3BGiPJxbyh5QCgbz2gZ0vzxvW/Q93OxP/4WCJ567jwZNvIrBz1Z7rrc3JkGFOMPunz+gu187LEKXFP6plZfFzherHF8NZTxdGoxUi2Kp9C/z2YT6U/5bSgoUxX1w347vUT1Y+ooN3LGwyNCwFG5PKJtBrQKaWJ1huu4YHMBh0b1PbwpWc5d53fLynm1UC/LrEDO3dABFqXLnpfEjoJPTNX0Z9pY5fZ3RDZV8/Q0iebnrv+U1OJOxfeVCGUwKBAvepaHz32y2kke4cDkR+KZTixYiJ7n2yx5pv2YUZkkaJfPkuVHZ3BorR8YirIZ5KorXRKuI93k688rR20qFgfSf++AXGi2DwTx+HgNKe2Homv+TzAs+2MoPM0cJ+oPMftWUI9VpknwGhh/pwVj0OBraEQA5SB1bWZwwUDhHAhhtL65GqsSMZ9RtYYmdsUUbE3aPkPb4GpQfcvuqAx0="
file: goodreads-sh-$TRAVIS_TAG-$TARGET.tar.gz
skip_cleanup: true
on:
tags: true
matrix:
include:
- name: Tests
env: RUST_BACKTRACE=1
# Pin temporarily because rustfmt is not available in nightly
# Ref: https://github.com/rust-lang/rustup.rs/issues/1566
rust: nightly-2019-10-04
addons:
firefox: latest
chrome: 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
- PKG_CONFIG_ALLOW_CROSS=1
rust: nightly
before_script:
- rustup target add $TARGET
- curl https://www.openssl.org/source/openssl-1.0.2l.tar.gz | tar xzf -
- (cd openssl-1.0.2l &&
CC=musl-gcc ./Configure --prefix=$HOME/openssl-musl no-dso no-ssl2 no-ssl3 linux-x86_64 -fPIC &&
make -j$(nproc) &&
make install)
- export OPENSSL_DIR=$HOME/openssl-musl
script: cargo build --release --target $TARGET --locked
addons:
apt:
packages:
- musl-tools
- libssl-dev
<<: *DEPLOY_TO_GITHUB
- name: macOS Binary
env: MACOSX_DEPLOYMENT_TARGET=10.7 TARGET=x86_64-apple-darwin
os: osx
rust: nightly
script: cargo build --release --target $TARGET --locked
install: true
<<: *DEPLOY_TO_GITHUB
notifications:
email:
on_success: never