forked from intenthq/gitkv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
93 lines (87 loc) · 3.34 KB
/
.travis.yml
File metadata and controls
93 lines (87 loc) · 3.34 KB
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
86
87
88
89
90
91
92
93
language: rust
dist: xenial
osx_image: xcode10.2
cache:
- cargo
- directories:
- "${HOME}/kcov/"
addons:
apt:
packages:
# For building MUSL static builds on Linux.
- musl-tools
# packages for kcov
- cmake
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev
sources:
- kalakris-cmake
homebrew:
packages:
- cmake
matrix:
fast_finish: true
allow_failures:
- rust: beta
- rust: nightly
include:
- os: linux
rust: nightly
env: TARGET=x86_64-unknown-linux-musl
- os: linux
rust: beta
env: TARGET=x86_64-unknown-linux-musl
- os: linux
rust: stable
env: TARGET=x86_64-unknown-linux-musl
- os: osx
rust: nightly
env: TARGET=x86_64-apple-darwin
- os: osx
rust: beta
env: TARGET=x86_64-apple-darwin
- os: osx
rust: stable
env: TARGET=x86_64-apple-darwin
before_script:
- rustup target add $TARGET
- export PATH=$HOME/.cargo/bin:$PATH
# Cargo install fails if a crate is already installed — which it will be if it was cached.
# It recommends to use `--force`, but that _always_ recompiles from scratch which takes ~5 minutes.
# FIXME: Follow https://github.com/rust-lang/cargo/issues/6667 for a WIP fix on Cargo for this.
- cargo install cargo-audit || echo "cargo-update already installed"
- cargo install cargo-travis || echo "cargo-travis already installed"
- rustup component add clippy
script:
- cargo build --target $TARGET --release
- cargo clippy --all-targets --all-features -- -D warnings
- cargo test --target $TARGET
- cargo audit
# Make a copy of the binary named nicely for the GitHub release, if needed.
- cp target/$TARGET/release/gitkv target/$TARGET/release/gitkv-$TARGET && chmod +x target/$TARGET/release/gitkv-$TARGET
after_success:
- test $TRAVIS_OS_NAME = "linux" && cargo coverage --target $TARGET --kcov-build-location "${HOME}/kcov/"
- test $TRAVIS_OS_NAME = "linux" && bash <(curl -s https://codecov.io/bash)
deploy:
# Push binaries to the GitHub release for this version.
- provider: releases
skip_cleanup: true
api_key:
secure: fvMOLUfi9KoEudSyv2LtwgYP7bh+f1nelj/TeIjteP+u1Omz1p9pP6nIDCrie5tFtY3q4Jor+R7IZoffe/G6KAc7sI4Ndhmr8uB+S9US4gmRI98VMFdGGtjoZzro8Kdrg8+9R0exBgNXJW+ubduSsM0CzKq6HPxmd3TSKRt+2G5vLA5btMbLeeLc8xpmlGrEw2nCjUbEcPislGnQ54wrbrLb+u5SzjPD2G7v8dk1tksfgtcISMylb/aQ+UGrCmMHZfDhAZaooLzxRF+aBtXtku+BFWGjubGa4H/Fj0asKgRic4OzGCi9XwVoBYUgKyb3J7tyO+DtKihBooPytgNcN6zMhqGgxPI6sIFijGatoUZMGKN/J42fpj2f719riaGGuQOcjXbLENl3GfooO97E7mf84SpozhkjYEHEyLRMZTJVk66mCBcrAd6gIa2hdOB3l4Mxy1MzfmDbWwDDHsVflr7fBW8QaWdazziIR12N3iyC7cQdH2lc13l8/N5ffbeTzjWGscZjQWBRECTXjuDklQ9gmG3qlUCdKKsDqMaiuTl21Pi9uqeuebgZS2aVf+y40mdzKd3k89IBUEdMKrvqCvpCV16hm1rlxMtJaVxd9C6gjjrn3hkCWSUXIYzDrLXqwMNSZm02qIu6VEjTyy7rbCcr7fZgti+PbeP43MPvq9s=
file: target/$TARGET/release/gitkv-$TARGET
on:
rust: stable
tags: true
branch: /^v\d+\.\d+\.\d+.*$/
# Push Docker container to Docker Hub tagger for this version.
- provider: script
skip_cleanup: true
script:
- ./docker/build.sh $TRAVIS_BRANCH $TARGET && docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" && docker push intenthq/gitkv:$TRAVIS_BRANCH
on:
condition: $TRAVIS_OS_NAME = "linux"
rust: stable
tags: true
branch: /^v\d+\.\d+\.\d+.*$/