forked from helium/helium-ledger-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (51 loc) · 1.5 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
language: rust
sudo: required
services: docker
cache: cargo
before_cache:
- rm -rf "$TRAVIS_HOME/.cargo/registry/src"
DEPLOY_TO_GITHUB: &DEPLOY_TO_GITHUB
before_deploy:
- git config --local user.name "Helium CI"
- git config --local user.email "[email protected]"
- name="helium-ledger-app-$TRAVIS_TAG-$TARGET"
- mkdir $name
- cp companion-app/target/$TARGET/release/helium-ledger-app$EXE $name/
- cp LICENSE $name/
- zip -r $name.zip $name
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file: helium-ledger-app-$TRAVIS_TAG-$TARGET.zip
skip_cleanup: true
on:
branch: master
tags: true
matrix:
include:
- name: Linux Binary
env: TARGET=x86_64-unknown-linux-gnu
rust: stable
before_script:
- sudo apt-get install libudev-dev
- rustup target add $TARGET
script: (cd companion-app && 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: stable
script: (cd companion-app && cargo build --release --target $TARGET --locked)
install: true
<<: *DEPLOY_TO_GITHUB
- name: Windows Binary
env: TARGET=x86_64-pc-windows-gnu EXE=.exe
rust: stable
before_script: rustup target add $TARGET
script: (cd companion-app && cargo build --release --target $TARGET --locked)
<<: *DEPLOY_TO_GITHUB