-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.travis.yml
125 lines (115 loc) · 3.98 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
118
119
120
121
122
123
124
125
matrix:
allow_failures:
- os: windows
include:
- os: osx
language: node_js
node_js:
- node
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
language: node_js
node_js:
- node
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-multilib
- g++-8
- g++-multilib
- icnsutils
- graphicsmagick
- xz-utils
- xorriso
- rpm
- os: windows
language: node_js
node_js:
- node
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
cache:
yarn: true
directories:
- node_modules
- $(npm config fetch prefix)/lib/node_modules
- flow-typed
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX="g++-8"; fi
install:
- yarn --ignore-engines
# On Linux, initialize "virtual display". See before_script
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
/sbin/start-stop-daemon \
--start \
--quiet \
--pidfile /tmp/custom_xvfb_99.pid \
--make-pidfile \
--background \
--exec /usr/bin/Xvfb \
-- :99 -ac -screen 0 1280x1024x16
else
:
fi
before_script:
# On Linux, create a "virtual display". This allows browsers to work properly
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sleep 3; fi
script:
- yarn package-ci
- yarn lint
- yarn flow
# HACK: Temporarily ignore `yarn test` on linux
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn test; fi
- yarn build-e2e
- yarn test-e2e
after_success:
- PACKAGE_NAME=`node -e "console.log(require('./package.json').name)"`
- PACKAGE_VERSION=`node -e "console.log(require('./package.json').version)"`
- PRODUCT_NAME=whirlpool-gui
- RELEASE=${PACKAGE_NAME}-${PACKAGE_VERSION}
- echo "$PACKAGE_NAME"
- echo "$PACKAGE_VERSION"
- echo "$PRODUCT_NAME"
- echo "$RELEASE"
- mkdir -p releases
- |
# build:mac-x64
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# https://github.com/electron-userland/electron-builder/issues/398
security import "scripts/certs/Certum-Code-Signing-CA-SHA2.cer" -k ~/Library/Keychains/login.keychain -T /usr/bin/codesign;
# https://github.com/electron-userland/electron-osx-sign/issues/83
# Temporarily Bypass Gatekeeper
sudo spctl --master-disable;
sudo spctl --status;
yarn package-all;
ls -al release release/*;
zip releases/whirlpool-gui.app.zip release/mac/whirlpool-gui.app;
ls -al releases/*;
fi
before_deploy:
- echo "Deploying to GitHub releases"
deploy:
provider: releases
api_key:
secure: Fw3epZKiqvHzjdPxGGJRLgNKDnxNeIDxUCpEKGj4q3hQxjwQ7YCdB8+GWnpnR0dGPmmS7a95X+CRXytz+ANrC1ctZutVcCyJbWD8WXwCzAMEhE9EP61bXhggPArLdRShfdyC8gKifQ51SJoeICGuR04ADQ+Yy7zv7yVf5iYJAy189QWnrMYUuPTUdq/dRPkXSGm9hj6WLPhkgC6xez5DIlPufDj4FCrF/Vba7pgorBNVE0AUk0Ip17uG0KNsAIwcxR86HmNAZiqPCdDskpy8lnrVEkW1KMtEMQRj1toNr36ljQw8dC9E9YV5/wjhmFRlVGoVrXNKlpspmdcChRq+xyeJMBOqIu7rBT/OlEgACWHgenzaPFQpf6EtIvDxkpkI7EcPqH/ILSlIq/FjIaazG0kFS5JuBHkPDOOOhlo/SpmFFo2ARtWRJESmlNT8BEAo9MShNS9faMN0LuKDgTp1+qXa5L6JPBp2z2sSU1w4exi9muFnMh4YbG5Aoi4m4TjrXIMS/rN5DmwYBR2fJAD/4CPHA7HgK4x5sV9AYh0kq3xfXp0XvLY4dEdaBDHW8/xEuozMKi9d6/EY5lT7WZf9pryT3C52RViVBLo+9PnkdDOAUCoy5JAyBibWOt/zwRyc3UnzfW/3lNVxtoA8ayXDcHdPkNnaDbSYuW1RE4f19gA=
file_glob: true
file:
- 'releases/*.*'
overwrite: true
skip_cleanup: true
on:
# https://docs.travis-ci.com/user/deployment#Conditional-Releases-with-on
tags: false # Deploy app only when a tag is applied to the commit
branch: develop