forked from skycoin/hardware-wallet-daemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (85 loc) · 2.88 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
sudo: required
language: go
go:
- 1.11.x
services:
- xvfb
- docker
matrix:
include:
- os: linux
env:
- PIP='sudo pip'
dist: xenial
- os: osx
if: type != pull_request
env: VERSION_UPGRADE_TEST_WAIT_TIMEOUT=60s
osx_image: xcode8
env:
global:
- XARGS="-screen 0 1024x768x24"
install:
- if [[ ! -d "$GOPATH/src/github.com/skycoin/hardware-wallet-daemon" ]]; then
mkdir -p "$GOPATH/src/github.com/skycoin";
cp -rf $TRAVIS_BUILD_DIR $GOPATH/src/github.com/skycoin/;
fi
- cd $GOPATH/src/github.com/skycoin/hardware-wallet-daemon
- if [[ $TRAVIS_OS_NAME == 'linux' && "$TRAVIS_PULL_REQUEST" == false ]]; then
docker pull karalabe/xgo-latest ;
go get github.com/karalabe/xgo;
./ci-scripts/install-${TRAVIS_OS_NAME}-release.sh ;
fi
- make install-linters
before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_PULL_REQUEST" == false ]]; then
export CHECK_PATH="$(brew --prefix check)" ;
export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${CHECK_PATH}/lib" ;
./ci-scripts/add-key.sh ;
fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
mkdir -p tmp/hardware-wallet ;
git clone --depth=1 --single-branch --branch develop https://github.com/skycoin/hardware-wallet.git
tmp/hardware-wallet ;
git -C tmp/hardware-wallet checkout develop ;
git -C tmp/hardware-wallet submodule init ;
git -C tmp/hardware-wallet submodule update ;
git -C tmp/hardware-wallet submodule update --remote ;
( cd ./tmp/hardware-wallet && sh "ci-scripts/install-${TRAVIS_OS_NAME}.sh" ) ;
ls -l /usr/local/bin/protoc ;
export PATH="/usr/local/bin:$(pwd)/tmp/hardware-wallet/protoc/bin:$PATH" ;
fi
- echo "PATH=$PATH";
- echo "PIP=$PIP";
script:
- make lint
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
make -C tmp/hardware-wallet clean ;
make -C tmp/hardware-wallet/tiny-firmware/protob install-deps-nanopb ;
make -C tmp/hardware-wallet/tiny-firmware/protob install-protoc ;
make -C tmp/hardware-wallet/tiny-firmware/protob/nanopb/vendor/nanopb/generator/proto ;
make -C tmp/hardware-wallet emulator ;
xvfb-run --server-args="${XARGS}" -e /dev/stdout -a make -C ./tmp/hardware-wallet run-emulator & true ;
ps aux | grep emulator ;
make test-integration-emulator ;
make test-integration-emulator-enable-csrf ;
fi
- make test
# Build daemon
- if [[ "$TRAVIS_PULL_REQUEST" == false ]]; then make release; fi
after_script:
- kill -s KILL $(pgrep emulator)
notifications:
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $AWS_BUCKET
skip_cleanup: true
local_dir: build/release
upload-dir: skywallet-daemon
acl: public_read
region: $AWS_REGION
on:
repo: skycoin/hardware-wallet-daemon
tags: true