-
-
Notifications
You must be signed in to change notification settings - Fork 88
/
.travis.yml
97 lines (87 loc) · 3.32 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
# Config adapted from:
# https://www.electron.build/multi-platform-build#sample-travisyml-to-build-electron-app-for-macos-linux-and-windows
sudo: true
matrix:
include:
- os: osx
osx_image: xcode9.4
language: node_js
node_js:
- node
- 8
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
services: docker
language: node_js
node_js:
- node
- 8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- icnsutils
- graphicsmagick
- xz-utils
- xorriso
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
cache:
yarn: true
directories:
- node_modules
- app/node_modules
- $(npm config get prefix)/lib/node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/docker
# NOTE: Remove this if your project is private and you don't have a paid greenkeeper account
# before_install: yarn global add greenkeeper-lockfile@1
install:
- export CXX="g++-4.8"
- yarn
# 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
# NOTE: Remove this if your project is private and you don't have a paid greenkeeper account
# - greenkeeper-lockfile-update
script:
- yarn package
# - yarn lint
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
docker run --rm \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn package --linux --win"
else
:
fi
# NOTE: Remove this if your project is private and you don't have a paid greenkeeper account
# after_script: greenkeeper-lockfile-upload
env:
global:
secure: GF4H+4injx3XVpqW0zvCUcdQSJFiUshvLIo6EDklXRBgeLOcd2nV+dTfckfy9X2sycZDGtBO56dUcbt/8wfr15b524puLVe73j8A2uamdfZicZOYqTACglbiElHi2ehoJLSbceIbEiNzf6wOvSqqwnhi6uR4kw9Fl1n85RDbqcn4fSjfebLydjBYMXRad9Qdm9sXP+u76whotJ8a2EifTaRe9Gwz4WFxDX3LknHkdBIQXPco1rAFdHFoFbeWuHS7lcmA6V+1wqhZGa8Vlo8KA/KnlrB7k91LdADqvKC/XPKaqkmNDXLP9Rn0aq0USirXCoLTJBNo3OTSsPuEbxhU+EqPQvAhBLhtgAzRYgJY+UZA6oczd8+TakfaUuk4vKN0GwEFsZPhO27DoA0DnYQNIkSLPdgm+xK+0V6Mkw9VTXsO25AhTNMEKNGNfTQb+zmc+CX5/WF3VVw/lU9078IYn47ILRCnNZsjxOds2icQi4UpWmzYiVIx1vtMK9nBwAZToV3g6lliFP8vBK/wPOEKl0etKORh+Sp4ghISHmLayyi3zMZhe4s11Ecas+59PkgzRRR61bvmvwymHXIRwAOimBJ8KZgr3x/Z76WRaDHadVwu0SLjbvsznz+TDf531pJ3N6FYd+JHvFfeu1zziJlzroqxJNn2pItXDWdTBM1ydIQ=