-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
.travis.yml
83 lines (83 loc) · 2.55 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
matrix:
include:
- os: linux
language: node_js
node_js: '12'
sudo: required
addons:
chrome: stable
apt:
packages:
- openjpeg-tools
- rpm
- bsdtar
- snapd
- xvfb
- libxtst6
- libxss1
- libgtk2.0-0
- libnss3
- libasound2
- libdbus-1-dev
- libglib2.0-dev
- libgconf-2-4
- libdbus-1-dev:i386
- libdbus-glib-1-dev
# mdns
- libavahi-compat-libdnssd-dev
- os: osx
language: node_js
osx_image: xcode11.2
node_js: '12'
sudo: required
addons:
chrome: stable
env:
- HOMEBREW_CASK_OPTS='--appdir=/Applications'
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
cache:
yarn: true
directories:
- node_modules
- '$(npm config get prefix)/lib/node_modules'
- '$HOME/.cache/electron'
- '$HOME/.cache/electron-builder'
- '$HOME/docker'
install:
- yarn
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export DISPLAY=':99.0'
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3
sudo snap install snapcraft --classic
fi
script:
- yarn run lint || travis_terminate 1
- yarn run build || travis_terminate 1
# TODO re-enable for linux
# - |
# if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# yarn run test-e2e -- --retries 2 || travis_terminate 1
# fi
after_success:
- |
if [ "$TRAVIS_BRANCH" == "master" ] || [ -n "$TRAVIS_TAG" ]; then
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
# Only create snap in when untagged, otherwise snaps build service will do this for us
# if [ -z $TRAVIS_TAG ]; then
# sed -i "s/\"AppImage\",/\"AppImage\",\"snap\",/g" package.json
# fi
yarn run release:linux
else
if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
# ln -s "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool" /usr/local/bin/altool
# ln -s "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms" /usr/local/bin/itms #itms is needed, otherwise altool will not work correctly
chmod +x ./internals/scripts/add-osx-cert.sh;
./internals/scripts/add-osx-cert.sh;
fi
yarn run release:mac
fi
fi