-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
117 lines (105 loc) · 3.28 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
dist: xenial
language: go
go:
- "1.14.x"
os:
- osx
- linux
- windows
env:
global:
- electron_cache: $home/.cache/electron
- electron_builder_cache: $home/.cache/electron-builder
- build_dir: build
- buildlib_dir: $build_dir/libskycoin
- lib_dir: lib
- build_ui_travis_dir: $home/.skycoin-ui-travis
- VERSION_UPGRADE_TEST_WAIT_TIMEOUT: 60s
- BUILD_BRANCH: '"^(master|develop)$"'
jobs:
- TEST_SUIT=units
- TEST_SUIT=integrations
- TEST_SUIT=integrations/disable-csrf
- TEST_SUIT=integrations/auth
osx_image: xcode11
services: xvfb
jobs:
# Exclude tests for windows and integration tests that disable-csrf and with auth
exclude:
- os: windows
env: TEST_SUIT=units
- os: windows
env: TEST_SUIT=integrations
- os: windows
env: TEST_SUIT=integrations/disable-csrf
- os: windows
env: TEST_SUIT=integrations/auth
- os: osx
env: TEST_SUIT=integrations/disable-csrf
- os: osx
env: TEST_SUIT=integrations/auth
# Build stage jobs
include:
- name: linux-wallet-build
stage: build
os: linux
env: TEST_SUIT=""
- name: osx-wallet-build
stage: build
os: osx
env: TEST_SUIT=""
- name: windows-wallet-build
stage: build
os: windows
env:
- GOX_OUTPUT='.gox_output'
- TEST_SUIT=""
cache:
directories:
- electron/node_modules
- electron/app/node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
addons:
chrome: stable
install:
# Install gox
- if [[ $TRAVIS_BUILD_STAGE_NAME == "Build" ]]; then GO111MODULE=off go get github.com/mitchellh/gox; fi
# Install dependences for building wallet
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils libudev-dev libusb-1.0-0-dev;
fi
- if [[ ! -d $GOPATH/src/github.com/SkycoinProject/skycoin ]]; then
mkdir -p $GOPATH/src/github.com/SkycoinProject;
ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/SkycoinProject/skycoin;
fi
- cd $GOPATH/src/github.com/SkycoinProject/skycoin
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then nvm install 10.16.3 && nvm use 10.16.3; fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then ./ci-scripts/install-nodejs-win.sh; fi
before_script:
- if [[ $TRAVIS_BUILD_STAGE_NAME == "Build" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TRAVIS_BRANCH" =~ $BUILD_BRANCH || -n "$TRAVIS_TAG" ]]; then
./ci-scripts/add-key.sh;
fi
# Source the ~/.bashrc to update the PATH for windows
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then source $HOME/.bashrc; fi
script:
- if [[ "$TEST_SUIT" != "" ]]; then ./ci-scripts/lint-and-test.sh $TEST_SUIT; fi
- if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Build" ]]; then ./ci-scripts/build-wallet.sh; fi
deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $AWS_BUCKET
local_dir: electron/release
upload_dir: wallet
acl: public_read
region: $AWS_REGION
edge: true # opt in to dpl v2
on:
repo: SkycoinProject/skycoin
tags: true
notifications:
email:
- travis@skycoin.com
# https://github.com/kvld/travisci-telegram TravisCI Telegram Bot integration
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify